Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » hooking up xml outline view to custom xml contentType
hooking up xml outline view to custom xml contentType [message #103411] Fri, 13 May 2005 07:46 Go to next message
Eclipse UserFriend
Hi,

next issue on my line:

I have created a custom contentType in my plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="org.mozilla.solid"
name="Whack Plug-in"
version="1.0.0"
provider-name="Axel Hecht"
class="whack.WhackPlugin">
<extension
point="org.eclipse.core.runtime.contentTypes">
<content-type
file-extensions="xul"
priority="high"
name="Mozilla XUL Content Type"
id="xul"
base-type="org.eclipse.core.runtime.xml"
default-charset="UTF-8" />
</extension>
<extension
point="org.eclipse.wst.sse.ui.extendedconfiguration">
<configuration type="contentoutlineconfiguration"

class=" org.eclipse.wst.xml.ui.internal.views.contentoutline.XMLCont entOutlineConfiguration "
target="org.mozilla.solid.xul" />
</extension>
....
</plugin>

Most of the stuff in the plugin.xml works, just the outline in the
running instance claims that an outline view for my editor wouldn't be
available.
(The editor is a multipage editor with
org.eclipse.wst.xml.ui.internal.provisional.StructuredTextEd itorXML as
one of it's pages, which works like charm)

Any hints?

Thanks

Axel
Re: hooking up xml outline view to custom xml contentType [message #103443 is a reply to message #103411] Fri, 13 May 2005 08:45 Go to previous messageGo to next message
Eclipse UserFriend
huhu axel,

take a look at Orangevolt XLST Eclipse Plugin
(eclipsexslt.sourceforge.net).

i've also implemented an custom xml outline.

look into the cvs to see how its done.

many regards,

lars

Axel Hecht wrote:
> Hi,
>
> next issue on my line:
>
> I have created a custom contentType in my plugin.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.0"?>
> <plugin
> id="org.mozilla.solid"
> name="Whack Plug-in"
> version="1.0.0"
> provider-name="Axel Hecht"
> class="whack.WhackPlugin">
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> file-extensions="xul"
> priority="high"
> name="Mozilla XUL Content Type"
> id="xul"
> base-type="org.eclipse.core.runtime.xml"
> default-charset="UTF-8" />
> </extension>
> <extension
> point="org.eclipse.wst.sse.ui.extendedconfiguration">
> <configuration type="contentoutlineconfiguration"
>
> class=" org.eclipse.wst.xml.ui.internal.views.contentoutline.XMLCont entOutlineConfiguration "
>
> target="org.mozilla.solid.xul" />
> </extension>
> ...
> </plugin>
>
> Most of the stuff in the plugin.xml works, just the outline in the
> running instance claims that an outline view for my editor wouldn't be
> available.
> (The editor is a multipage editor with
> org.eclipse.wst.xml.ui.internal.provisional.StructuredTextEd itorXML as
> one of it's pages, which works like charm)
>
> Any hints?
>
> Thanks
>
> Axel
Re: hooking up xml outline view to custom xml contentType [message #103469 is a reply to message #103443] Fri, 13 May 2005 09:19 Go to previous messageGo to next message
Eclipse UserFriend
lars gersmann wrote:
> huhu axel,
>
> take a look at Orangevolt XLST Eclipse Plugin
> (eclipsexslt.sourceforge.net).
>
> i've also implemented an custom xml outline.
>
> look into the cvs to see how its done.
>
> many regards,
>
> lars
>

Thanks for the tip, but I basically want to do it the other way around.

You created a custom outline for xml types, I want the the standard xml
outline for my custom type.

The odd thing is, the same content as plain.xml opens in the XML
Source Page Editor and has an outline, the content as plain.xul opens in
my editor with the XML SourcePageEditor as a page and doesn't.

do I need to debug anything?

Axel
Re: hooking up xml outline view to custom xml contentType [message #103509 is a reply to message #103469] Fri, 13 May 2005 10:03 Go to previous messageGo to next message
Eclipse UserFriend
Axel Hecht wrote:
> Thanks for the tip, but I basically want to do it the other way around.
>
> You created a custom outline for xml types, I want the the standard xml
> outline for my custom type.
>
> The odd thing is, the same content as plain.xml opens in the XML
> Source Page Editor and has an outline, the content as plain.xul opens in
> my editor with the XML SourcePageEditor as a page and doesn't.
>
> do I need to debug anything?

If the Outline or Properties views are open, activating an editor
will cause them to call .getAdapter() on your editor part for
IContentOutlinePage and IPropertySheetPage. If you've embedded a
StructuredTextEditor instance, you might just need to pass on those
requests to it. In general, you might want to forward any
getAdapter() calls you're not handling on your own to the
StructuredTextEditor instance.

--
- Nitin
Re: hooking up xml outline view to custom xml contentType [message #103677 is a reply to message #103509] Fri, 13 May 2005 13:57 Go to previous messageGo to next message
Eclipse UserFriend
Nitin Dahyabhai wrote:
> Axel Hecht wrote:
>
>> Thanks for the tip, but I basically want to do it the other way around.
>>
>> You created a custom outline for xml types, I want the the standard
>> xml outline for my custom type.
>>
>> The odd thing is, the same content as plain.xml opens in the XML
>> Source Page Editor and has an outline, the content as plain.xul opens
>> in my editor with the XML SourcePageEditor as a page and doesn't.
>>
>> do I need to debug anything?
>
>
> If the Outline or Properties views are open, activating an editor will
> cause them to call .getAdapter() on your editor part for
> IContentOutlinePage and IPropertySheetPage. If you've embedded a
> StructuredTextEditor instance, you might just need to pass on those
> requests to it. In general, you might want to forward any getAdapter()
> calls you're not handling on your own to the StructuredTextEditor instance.
>

Aaaaahhhh, that works. Thanks a lot.

Now I see a java.lang.NullPointerException

with the stacktrace below, does that ring a bell with anyone?

Axel

at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1484)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2309)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:832)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
at org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2115)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2138)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2163)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2471)
at
org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at
org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at
org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
at
org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at
org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1488)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2309)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:832)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:614)
at org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
at
org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildXSDMo del(XSDImpl.java:211)
at
org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildCMDoc ument(XSDImpl.java:172)
at
org.eclipse.wst.xsd.contentmodel.internal.CMDocumentFactoryX SD.createCMDocument(CMDocumentFactoryXSD.java:61)
at
org.eclipse.wst.xml.core.internal.contentmodel.ContentModelM anager.createCMDocument(ContentModelManager.java:56)
at
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl.buildCMDocument(CMDocumentManagerImp l.java:277)
at
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$AsyncBuildOperation.run(CMDocumentMa nagerImpl.java:262)
at
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$1.run(CMDocumentManagerImpl.java:228 )
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67)
Re: hooking up xml outline view to custom xml contentType [message #103909 is a reply to message #103677] Sat, 14 May 2005 14:54 Go to previous messageGo to next message
Eclipse UserFriend
From the stack trace it looks like you're hitting a problem loading an the
XSD model. There's might be something peculiar about your schema that
causes the XSD model to choke. Can you reproduce this with the 'standard'
XML editor? If so open a bug and attach your schema and I'll take a look.

> Aaaaahhhh, that works. Thanks a lot.

> Now I see a java.lang.NullPointerException

> with the stacktrace below, does that ring a bell with anyone?

> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1484)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2309)
> at
>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:832)
> at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
> at
>
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
> at org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2115)
> at
>
org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2138)
> at
>
org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2163)
> at
>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2471)
> at
>
org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
> at
>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
> at
> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
> at
>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
> at
>
org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
> at
>
org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
> at
>
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
> at
>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
> at
>
org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
> at
>
org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
> at
>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1488)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2309)
> at
>
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:832)
> at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:471)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:614)
> at org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
> at
>
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:518)
> at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:484)
> at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:413)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
> at
>
org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildXSDMo del(XSDImpl.java:211)
> at
>
org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildCMDoc ument(XSDImpl.java:172)
> at
>
org.eclipse.wst.xsd.contentmodel.internal.CMDocumentFactoryX SD.createCMDocument(CMDocumentFactoryXSD.java:61)
> at
>
org.eclipse.wst.xml.core.internal.contentmodel.ContentModelM anager.createCMDocument(ContentModelManager.java:56)
> at
>
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl.buildCMDocument(CMDocumentManagerImp l.java:277)
> at
>
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$AsyncBuildOperation.run(CMDocumentMa nagerImpl.java:262)
> at
>
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$1.run(CMDocumentManagerImpl.java:228 )
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67)It looks
Re: hooking up xml outline view to custom xml contentType [message #104588 is a reply to message #103909] Tue, 17 May 2005 07:13 Go to previous messageGo to next message
Eclipse UserFriend
Craig Salter wrote:
> From the stack trace it looks like you're hitting a problem loading an
> the XSD model. There's might be something peculiar about your schema
> that causes the XSD model to choke. Can you reproduce this with the
> 'standard' XML editor? If so open a bug and attach your schema and I'll
> take a look.
>

I'll take a mental note of that, as I can't reproduce it today.

Maybe some of that code is allergic to sunlight. That'd make it safe
today :-/.

Axel
Re: hooking up xml outline view to custom xml contentType [message #120809 is a reply to message #103469] Thu, 14 July 2005 11:46 Go to previous message
Eclipse UserFriend
Axel Hecht wrote:
> lars gersmann wrote:
>
>> huhu axel,
>>
>> take a look at Orangevolt XLST Eclipse Plugin
>> (eclipsexslt.sourceforge.net).
>>
>> i've also implemented an custom xml outline.
>>
>> look into the cvs to see how its done.
>>
>> many regards,
>>
>> lars
>>
>
> Thanks for the tip, but I basically want to do it the other way around.
>
> You created a custom outline for xml types, I want the the standard xml
> outline for my custom type.
>
> The odd thing is, the same content as plain.xml opens in the XML
> Source Page Editor and has an outline, the content as plain.xul opens in
> my editor with the XML SourcePageEditor as a page and doesn't.
>
> do I need to debug anything?
>
> Axel

hi axel,

i've looked into your solid plugin because i am also addicted to xul :-)

i have imported the xulplanet schema but eclipse seems not to work with
xul files ...

back to your mail.

your reply is not really true. i did not reimplement the wtp xml
outline. i just overlay the wtp jnodeinterface using wtp extension
points which is really elegant. not that much code. and its the real wtp
xml outline.

i will add a xul outline configuration to the xslt plugin.

have fun,

lars
Previous Topic:EJB validator and IllegalStateException
Next Topic:adapter factory problem while porting to wtp1.0m5
Goto Forum:
  


Current Time: Thu Apr 24 10:51:54 EDT 2025

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

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

Back to the top