/*******************************************************************************
 * Copyright (c) 2016 Ericsson
 *
 * All rights reserved. This program and the accompanying materials are made
 * available under the 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.cdt.example.framespy;

public class FrameSpyService {

	// Global TODO: Make this class into a DSF service that provides 
	//              a synchronous method
	//                   getLocalTimeOfDayString();
	//              which synchronously returns 
	//                   new SimpleDateFormat("HH:mm:ss").format(Calendar.getInstance().getTime());
	//              and an asynchronous method
	//                   getTargetTimeOfDayString(DataRequestMonitor<> rm);
	//              which should still use (for simplicity)
	//                   new SimpleDateFormat("HH:mm:ss").format(Calendar.getInstance().getTime());

	//              Look at any existing DSF-GDB service to guide you.
	
	// TODO: Find the abstract base class to have FrameSpyService extend
    //	     You can find the BundleContext using Activator.getBundleContext()
	
	// TODO: You must call the base class's register() method so the service
	//       can be found by others.
	//       Look at another service to see when and how register() is called,
	//       within the initialization() asynchronous method.
	//       You can use the service's class name as it registered name.
	
	// TODO: Provide the String getLocalTimeOfDayString(); as required above 

    // TODO: Provide an asynchronous getTargetTimeOfDayString(DataRequestMonitor<> rm);
	//       as described above
}

@@ -484,1335 +484,376 @@
 y;%0A%0A
-public class FrameSpyService %7B%0A%0A%09// Global TODO: Make this class into a DSF service that provides %0A%09//              a synchronous method%0A%09//                   getLocalTimeOfDayString();%0A%09//              which synchronously returns %0A%09//                   new SimpleDateFormat(%22HH:mm:ss%22).format(Calendar.getInstance().getTime());%0A%09//              and an asynchronous method%0A%09//                   getTargetTimeOfDayString(DataRequestMonitor%3C%3E rm);%0A%09//              which should still use (for simplicity)%0A%09//                   new SimpleDateFormat(%22HH:mm:ss%22).format(Calendar.getInstance().getTime());%0A%0A%09//              Look at any existing DSF-GDB service to guide you.%0A%09%0A%09// TODO: Find the abstract base class to have FrameSpyService extend%0A    //%09     You can find the BundleContext using Activator.getBundleContext()%0A%09%0A%09// TODO: You must call the base class's register() method so the service%0A%09//       can be found by others.%0A%09//       Look at another service to see when and how register() is called,%0A%09//       within the initializat
+import org.eclipse.cdt.dsf.service.AbstractDsfService;%0Aimport org.eclipse.cdt.dsf.service.DsfSession;%0Aimport org.osgi.framework.BundleContext;%0A%0Apublic class FrameSpyService extends AbstractDsfService %7B%0A%0A%09public FrameSpyService(DsfSession sess
 ion
-(
 ) 
-asynchronous method.%0A%09//       You can use the service's class name as it registered name.%0A%09%0A%09// TODO: Provide the String getLocalTimeOfDayString(); as required above %0A%0A    // TODO: Provide an asynchronous getTargetTimeOfDayString(DataRequestMonitor%3C%3E rm);%0A%09//       as described above
+%7B%0A%09%09super(session);%0A%09%7D%0A%0A%09@Override%0A%09protected BundleContext getBundleContext() %7B%0A%09%09return Activator.getBundleContext();%0A%09%7D
 %0A%7D%0A

Create new service