| 
| Incremental update of the facet's list [message #53814] | Wed, 29 September 2004 07:26  |  | 
| Eclipse User  |  |  |  |  | Hi, 
 I have a problem with updating the list of facets after adding a new facet
 to the facet contents. Here is the corresponding code snippet:
 
 ----------------------------
 
 // load a schema
 XSDSchema schema = load("test.xsd");
 // Incrementally update the schema after each edit change
 schema.setIncrementalUpdate(true);
 
 // Build a new simple type and add it to the loaded schema
 XSDSimpleTypeDefinition baseType = (XSDSimpleTypeDefinition)
 schema.getTypeDefinitions().get(0);
 XSDSimpleTypeDefinition simpleType = XSDFactory.eINSTANCE
 .createXSDSimpleTypeDefinition();
 simpleType.setBaseTypeDefinition(baseType);
 schema.getContents().add(simpleType);
 
 // Create a new facet and add it to the type
 XSDMinLengthFacet minLength =
 XSDFactory.eINSTANCE.createXSDMinLengthFacet();
 minLength.setValue(10);
 simpleType.getFacetContents().add(minLength);
 
 // Print the facets of the type: MinLength isn't contained in the list
 System.out.println(simpleType.getFacets());
 
 // Enforce an update. Shouldn't be necessary because of the incremental
 update
 schema.update();
 // Print the facets: Now MinLength is contained
 System.out.println(simpleType.getFacets());
 
 --------------------------
 
 
 Shouldn't the manual update be unnecessary because the incremental update
 is set to true? Or did I miss something in the JavaDoc or in my code?
 
 Cheers
 Klaas
 |  |  |  | 
| 
| Re: Incremental update of the facet's list [message #53841 is a reply to message #53814] | Wed, 29 September 2004 08:49   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: merks.ca.ibm.com 
 This is a multi-part message in MIME format.
 --------------000401000803020308050008
 Content-Type: text/plain; charset=ISO-8859-15; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Klaas,
 
 It's a bug.  Please open a bugzilla.  The following change is needed:
 
 Index: XSDSimpleTypeDefinitionImpl.java
 ============================================================ =======
 RCS file:
 /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDSimpleTypeDefinitionImpl.java,v
 retrieving revision 1.3
 diff -u -r1.3 XSDSimpleTypeDefinitionImpl.java
 --- XSDSimpleTypeDefinitionImpl.java    13 Jun 2004 11:52:17
 -0000    1.3
 +++ XSDSimpleTypeDefinitionImpl.java    29 Sep 2004 12:47:13 -0000
 @@ -2059,7 +2059,8 @@
 protected void adoptContent(EReference eReference,
 XSDConcreteComponent xsdConcreteComponent)
 {
 super.adoptContent(eReference, xsdConcreteComponent);
 -    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents())
 +    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents() ||
 +          eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_FacetContent s())
 {
 traverseToRootForPatching();
 }
 @@ -2076,7 +2077,8 @@
 protected void orphanContent(EReference eReference,
 XSDConcreteComponent xsdConcreteComponent)
 {
 super.orphanContent(eReference, xsdConcreteComponent);
 -    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents())
 +    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents() ||
 +          eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_FacetContent s())
 {
 traverseToRootForPatching();
 }
 
 
 
 
 Klaas Dellschaft wrote:
 
 >Hi,
 >
 >I have a problem with updating the list of facets after adding a new facet
 >to the facet contents. Here is the corresponding code snippet:
 >
 >----------------------------
 >
 >// load a schema
 >XSDSchema schema = load("test.xsd");
 >// Incrementally update the schema after each edit change
 >schema.setIncrementalUpdate(true);
 >
 >// Build a new simple type and add it to the loaded schema
 >XSDSimpleTypeDefinition baseType = (XSDSimpleTypeDefinition)
 >        schema.getTypeDefinitions().get(0);
 >XSDSimpleTypeDefinition simpleType = XSDFactory.eINSTANCE
 >        .createXSDSimpleTypeDefinition();
 >simpleType.setBaseTypeDefinition(baseType);
 >schema.getContents().add(simpleType);
 >
 >// Create a new facet and add it to the type
 >XSDMinLengthFacet minLength =
 >XSDFactory.eINSTANCE.createXSDMinLengthFacet();
 >minLength.setValue(10);
 >simpleType.getFacetContents().add(minLength);
 >
 >// Print the facets of the type: MinLength isn't contained in the list
 >System.out.println(simpleType.getFacets());
 >
 >// Enforce an update. Shouldn't be necessary because of the incremental
 >update
 >schema.update();
 >// Print the facets: Now MinLength is contained
 >System.out.println(simpleType.getFacets());
 >
 >--------------------------
 >
 >
 >Shouldn't the manual update be unnecessary because the incremental update
 >is set to true? Or did I miss something in the JavaDoc or in my code?
 >
 >Cheers
 >Klaas
 >
 >
 >
 
 
 --------------000401000803020308050008
 Content-Type: text/html; charset=ISO-8859-15
 Content-Transfer-Encoding: 8bit
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
 <title></title>
 </head>
 <body bgcolor="#ffffff" text="#000000">
 Klaas,<br>
 <br>
 It's a bug.
 |  |  |  | 
