Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » Eclipse API to remove elements and groups from Schema
Eclipse API to remove elements and groups from Schema [message #15684] Mon, 31 March 2003 13:11 Go to next message
Eclipse UserFriend
Hi,

Ed, thanks for your help. Am stuck with another problem. I am trying to
gather some code which can edit a schema but I cant seem to find any
relevant API within Eclipse which would allow us to remove or delete
elements from the schema. The only other way I can think of is loading the
EList items, removing the corresponding items and their references and
then saving them onto the schema. Am I correct?
thanks

kaunteya
Re: Eclipse API to remove elements and groups from Schema [message #15732 is a reply to message #15684] Mon, 31 March 2003 15:59 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Kaunteya,

There is no high level "remove element" method. There are methods like
EcoreUtil.remove(EObject) that would generally help, but removing an element
declaration will often require removing its containing particle as well.
Loading the model and editing its parts is the way to go...


kaunteya bhattacharya wrote:

> Hi,
>
> Ed, thanks for your help. Am stuck with another problem. I am trying to
> gather some code which can edit a schema but I cant seem to find any
> relevant API within Eclipse which would allow us to remove or delete
> elements from the schema. The only other way I can think of is loading the
> EList items, removing the corresponding items and their references and
> then saving them onto the schema. Am I correct?
> thanks
>
> kaunteya
Re: Eclipse API to remove elements and groups from Schema [message #15746 is a reply to message #15684] Mon, 31 March 2003 15:57 Go to previous message
Eclipse UserFriend
Hello,

This is in the FAQ.

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/faq.html

It is under bullet 5 in the Programming Tricks.

How do I remove a component from the Schema?
There is generic support for remove in EMF:

EcoreUtil.remove
The removed component will look like an unresolved reference to any
components that still reference it.

Dave
email: spriet@ca.ibm.com

"kaunteya bhattacharya" <bhatta98@hotmail.com> wrote in message
news:b6a0c0$q64$1@rogue.oti.com...
> Hi,
>
> Ed, thanks for your help. Am stuck with another problem. I am trying to
> gather some code which can edit a schema but I cant seem to find any
> relevant API within Eclipse which would allow us to remove or delete
> elements from the schema. The only other way I can think of is loading the
> EList items, removing the corresponding items and their references and
> then saving them onto the schema. Am I correct?
> thanks
>
> kaunteya
>
Re: Eclipse API to remove elements and groups from Schema [message #566989 is a reply to message #15684] Mon, 31 March 2003 15:59 Go to previous message
Eclipse UserFriend
Kaunteya,

There is no high level "remove element" method. There are methods like
EcoreUtil.remove(EObject) that would generally help, but removing an element
declaration will often require removing its containing particle as well.
Loading the model and editing its parts is the way to go...


kaunteya bhattacharya wrote:

> Hi,
>
> Ed, thanks for your help. Am stuck with another problem. I am trying to
> gather some code which can edit a schema but I cant seem to find any
> relevant API within Eclipse which would allow us to remove or delete
> elements from the schema. The only other way I can think of is loading the
> EList items, removing the corresponding items and their references and
> then saving them onto the schema. Am I correct?
> thanks
>
> kaunteya
Re: Eclipse API to remove elements and groups from Schema [message #567012 is a reply to message #15684] Mon, 31 March 2003 15:57 Go to previous message
Eclipse UserFriend
Hello,

This is in the FAQ.

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/faq.html

It is under bullet 5 in the Programming Tricks.

How do I remove a component from the Schema?
There is generic support for remove in EMF:

EcoreUtil.remove
The removed component will look like an unresolved reference to any
components that still reference it.

Dave
email: spriet@ca.ibm.com

"kaunteya bhattacharya" <bhatta98@hotmail.com> wrote in message
news:b6a0c0$q64$1@rogue.oti.com...
> Hi,
>
> Ed, thanks for your help. Am stuck with another problem. I am trying to
> gather some code which can edit a schema but I cant seem to find any
> relevant API within Eclipse which would allow us to remove or delete
> elements from the schema. The only other way I can think of is loading the
> EList items, removing the corresponding items and their references and
> then saving them onto the schema. Am I correct?
> thanks
>
> kaunteya
>
Previous Topic:ComplexTypeDefinition missing when encapsulated in an element
Next Topic:ComplexTypeDefinition missing when encapsulated in an element
Goto Forum:
  


Current Time: Sat Jun 07 06:47:11 EDT 2025

Powered by FUDForum. Page generated in 0.02800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top