2 * Copyright (c) 2003-2004 Christopher Lenz and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * Christopher Lenz - initial API
11 * $Id: IRule.java,v 1.1 2004-09-02 18:07:11 jsurfer Exp $
14 package net.sourceforge.phpeclipse.css.core.model;
16 import net.sourceforge.phpeclipse.core.model.ISourceReference;
18 import org.eclipse.core.runtime.IAdaptable;
23 public interface IRule extends IAdaptable, ISourceReference {
26 * Returns the style sheet that contains this rule.
28 * @return the style sheet
30 IStyleSheet getStyleSheet();
33 * Returns the rule in which this rule is nested, or <code>null</code> if
34 * this rule is at the top level of the style sheet.
36 * @return the parent rule
40 IRule[] getChildren();
43 * Returns the declaration at the specified offset into the rule.
45 * @param offset the offset
46 * @return the declaration at the offset, or <code>null</code> if no
47 * declaration is found at that position
49 IDeclaration getDeclarationAt(int offset);
51 IDeclaration[] getDeclarations();