|  | 
| 
| Re: Incremental update of the facet's list [message #54122 is a reply to message #54097] | Thu, 14 October 2004 10:25  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: merks.ca.ibm.com 
 Klaas,
 
 Not yet.  But there should be a driver later today.  (We had build
 problems last week.)  When we make a driver available we change the
 bugzilla state to fixed and add a comment indicating which driver the
 fix is in.
 
 
 Klaas Dellschaft wrote:
 
 >Hi,
 >
 >is this fix available in any of the binary distributions of XSD or is it
 >only commited to CVS at the moment? It seems to me that the current build
 >of XSD is from 2004/09/17.
 >
 >Cheers
 >Klaas
 >
 >
 >
 |  |  |  | 
| 
| Re: Incremental update of the facet's list [message #591991 is a reply to message #53814] | Wed, 29 September 2004 08:49  |  | 
| Eclipse User  |  |  |  |  | This is a multi-part message in MIME format. --------------000401000803020308050008
 Content-Type: text/plain; charset=ISO-8859-15; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Klaas,
 
 It's a bug.  Please open a bugzilla.  The following change is needed:
 
 Index: XSDSimpleTypeDefinitionImpl.java
 ============================================================ =======
 RCS file:
 /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDSimpleTypeDefinitionImpl.java,v
 retrieving revision 1.3
 diff -u -r1.3 XSDSimpleTypeDefinitionImpl.java
 --- XSDSimpleTypeDefinitionImpl.java    13 Jun 2004 11:52:17
 -0000    1.3
 +++ XSDSimpleTypeDefinitionImpl.java    29 Sep 2004 12:47:13 -0000
 @@ -2059,7 +2059,8 @@
 protected void adoptContent(EReference eReference,
 XSDConcreteComponent xsdConcreteComponent)
 {
 super.adoptContent(eReference, xsdConcreteComponent);
 -    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents())
 +    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents() ||
 +          eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_FacetContent s())
 {
 traverseToRootForPatching();
 }
 @@ -2076,7 +2077,8 @@
 protected void orphanContent(EReference eReference,
 XSDConcreteComponent xsdConcreteComponent)
 {
 super.orphanContent(eReference, xsdConcreteComponent);
 -    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents())
 +    if (eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_Contents() ||
 +          eReference ==
 XSDPackage.eINSTANCE.getXSDSimpleTypeDefinition_FacetContent s())
 {
 traverseToRootForPatching();
 }
 
 
 
 
 Klaas Dellschaft wrote:
 
 >Hi,
 >
 >I have a problem with updating the list of facets after adding a new facet
 >to the facet contents. Here is the corresponding code snippet:
 >
 >----------------------------
 >
 >// load a schema
 >XSDSchema schema = load("test.xsd");
 >// Incrementally update the schema after each edit change
 >schema.setIncrementalUpdate(true);
 >
 >// Build a new simple type and add it to the loaded schema
 >XSDSimpleTypeDefinition baseType = (XSDSimpleTypeDefinition)
 >        schema.getTypeDefinitions().get(0);
 >XSDSimpleTypeDefinition simpleType = XSDFactory.eINSTANCE
 >        .createXSDSimpleTypeDefinition();
 >simpleType.setBaseTypeDefinition(baseType);
 >schema.getContents().add(simpleType);
 >
 >// Create a new facet and add it to the type
 >XSDMinLengthFacet minLength =
 >XSDFactory.eINSTANCE.createXSDMinLengthFacet();
 >minLength.setValue(10);
 >simpleType.getFacetContents().add(minLength);
 >
 >// Print the facets of the type: MinLength isn't contained in the list
 >System.out.println(simpleType.getFacets());
 >
 >// Enforce an update. Shouldn't be necessary because of the incremental
 >update
 >schema.update();
 >// Print the facets: Now MinLength is contained
 >System.out.println(simpleType.getFacets());
 >
 >--------------------------
 >
 >
 >Shouldn't the manual update be unnecessary because the incremental update
 >is set to true? Or did I miss something in the JavaDoc or in my code?
 >
 >Cheers
 >Klaas
 >
 >
 >
 
 
 --------------000401000803020308050008
 Content-Type: text/html; charset=ISO-8859-15
 Content-Transfer-Encoding: 8bit
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
 <title></title>
 </head>
 <body bgcolor="#ffffff" text="#000000">
 Klaas,<br>
 <br>
 It's a bug.
 |  |  |  | 
|  | 
| 
| Re: Incremental update of the facet's list [message #592138 is a reply to message #54097] | Thu, 14 October 2004 10:25  |  | 
| Eclipse User  |  |  |  |  | Klaas, 
 Not yet.  But there should be a driver later today.  (We had build
 problems last week.)  When we make a driver available we change the
 bugzilla state to fixed and add a comment indicating which driver the
 fix is in.
 
 
 Klaas Dellschaft wrote:
 
 >Hi,
 >
 >is this fix available in any of the binary distributions of XSD or is it
 >only commited to CVS at the moment? It seems to me that the current build
 >of XSD is from 2004/09/17.
 >
 >Cheers
 >Klaas
 >
 >
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.06666 seconds