KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > services > EvaluationReference


1 /*******************************************************************************
2  * Copyright (c) 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  ******************************************************************************/

11
12 package org.eclipse.ui.internal.services;
13
14 import org.eclipse.core.expressions.Expression;
15 import org.eclipse.jface.util.IPropertyChangeListener;
16
17 /**
18  * @since 3.3
19  *
20  */

21 public class EvaluationReference extends EvaluationResultCache implements
22         IEvaluationReference {
23
24     private IPropertyChangeListener listener;
25     private String JavaDoc property;
26     private boolean postingChanges = true;
27     private IEvaluationReference targetReference;
28
29     /**
30      * @param expression
31      */

32     public EvaluationReference(Expression expression,
33             IPropertyChangeListener listener, String JavaDoc property, IEvaluationReference targetReference) {
34         super(expression);
35         this.listener = listener;
36         this.property = property;
37         this.targetReference = targetReference;
38     }
39
40     /*
41      * (non-Javadoc)
42      *
43      * @see org.eclipse.ui.internal.services.IEvaluationReference#getListener()
44      */

45     public IPropertyChangeListener getListener() {
46         return listener;
47     }
48     
49     public String JavaDoc getProperty() {
50         return property;
51     }
52     
53     /* (non-Javadoc)
54      * @see org.eclipse.ui.internal.services.IEvaluationReference#setFlopping(boolean)
55      */

56     public void setPostingChanges(boolean evaluationEnabled) {
57         this.postingChanges = evaluationEnabled;
58     }
59     
60     /* (non-Javadoc)
61      * @see org.eclipse.ui.internal.services.IEvaluationReference#isFlopping()
62      */

63     public boolean isPostingChanges() {
64         return postingChanges;
65     }
66     
67     public IEvaluationReference getTargetReference() {
68         return targetReference;
69     }
70     
71     /* (non-Javadoc)
72      * @see org.eclipse.ui.internal.services.IEvaluationReference#setTargetReference(org.eclipse.ui.internal.services.IEvaluationReference)
73      */

74     public void setTargetReference(IEvaluationReference targetReference) {
75         this.targetReference = targetReference;
76     }
77 }
78
Popular Tags