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 and implementation
11 * $Id: Declaration.java,v 1.1 2004-09-02 18:07:12 jsurfer Exp $
14 package net.sourceforge.phpeclipse.css.core.internal.model;
16 import net.sourceforge.phpeclipse.core.model.ISourceReference;
17 import net.sourceforge.phpeclipse.core.model.SourceReference;
18 import net.sourceforge.phpeclipse.css.core.model.IDeclaration;
19 import net.sourceforge.phpeclipse.css.core.model.IRule;
21 import org.eclipse.jface.text.IDocument;
26 public class Declaration extends SourceReference
27 implements IDeclaration {
29 // Instance Variables ------------------------------------------------------
32 * The rule that contains this declaration.
37 * The part of the declaration that contains the property name.
39 private ISourceReference property;
42 * The value part of the declaration.
44 private ISourceReference value;
47 * The priority part of the declaration.
49 private ISourceReference priority;
51 // Constructors ------------------------------------------------------------
56 * @param document the document that contains the property
57 * @param rule the rule that contains this property, or <code>null</code> if
58 * the declaration does not belong to a specific rule
60 public Declaration(IDocument document, IRule rule) {
65 // IProperty Implementation ------------------------------------------------
68 * @see IDeclaration#getRule()
70 public final IRule getRule() {
75 * @see IDeclaration#getProperty()
77 public final ISourceReference getProperty() {
82 * @see IDeclaration#getValue()
84 public final ISourceReference getValue() {
89 * @see IDeclaration#getPriority()
91 public final ISourceReference getPriority() {
95 // Instance Variables ------------------------------------------------------
100 * @param property The property to set
102 public final void setProperty(ISourceReference property) {
103 this.property = property;
109 * @param value The value to set
111 public final void setValue(ISourceReference value) {
118 * @param priority The priority to set
120 public final void setPriority(ISourceReference priority) {
121 this.priority = priority;