Thanks Jesper,

I've been playing around with it and ended up deciding to create a new
workspace, this reduced the errors to just three:

Referenced identifier
'org.eclipse.wst.common.snippets.internal.ui.SnippetsView' in attribute 'id'
cannot be found plugin.xml /org.eclipse.wst.xml.ui line 1610 Plug-in Problem
Referenced identifier 'org.eclipse.wst.dtd.ui.internal.wizard.NewDTDWizard'
in attribute 'id' cannot be found plugin.xml /org.eclipse.wst.xml.ui line
1619 Plug-in Problem
Referenced identifier 'org.eclipse.wst.xsd.ui.internal.wizards.NewXSDWizard'
in attribute 'id' cannot be found plugin.xml /org.eclipse.wst.xml.ui line
1618 Plug-in Problem

And 4413 warnings about dead code and discouraged access from what I can see
given the filter.

So I must have corrupted the target platform settings in that workspace or
something.



Anyway, I've made progress using Eugene's suggestion... I've now got a third
tab called 'Preview' showing a simple hello world SWT label.  This is the
code for the editor:


public class WTKXEditor extends XMLMultiPageEditorPart {


 private StructuredTextEditor fTextEditor;


 private PivotPreviewControl fPreview;


 @Override

protected void createPages() {

super.createPages();

setupPreviewPage();

}


 private void setupPreviewPage() {


 // create the page

fPreview = new PivotPreviewControl(getContainer(), getDocument());


 // add the page

setPageText(addPage(fPreview), "Preview");


 }


 @Override

public void dispose() {

fPreview.dispose();

super.dispose();

}


 private IDocument getDocument() {

IDocument document = null;

if (fTextEditor != null) {

document = fTextEditor.getDocumentProvider().getDocument(

fTextEditor.getEditorInput());

}

return document;

}


 @Override

public int addPage(IEditorPart editor, IEditorInput input)

throws PartInitException {


 if (editor instanceof StructuredTextEditor) {

fTextEditor = (StructuredTextEditor) editor;

}


 return super.addPage(editor, input);

}


}


Feeling productive now, so thanks for your help, though any further comments
always welcome. :)

Cheers,
Chris


2009/11/14 Jesper Møller <jes...@selskabet.org>

> You are right in the assumptions about MANIFEST.MF, but the 3000 errors
> must be trying to tell you otherwise. Does the PDE editor for plugin.xml
> give you any warnings if you open it?
>
> You may want to take a look at how the XSD editor is constructed, it
> extends the XML editor, altough it only reuses the source page.
>
> Other sources of inspiration might be the JBoss IDE's Seam "page.xml"
> editor, or the tooling for faces-config.xml (I don't know if that is from
> WTP or JBoss IDE, in fact).
>
> You needn't check out the source to peek at the source, and to extend the
> editor, though, you can add the SDK feature from Software Update,  create
> your plugin and specify the xml bundles, and then you can explore them with
> source from your workspace. Or you can import them as projects using the PDE
> import wizard, sing the  "as full projects with source" option.
>
> Hope this helps!
>
> -Jesper
>
> On 14/11/2009, at 20.50, Christopher Brind wrote:
>
>
> Doesn't look like there is an extension point for this, so I decided to
> look at the source.
>
> I found the code in CVS for the version I have in my current Eclipse setup
> (org.eclipse.wst.xml.ui_1.1.1.v200908242115), so I checked out that version
> from CVS but it doesn't compile.
>
> The MANIFEST.MF has no problems, but the plugin.xml complains about some
> missing IDs.  The rest of the problems (3000+) are Java compilation errors
> for things like missing SWT widgets.
>
> I checked my target platform and it is set to 'Running Platform' - so I
> would expect it to be able to find everything it needs to compile since the
> MANIFEST.MF has no problems, right?
>
> I'm running on Mac OS 10.6, with Eclipse:
> Version: 3.5.1
> Build id: M20090917-0800
>
> My plan was to see if I could add an extension point and then contribute
> the patch.
>
> Any ideas how to get this compiling?
>
> At this stage I might fall back on the XML editor in the plugin wizard, but
> I really wanted the WST XML Editor functionality since it is extremely rich
> in comparison to the plugin template XML editor.
>
> Thanks again.
>
> Cheers,
> Chris
>
>
>
> 2009/11/14 Christopher Brind <bri...@brindy.org.uk>
>
>> OK, I found the documentation on creating my own content types here:
>>
>> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/runtime_content.htm
>>
>> So any thoughts about adding a new page to the XML editor?
>>
>> Thanks in advance.
>>
>>
>>
>> 2009/11/14 Christopher Brind <bri...@brindy.org.uk>
>>
>> Hi,
>>>
>>> Having Googled the web and mail archives I'm hoping someone can point me
>>> in the right direction of some documentation or articles on how to extend
>>> the XML editor.
>>>
>>> I can see that the editor has two pages, Design and Source.  I'd like to
>>> add a third page which renders the XML in a particular way (for those who
>>> are interested, in order to render an Apache Pivot layout).
>>>
>>> Also, is it possible to have my plug-in programatically add the extension
>>> to the list of those that the XML editor can handle?
>>>
>>> Any help is greatly appreciated.  Thanks in advance.
>>>
>>> Cheers,
>>> Chris
>>>
>>>
>>
> _______________________________________________
> wtp-dev mailing list
> wtp-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/wtp-dev
>
>
>
> _______________________________________________
> wtp-dev mailing list
> wtp-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/wtp-dev
>
>
_______________________________________________
wtp-dev mailing list
wtp-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Reply via email to