blob: e2109eb7b9eb2aaf186e51b6af9db3c3afc668a6 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) 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:
* Soyatec - initial API and implementation
*******************************************************************************/
package org.eclipse.xwt.tools.ui.designer.properties.tabbed.sections.filters;
import org.eclipse.gef.EditPart;
import org.eclipse.jface.viewers.IFilter;
import org.eclipse.xwt.tools.ui.designer.layouts.LayoutDataType;
import org.eclipse.xwt.tools.ui.designer.layouts.LayoutsHelper;
import org.eclipse.xwt.tools.ui.designer.layouts.pages.AssistancePageFactory;
/**
* @author jliu (jin.liu@soyatec.com)
*/
public class LayoutDataSectionFilter implements IFilter {
public boolean select(Object toTest) {
if (toTest instanceof EditPart) {
LayoutDataType layoutDataType = LayoutsHelper
.getLayoutDataType((EditPart) toTest);
return AssistancePageFactory.isSupport(layoutDataType);
}
return false;
}
}