intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / src / net / sourceforge / phpeclipse / css / core / model / IRule.java
1 /*
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
7  * 
8  * Contributors:
9  *     Christopher Lenz - initial API
10  * 
11  * $Id: IRule.java,v 1.1 2004-09-02 18:07:11 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.css.core.model;
15
16 import net.sourceforge.phpeclipse.core.model.ISourceReference;
17
18 import org.eclipse.core.runtime.IAdaptable;
19
20 /**
21  * 
22  */
23 public interface IRule extends IAdaptable, ISourceReference {
24
25         /**
26          * Returns the style sheet that contains this rule.
27          * 
28          * @return the style sheet
29          */
30         IStyleSheet getStyleSheet();
31
32         /**
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.
35          * 
36          * @return the parent rule
37          */
38         IRule getParent();
39
40         IRule[] getChildren();
41
42         /**
43          * Returns the declaration at the specified offset into the rule.
44          * 
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
48          */
49         IDeclaration getDeclarationAt(int offset);
50
51         IDeclaration[] getDeclarations();
52
53 }