Skip to content

Commit

Permalink
511217: Open MPC directly on Favorites list
Browse files Browse the repository at this point in the history
  • Loading branch information
creckord committed Mar 30, 2017
1 parent 14a499b commit 97fdb85
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions org.eclipse.epp.mpc.ui/OSGI-INF/l10n/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ command.open.label = Eclipse &Marketplace...
command.open.tooltip = Open the Eclipse Marketplace wizard
command.importFavorites.description = Import another user's Marketplace Favorites List
command.importFavorites.name = Import Marketplace Favorites
command.favorites.description = Open Marketplace Favorites
command.favorites.name = Eclipse Marketplace Favorites
command.favorites.label = Eclipse Marketplace &Favorites...
command.favorites.tooltip = Open your personal Eclipse Marketplace favorites
catalog.description = Eclipse Marketplace (MP) is a place to find and keep track of Eclipse-based solutions.
catalog.label = Eclipse Marketplace
extension-point.name = Marketplace Catalog
Expand Down
9 changes: 9 additions & 0 deletions org.eclipse.epp.mpc.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
class="org.eclipse.epp.internal.mpc.ui.commands.ImportFavoritesWizardCommand"
commandId="org.eclipse.epp.mpc.ui.command.importFavoritesWizard">
</handler>
<handler
class="org.eclipse.epp.internal.mpc.ui.commands.ShowFavoritesCommand"
commandId="org.eclipse.epp.mpc.ui.command.showFavorites">
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
Expand All @@ -41,6 +45,11 @@
optional="true">
</commandParameter>
</command>
<command
description="%command.favorites.description"
id="org.eclipse.epp.mpc.ui.command.showFavorites"
name="%command.favorites.name">
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2010 The 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* The Eclipse Foundation - initial API and implementation
*******************************************************************************/
package org.eclipse.epp.internal.mpc.ui.commands;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.epp.mpc.ui.IMarketplaceClientConfiguration;
import org.eclipse.epp.mpc.ui.IMarketplaceClientService;
import org.eclipse.epp.mpc.ui.MarketplaceClient;

public class ShowFavoritesCommand extends AbstractHandler {

public Object execute(ExecutionEvent event) throws ExecutionException {
IMarketplaceClientService marketplaceClientService = MarketplaceClient.getMarketplaceClientService();
IMarketplaceClientConfiguration config = marketplaceClientService.newConfiguration();
marketplaceClientService.openFavorites(config);
return null;
}

}

0 comments on commit 97fdb85

Please sign in to comment.