on Jul 16th, 2010Sample code updated

I just uploaded a new version of the Eclipse RCP book second edition sample code. You can connect to the software site (http://eclipsercp.org) and updating your current Samples Manager or installing the new one if you don’t have it already installed.  We are also making available an archive of the software site for those looking to get around firewall issues.

Below is a quick summary of the changes in this new version:

  • General clean up of glitches and errata reported by readers/reviewers
  • New target platform that is smaller and more complete
  • Chapter 14 code updated to better reflect the use of p2
  • Chapter 9 product definition updated to export and produce the correct launcher on Mac
  • Fixes to avoid NPEs and other problems when login to a chat server was not possible

Check out the new samples and be sure to let us know on the forums if there are problems.

8 Responses to “Sample code updated”

  1. ben palmeron 08 Feb 2011 at 9:02 am

    Hi,
    Just bought the book and installed the Sample Manager. While I get RCP Book menu item, and access to the chapters view, I do not get the RCP Book > Load Target option, no do I see a Load target Button in the samples manger view.

    Please advise.

    Ben

  2. andyon 20 Mar 2011 at 8:47 pm

    how can i download it ?

  3. Jeff McAfferon 21 Mar 2011 at 9:04 am

    You can get the samples manager from http://eclipsercp.org/downloads/.

  4. Jeff McAfferon 21 Mar 2011 at 9:05 am

    Right click in the Sample Manager. There should be a “Load Target” menu entry.

  5. anderson 18 May 2011 at 5:47 am

    Hello
    I bought the book and try to install the software. But for chapter 10, I receive a bunch of compilation error. There seems to be an mismatch of the samples with the jivesoftware-libraries (a lot of constants and method calls used in the samples are missing). Do I miss something?
    Best Regards
    Anders

  6. Jeff McAfferon 18 Jun 2011 at 8:23 pm

    Thanks for the complement. Its all in the CSS. I’m by no means an expert. We just started with a simple clean theme we already had and did some tweaks. Sorry, not specific words of wisdom.

  7. JeanPhion 01 Apr 2012 at 5:21 am

    Hi I am struggling with chapter 14. I bought the book a few months ago and looks like the sample code of equinox p2 does not work …

    1 – First just downloading Equinox p2 SDK was completely different as what the book proposed … in Galileo or Indigo no way to find Equinox P2 SDK through the described way. I had to download it directly from Equinox download site and then install it locally.

    2 – All imports are somehow wrong:
    Many imports are based on path :
    *** import org.eclipse.equinox.internal.provisional.p2 ***
    Which does not exist. Going to Equinox P2 help and searchin for each unknown class allows to find the real path which always look like:
    *** import org.eclipse.equinox.p2. … ***

    For example, ProvisioningContext class will be found here:
    http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fequinox%2Fp2%2Frepository%2Fmetadata%2FIMetadataRepositoryManager.html
    Actually finding the real path is not that easy and all unknown class has to be searched one by one as all guess I tries were not running fine.

    3 – There are several discouraged access or access restrictions … could it be that the samples use deprecated classes ?
    * Access restriction: The method getKnownRepositories(int) from the type IRepositoryManager…
    * Discouraged access: The method getService(BundleContext, String) from the type ServiceHelper is not …

    and some more.

    4 – I am fed up to try to debug the problem :-) Any way to get an updated code that would match current state of Equinox p2?

    Thanks,
    Kind regards,

  8. JeanPhion 01 Apr 2012 at 5:27 am

    Just for info I updated class P2Util as follow to be able to go further:

    public class P2Util {
    // XXX Check for updates to this application and return true if
    // we have installed updates and need a restart.
    // This method is intentionally long and ugly in order to provide
    // “one-stop-shopping” for how to check for and perform an update.
    static boolean checkForUpdates() {
    return false;
    }
    }

Comments RSS

Leave a Reply