| /****************************************************************************** |
| * 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.gmf.tests.runtime.common.ui.services.action.contributionitem; |
| |
| import org.eclipse.core.runtime.IConfigurationElement; |
| import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.IPopupMenuContributionPolicy; |
| import org.eclipse.jface.viewers.ISelection; |
| |
| public class ContributionPolicy |
| implements IPopupMenuContributionPolicy { |
| |
| static int callcount = 0; |
| |
| public boolean appliesTo(ISelection selection, |
| IConfigurationElement configuration) { |
| callcount++; |
| return false; |
| } |
| |
| static int getCallCount() { |
| return callcount; |
| } |
| |
| } |