blob: f0d197aaa589d4a125c3527402aef36ee878bb6b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2012 Red Hat Inc..
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mickael Istria (Red Hat) - initial API and implementation
*******************************************************************************/
package org.eclipse.swtbot.generator.framework.rules.simple;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
public class ExpandTreeItemRule extends AbstractTreeGenerationRule {
@Override
public boolean appliesTo(Event e) {
return super.appliesTo(e) && e.type == SWT.Expand;
}
@Override
public List<String> getActions() {
List<String> actions = new ArrayList<String>();
StringBuilder code = new StringBuilder();
code.append(getWidgetAccessor());
code.append(".expand()");
actions.add(code.toString());
return actions;
}
@Override
public List<String> getImports() {
// TODO Auto-generated method stub
return null;
}
}