|
|
|
Re: Using XML Editor in my plugin - is there some clean way ? [message #126235 is a reply to message #125396] |
Wed, 27 July 2005 07:50 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: news.brkerez.cz
> The not so really clean way I used was to use
> org.eclipse.wst.xml.ui.internal.provisional.StructuredTextEd itorXML
> in one of my tabs of my editor. If you want the XML outline to work,
> then you need to implement getAdapter and feed that into the
> StructuredTextEditorXML.
please can you provide me with some details about getAdapter
implementation in my class ? :)
> You want to declare a content type that derives from XML one. That
> worked like charm for me. See my snippet below for hooking up the
> content type and the schema for my content type and namespace.
Thanks, now it works ;) But with one small problem - syntax highlighting
is not active immediately after opening source page, it's active after I
start to edit the source... But this is maybee problem of our
implementation... When I use XMLMultiPageEditorPart, it's ok but in this
case there is another problem - this class has not getDocumentProvider()
method implemented and it's needed on some places in our plugin...
Can I ask what i the difference or relationship between
XMLMultiPageEditorPart and StructuredTextEditorXML ?
|
|
|
|
Re: Using XML Editor in my plugin - is there some clean way ? [message #126879 is a reply to message #126746] |
Thu, 28 July 2005 13:22 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: news.brkerez.cz
ok thanks for your answers ! It's obvious I have to learn some more things
about eclipse editor architecture ;)
Axel Hecht wrote:
> You can ask, but I can't answer. I'm just forwarding the little things I
> learnt recently, understanding the code is not yet part of my game.
> Axel
|
|
|
Re: Using XML Editor in my plugin - is there some clean way ? [message #127011 is a reply to message #126746] |
Thu, 28 July 2005 17:51 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: amywu.us.DELETETHISPART.ibm.com
When you need to call getDocumentProvider, what you can do is call
getAdapter(ITextEditor.class) and that should return an ITextEditor back to
you. There is a getDocumentProvider() method on that interface.
StructuredTextEditorXML is the XML Source Page editor. It is just 1 single
page editor. The XMLMultiPageEditor contains a design and source page. The
source page it contains is StructuredTextEditorXML.
Hope this helps.
"Axel Hecht" <axel@pike.org> wrote in message
news:dcabfb$eet$1@news.eclipse.org...
> Pavel Trka wrote:
> >
> >> The not so really clean way I used was to use
> >> org.eclipse.wst.xml.ui.internal.provisional.StructuredTextEd itorXML
> >> in one of my tabs of my editor. If you want the XML outline to work,
> >> then you need to implement getAdapter and feed that into the
> >> StructuredTextEditorXML.
> >
> >
> > please can you provide me with some details about getAdapter
> > implementation in my class ? :)
> >
>
> It looks like this in my class:
>
> /**
> * Get Adaptable from ourselves, or from the XML source editor
page
> */
> public Object getAdapter(Class adapter) {
> Object retObject = null;
> if (editor != null) {
> retObject = editor.getAdapter(adapter);
> }
> if (retObject != null)
> return retObject;
> return super.getAdapter(adapter);
> }
>
> >
> >> You want to declare a content type that derives from XML one. That
> >> worked like charm for me. See my snippet below for hooking up the
> >> content type and the schema for my content type and namespace.
> >
> >
> > Thanks, now it works ;) But with one small problem - syntax highlighting
> > is not active immediately after opening source page, it's active after I
> > start to edit the source... But this is maybee problem of our
> > implementation... When I use XMLMultiPageEditorPart, it's ok but in this
> > case there is another problem - this class has not getDocumentProvider()
> > method implemented and it's needed on some places in our plugin...
> >
> > Can I ask what i the difference or relationship between
> > XMLMultiPageEditorPart and StructuredTextEditorXML ?
> >
>
> You can ask, but I can't answer. I'm just forwarding the little things I
> learnt recently, understanding the code is not yet part of my game.
>
> Axel
|
|
|
Re: Using XML Editor in my plugin - is there some clean way ? [message #127407 is a reply to message #127011] |
Fri, 29 July 2005 14:55 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: news.brkerez.cz
hi,
Amy Wu wrote:
> When you need to call getDocumentProvider, what you can do is call
> getAdapter(ITextEditor.class) and that should return an ITextEditor back to
> you. There is a getDocumentProvider() method on that interface.
thanks I'll try it when there will be some free time...
> StructuredTextEditorXML is the XML Source Page editor. It is just 1 single
> page editor. The XMLMultiPageEditor contains a design and source page. The
> source page it contains is StructuredTextEditorXML.
Im dumb :) This was of course the first thing that I was thinking about,
names of classes are pretty self-explanatory... Then I tried it (replacing
XMLMultiPageEditorPart by StructuredTextEditorXML), but (hell knows why) I
was surprised because I had still design page when I opened my deploy file
so I was confused and asking here... Now I tried it again and of course
there is source page only :) I dont know what I was doing before, maybee
I didnt compile or run it right, hell knows :) Thanks anyway
> Hope this helps.
sure, any answers are welcome...
|
|
|
Powered by
FUDForum. Page generated in 0.03872 seconds