intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / src / net / sourceforge / phpeclipse / css / core / model / IStyleSheet.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: IStyleSheet.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 import net.sourceforge.phpeclipse.css.core.parser.IProblemCollector;
18 import net.sourceforge.phpeclipse.css.core.parser.LexicalErrorException;
19 import net.sourceforge.phpeclipse.css.core.parser.SyntaxErrorException;
20
21 import org.eclipse.core.runtime.IAdaptable;
22
23 /**
24  * 
25  */
26 public interface IStyleSheet
27         extends IAdaptable, ISourceReference {
28
29         /**
30          * Returns the rule at the specified offset into the document.
31          * 
32          * @param offset the offset
33          * @return the rule at the offset, or <code>null</code> if no rule is found
34          *         at that position
35          */
36         IRule getRuleAt(int offset);
37
38         /**
39          * Returns the list of rules in the order they have been defined in the 
40          * style sheet.
41          * 
42          * @return the list of rules contained by the style sheet
43          */
44         IRule[] getRules();
45
46         void reconcile(IProblemCollector problemCollector)
47                 throws LexicalErrorException, SyntaxErrorException;
48
49 }