1 /*******************************************************************************
\r
2 * Copyright (c) 2006 Sybase, Inc. and others.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * Sybase, Inc. - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.eclipse.jst.pagedesigner.css2.style;
\r
14 import org.eclipse.jst.pagedesigner.css2.ICSSStyle;
\r
20 public final class StyleUtil {
\r
23 * @return true if the style is in a widget
\r
25 public static boolean isInWidget(ICSSStyle style) {
\r
26 while (style != null && style != DefaultStyle.getInstance()) {
\r
27 ITagEditInfo info = (ITagEditInfo) style
\r
28 .getAdapter(ITagEditInfo.class);
\r
29 if (info != null && info.isWidget()) {
\r
33 style = style.getParentStyle();
\r