Eclipse API to remove elements and groups from Schema [message #15684] |
Mon, 31 March 2003 13:11  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.02800 seconds