blob: d4d466a03f0ca26d63d0377e48698e475979ca40 [file] [log] [blame]
/*********************************************************************
* Copyright (c) 2005, 2019 SAP SE
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* SAP SE - initial API, implementation and documentation
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipse.graphiti.testtool.sketch.features;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
import org.eclipse.graphiti.mm.pictograms.Diagram;
public class DoubleClickFeature extends AbstractCustomFeature {
public static boolean executed = false;
public DoubleClickFeature(IFeatureProvider fp) {
super(fp);
}
@Override
public boolean canExecute(ICustomContext context) {
return context.getInnerPictogramElement() instanceof Diagram;
}
@Override
public boolean hasDoneChanges() {
return false;
}
public void execute(ICustomContext context) {
executed = true;
}
}