*** empty log message ***
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/.classpath b/Article-Adapters/code/org.eclipse.articles.adapters.properties/.classpath
new file mode 100644
index 0000000..64c5e31
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/.project b/Article-Adapters/code/org.eclipse.articles.adapters.properties/.project
new file mode 100644
index 0000000..e700c1e
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.articles.adapters.properties</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/.settings/org.eclipse.jdt.core.prefs b/Article-Adapters/code/org.eclipse.articles.adapters.properties/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..fdf935a
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Mon Jun 16 14:40:02 EDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/META-INF/MANIFEST.MF b/Article-Adapters/code/org.eclipse.articles.adapters.properties/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ab4cbf3
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Properties Plug-in
+Bundle-SymbolicName: org.eclipse.articles.adapters.properties;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.eclipse.ui.views;bundle-version="3.3.0",
+ org.eclipse.articles.adapters.core;bundle-version="0.1.0",
+ org.eclipse.ui;bundle-version="3.4.0"
+Bundle-Activator: org.eclipse.articles.adapters.properties.Activator
+Bundle-ActivationPolicy: lazy
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/build.properties b/Article-Adapters/code/org.eclipse.articles.adapters.properties/build.properties
new file mode 100644
index 0000000..e9863e2
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/plugin.xml b/Article-Adapters/code/org.eclipse.articles.adapters.properties/plugin.xml
new file mode 100644
index 0000000..edac355
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/plugin.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.articles.adapters.core.Person"
+ class="org.eclipse.articles.adapters.properties.PersonPropertiesSourceAdapterFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySource">
+ </adapter>
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup></startup>
+ </extension>
+
+</plugin>
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/Activator.java b/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/Activator.java
new file mode 100644
index 0000000..fdc0978
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/Activator.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008 The Eclipse Foundation.
+ * 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:
+ * The Eclipse Foundation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.articles.adapters.properties;
+
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.ui.IStartup;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * This activator exists to force our adapter factory to work. The Properties
+ * view uses the {@link IAdapterManager#getAdapter(Object, Class)} method which
+ * only finds the adapter if the bundle that defines it has already been
+ * activated. To make sure that our bundle is activated before we need it, it
+ * defines an extension to <code>org.eclipse.ui.startup</code> which tells the
+ * workbench to start this bundle when it starts.
+ */
+public class Activator extends AbstractUIPlugin implements IStartup {
+
+ /**
+ * We don't actually need to do anything when we start. We just need this
+ * bundle to be activated so that the
+ * <code>org.eclipse.core.runtime.adapters</code> will work.
+ */
+ public void earlyStartup() {
+
+ }
+
+}
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/PersonPropertiesSourceAdapterFactory.java b/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/PersonPropertiesSourceAdapterFactory.java
new file mode 100644
index 0000000..0015c36
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/PersonPropertiesSourceAdapterFactory.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2008 The Eclipse Foundation.
+ * 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:
+ * The Eclipse Foundation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.articles.adapters.properties;
+
+import org.eclipse.articles.adapters.core.Person;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+public class PersonPropertiesSourceAdapterFactory implements IAdapterFactory {
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adapterType == IPropertySource.class)
+ return new PersonPropertySource((Person)adaptableObject);
+ return null;
+ }
+
+ public Class[] getAdapterList() {
+ return new Class[] {IPropertySource.class};
+ }
+}
diff --git a/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/PersonPropertySource.java b/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/PersonPropertySource.java
new file mode 100644
index 0000000..0c8a95f
--- /dev/null
+++ b/Article-Adapters/code/org.eclipse.articles.adapters.properties/src/org/eclipse/articles/adapters/properties/PersonPropertySource.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2008 The Eclipse Foundation.
+ * 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:
+ * The Eclipse Foundation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.articles.adapters.properties;
+
+import org.eclipse.articles.adapters.core.Person;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+
+public class PersonPropertySource implements IPropertySource {
+ private final Person person;
+
+ public PersonPropertySource(Person person) {
+ this.person = person;
+ }
+
+ public Object getEditableValue() {
+ return this;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[] {
+ new TextPropertyDescriptor("name", "Name"),
+ new TextPropertyDescriptor("street", "Street"),
+ new TextPropertyDescriptor("city", "City")
+ };
+ }
+
+ public Object getPropertyValue(Object id) {
+ if ("name".equals(id)) return person.getName();
+ else if ("street".equals(id)) return person.getStreet();
+ else if ("city".equals(id)) return person.getCity();
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if ("name".equals(id)) person.setName((String)value);
+ else if ("street".equals(id)) person.setStreet((String)value);
+ else if ("city".equals(id)) person.setCity((String)value);
+ }
+
+}
\ No newline at end of file