Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-04-05 10:21:05 +0000
committerWilliam Chen2012-04-05 10:21:05 +0000
commite63f37ee09138e0b0a9b95564d57e10f67a33fc0 (patch)
tree491044b98d65aed1959ad0d7ca35afb0b4333337 /target_explorer/plugins/org.eclipse.tcf.te.core
parentbaf7e9de27649d62c66f030bab4d8481a18eebbe (diff)
downloadorg.eclipse.tcf-e63f37ee09138e0b0a9b95564d57e10f67a33fc0.tar.gz
org.eclipse.tcf-e63f37ee09138e0b0a9b95564d57e10f67a33fc0.tar.xz
org.eclipse.tcf-e63f37ee09138e0b0a9b95564d57e10f67a33fc0.zip
Target Explorer: Change the jface property change listener to
java.beans.PropertyChangeListener to prepare for file system plitting.
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IPropertyChangeProvider.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IViewerInput.java29
3 files changed, 82 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
index e798524b9..45917ff31 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
@@ -18,6 +18,7 @@ Bundle-Localization: plugin
Export-Package: org.eclipse.tcf.te.core.activator;x-internal:=true,
org.eclipse.tcf.te.core.adapters,
org.eclipse.tcf.te.core.async,
+ org.eclipse.tcf.te.core.interfaces,
org.eclipse.tcf.te.core.nls;x-internal:=true,
org.eclipse.tcf.te.core.nodes.interfaces.wire,
org.eclipse.tcf.te.core.utils.text
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IPropertyChangeProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IPropertyChangeProvider.java
new file mode 100644
index 000000000..ababdea4c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IPropertyChangeProvider.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.core.interfaces;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+/**
+ * A property change provider is an observable object that fires property
+ * change events, when one of its properties has changed. It has two methods,
+ * addPropertyChangeListener and removePropertyChangeListener to add
+ * and remove property change listeners which are interested in the property
+ * change.
+ *
+ * @see IViewerInput
+ * @see PropertyChangeProvider
+ * @see ProcessTreeNode
+ * @see FSTreeNode
+ */
+public interface IPropertyChangeProvider {
+
+ /**
+ * Add a property change listener to the provider. When this listener
+ * is already added, then it will not be added again.
+ *
+ * @param listener The property change listener
+ */
+ void addPropertyChangeListener(PropertyChangeListener listener);
+
+ /**
+ * Remove a property change listener from the provider if it is already
+ * added to provider.
+ *
+ * @param listener The property change listener
+ */
+ void removePropertyChangeListener(PropertyChangeListener listener);
+
+ /**
+ * Fire the property change event to the property change listeners
+ * of the provider.
+ *
+ * @param event the property change event.
+ */
+ void firePropertyChange(PropertyChangeEvent event);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IViewerInput.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IViewerInput.java
new file mode 100644
index 000000000..e08ebfb53
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IViewerInput.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.core.interfaces;
+
+/**
+ * A viewer input is an input of the AbstractTreeControl.
+ * <p>
+ * If the input of AbstractTreeControl is an instance of or adapted to IViewerInput,
+ * AbstractTreeControl adds a property change listener to the input and update
+ * its UI including the tree viewer and the tool bar when the properties of the input
+ * have changed.
+ *
+ * @see AbstractTreeControl
+ */
+public interface IViewerInput extends IPropertyChangeProvider {
+
+ /**
+ * Get the id of the input used to persist the state of the tree viewer
+ * as the persistence id.
+ */
+ String getInputId();
+}

Back to the top