Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Content Assist from XML Schema in StructuredTextEditor does not work..

Are you saying only content assist from xml schema doesn't work? Or content assist in general doesn't work?  
Does it work in the regular XML editor?  If it doesn't, then it's a problem with the xml file.
Do the xml template proposals show up? (like xml comment)  If it doesn't, then content assist doesn't work in general in the source editor of your multipage editor.

Try overriding the createSite method in your multipage editor to include the following:

* @see org.eclipse.ui.part.MultiPageEditorPart#createSite(org.eclipse.ui.IEditorPart)
protected IEditorSite createSite(IEditorPart page) {
                IEditorSite site = null;
                if (page == editor) {
                                 site = new MultiPageEditorSite(this, page) {
                                                  public String getId() {
                                                                   // Sets this ID so nested editor is configured for XML source
                                                                   return ContentTypeIdForXML.ContentTypeID_XML + ".source"; //$NON-NLS-1$;
                else {
                                 site = super.createSite(page);
                return site;

Amy Wu
905.413.2522, T/L 313-2522

Nicholas Loulloudes <loulloudes.n@xxxxxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx

12/12/2007 08:44 AM

Please respond to
"General discussion of project-wide or architectural issues."        <wtp-dev@xxxxxxxxxxx>

[wtp-dev] Content Assist from XML Schema in StructuredTextEditor        does not work..

Hi all,

I am trying to use the WebTools StructuredTextEditor in one Multipage (MPE) editor i am developing for editing some files with XML content.

So far i have managed to include the StructuredTextEditor (see code below) in the MPE and i have also specified an extension point for the specific extension to be handled as XML.

 protected void addPages()
try {
     addPage( this.page1 );
     addPage( this.pag2 );

catch (PartInitException e) {    
     Activator.logException( e );      

private void addResourceEditorPage()throws PartInitException{
  this.sourcePageIndex = addPage(getSourceEditor(),   getEditorInput());


private StructuredTextEditor getSourceEditor()
if (this.editor == null)
      this.editor =
new StructuredTextEditor();  
this );
return this.editor;

The problem i am facing is that the Content Assist functionality does not work. The XML files i am editing include the location of the XML schema's.

<?xml version="1.0" encoding="UTF-8"?>
<jsdl:RootDocument xmlns:js=

Any suggestions on how to solve this problem? Is there is something additional that i have to do ?

Thanks in advance,


Nicholas Loulloudes
High Performance Computing Systems Laboratory (HPCL)
University of Cyprus,
Nicosia, Cyprus

Tel:  +357-22892663
Email: loulloudes.n[at]
wtp-dev mailing list

Attachment: smime.p7s
Description: Binary data

Back to the top