Search in sources :

Example 6 with IMarketplaceClientService

use of org.eclipse.epp.mpc.ui.IMarketplaceClientService in project epp.mpc by eclipse.

the class MarketplaceClientServiceTest method testClientServiceAvailable.

@Test
public void testClientServiceAvailable() {
    IMarketplaceClientService marketplaceClientService = MarketplaceClient.getMarketplaceClientService();
    assertNotNull(marketplaceClientService);
}
Also used : IMarketplaceClientService(org.eclipse.epp.mpc.ui.IMarketplaceClientService) Test(org.junit.Test)

Example 7 with IMarketplaceClientService

use of org.eclipse.epp.mpc.ui.IMarketplaceClientService in project epp.mpc by eclipse.

the class MarketplaceClientUiPlugin method start.

@Override
public void start(BundleContext context) throws Exception {
    instance = this;
    super.start(context);
    MarketplaceClientUiPlugin.bundleContext = context;
    clientServiceTracker = new ServiceTracker<IMarketplaceClientService, IMarketplaceClientService>(context, IMarketplaceClientService.class, null);
    clientServiceTracker.open();
    resourceProvider = new ResourceProvider();
    Hashtable<String, String> props = new Hashtable<String, String>(2);
    props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, MarketplaceClientUi.BUNDLE_ID);
    context.registerService(DebugOptionsListener.class.getName(), new DebugOptionsListener() {

        public void optionsChanged(DebugOptions options) {
            DebugTrace debugTrace = null;
            boolean debug = options.getBooleanOption(MarketplaceClientUi.BUNDLE_ID + DEBUG_OPTION, false);
            if (debug) {
                debugTrace = options.newDebugTrace(MarketplaceClientUi.BUNDLE_ID);
            }
            DEBUG = debug;
            MarketplaceClientUiPlugin.debugTrace = debugTrace;
        }
    }, props);
}
Also used : DebugTrace(org.eclipse.osgi.service.debug.DebugTrace) IMarketplaceClientService(org.eclipse.epp.mpc.ui.IMarketplaceClientService) Hashtable(java.util.Hashtable) ResourceProvider(org.eclipse.epp.internal.mpc.ui.catalog.ResourceProvider) DebugOptionsListener(org.eclipse.osgi.service.debug.DebugOptionsListener) DebugOptions(org.eclipse.osgi.service.debug.DebugOptions)

Aggregations

IMarketplaceClientService (org.eclipse.epp.mpc.ui.IMarketplaceClientService)7 IMarketplaceClientConfiguration (org.eclipse.epp.mpc.ui.IMarketplaceClientConfiguration)5 INode (org.eclipse.epp.mpc.core.model.INode)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Hashtable (java.util.Hashtable)1 List (java.util.List)1 MarketplaceNodeCatalogItem (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceNodeCatalogItem)1 ResourceProvider (org.eclipse.epp.internal.mpc.ui.catalog.ResourceProvider)1 Operation (org.eclipse.epp.mpc.ui.Operation)1 DebugOptions (org.eclipse.osgi.service.debug.DebugOptions)1 DebugOptionsListener (org.eclipse.osgi.service.debug.DebugOptionsListener)1 DebugTrace (org.eclipse.osgi.service.debug.DebugTrace)1 Shell (org.eclipse.swt.widgets.Shell)1 IFileEditorMapping (org.eclipse.ui.IFileEditorMapping)1 Test (org.junit.Test)1