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
diff --git a/archive/net.sourceforge.phpeclipse.css.core/src/net/sourceforge/phpeclipse/css/core/model/IStyleSheet.java b/archive/net.sourceforge.phpeclipse.css.core/src/net/sourceforge/phpeclipse/css/core/model/IStyleSheet.java
new file mode 100644 (file)
index 0000000..4a2239d
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2003-2004 Christopher Lenz and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     Christopher Lenz - initial API
+ * 
+ * $Id: IStyleSheet.java,v 1.1 2004-09-02 18:07:11 jsurfer Exp $
+ */
+
+package net.sourceforge.phpeclipse.css.core.model;
+
+import net.sourceforge.phpeclipse.core.model.ISourceReference;
+import net.sourceforge.phpeclipse.css.core.parser.IProblemCollector;
+import net.sourceforge.phpeclipse.css.core.parser.LexicalErrorException;
+import net.sourceforge.phpeclipse.css.core.parser.SyntaxErrorException;
+
+import org.eclipse.core.runtime.IAdaptable;
+
+/**
+ * 
+ */
+public interface IStyleSheet
+       extends IAdaptable, ISourceReference {
+
+       /**
+        * Returns the rule at the specified offset into the document.
+        * 
+        * @param offset the offset
+        * @return the rule at the offset, or <code>null</code> if no rule is found
+        *         at that position
+        */
+       IRule getRuleAt(int offset);
+
+       /**
+        * Returns the list of rules in the order they have been defined in the 
+        * style sheet.
+        * 
+        * @return the list of rules contained by the style sheet
+        */
+       IRule[] getRules();
+
+       void reconcile(IProblemCollector problemCollector)
+               throws LexicalErrorException, SyntaxErrorException;
+
+}