### Eclipse Workspace Patch 1.0
#P org.eclipse.pde.ds.core
Index: src/org/eclipse/pde/internal/ds/core/IDSDocumentFactory.java
===================================================================
RCS file: /cvsroot/eclipse/pde-incubator/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/IDSDocumentFactory.java,v
retrieving revision 1.3
diff -u -r1.3 IDSDocumentFactory.java
--- src/org/eclipse/pde/internal/ds/core/IDSDocumentFactory.java 6 May 2008 14:00:24 -0000 1.3
+++ src/org/eclipse/pde/internal/ds/core/IDSDocumentFactory.java 22 May 2008 18:05:06 -0000
@@ -11,21 +11,79 @@
*******************************************************************************/
package org.eclipse.pde.internal.ds.core;
-
+/**
+ * Handles the creation of document nodes representing the types of elements
+ * that can exist in a declarative services xml file.
+ *
+ * @since 3.4
+ * @see IDSModel
+ * @see IDSComponent
+ *
+ */
public interface IDSDocumentFactory {
+ /**
+ * creates a provide
element
+ *
+ * @return IDSProvide object, containing the new element
+ * @see IDSProvide
+ * @see IDSService
+ * @see IDSComponent
+ */
public abstract IDSProvide createProvide();
+ /**
+ * creates a property
element
+ *
+ * @return IDSProperty object, containing the new element
+ * @see IDSProperty
+ * @see IDSComponent
+ */
public abstract IDSProperty createProperty();
+
+ /**
+ * creates a reference
element
+ *
+ * @return IDSReference object, containing the new element
+ * @see IDSReference
+ * @see IDSComponent
+ */
public abstract IDSReference createReference();
+ /**
+ * creates a service
element
+ *
+ * @return IDSService object, containing the new element
+ * @see IDSService
+ * @see IDSComponent
+ */
public abstract IDSService createService();
+ /**
+ * creates a properties
element
+ *
+ * @return IDSProperties object, containing the new element
+ * @see IDSProperties
+ * @see IDSComponent
+ */
public abstract IDSProperties createProperties();
+ /**
+ * creates a implementation
element
+ *
+ * @return IDSImplementation object, containing the new element
+ * @see IDSImplementation
+ * @see IDSComponent
+ */
public abstract IDSImplementation createImplementation();
+ /**
+ * creates a component
element
+ *
+ * @return IDSComponent object, containing the new element
+ * @see IDSComponent
+ */
public abstract IDSComponent createComponent();
}
Index: src/org/eclipse/pde/internal/ds/core/IDSModel.java
===================================================================
RCS file: /cvsroot/eclipse/pde-incubator/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/IDSModel.java,v
retrieving revision 1.5
diff -u -r1.5 IDSModel.java
--- src/org/eclipse/pde/internal/ds/core/IDSModel.java 13 May 2008 01:38:07 -0000 1.5
+++ src/org/eclipse/pde/internal/ds/core/IDSModel.java 22 May 2008 18:05:06 -0000
@@ -15,14 +15,51 @@
import org.eclipse.pde.core.IModel;
import org.eclipse.pde.core.IModelChangeProvider;
+/**
+ * Represents the DS Text Model
+ *
+ * @since 3.4
+ * @see IDSComponent
+ * @see IDSFactory
+ */
public interface IDSModel extends IModelChangeProvider, IModel {
+ /**
+ * Return the factory object of this model
+ *
+ * @return existing IDSDocumentfactory object, or create a new object for
+ * the first time it is called
+ */
public abstract IDSDocumentFactory getFactory();
+ /**
+ * Return the root component element of this model
+ *
+ * @return existing IDSComponent object, or create a new object for the
+ * first time it is called
+ */
public abstract IDSComponent getDSComponent();
+ /**
+ * Sets a workspace resource that this model is created from. Load/reload
+ * operations are not directly connected with the resource (although they
+ * can be). In some cases, models will load from a buffer (an editor
+ * document) rather than a resource. However, the buffer will eventually be
+ * synced up with this resource.
+ *
+ * With the caveat of stepped loading, all other properties of the + * underlying resource could be used directly (path, project etc.). + * + * @param resource + * a workspace resource (file) that this model is associated + * with. + */ public abstract void setUnderlyingResource(IResource resource); + /** + * Saves the model into the underlying resource + * + */ public abstract void save(); }