[
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
wuamy@xxxxxxxxxx
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> |
|
To
| wtp-dev@xxxxxxxxxxx
|
cc
|
|
Subject
| [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 );
addResourceEditorPage();
}
catch
(PartInitException e) {
Activator.logException( e );
}
}
private
void
addResourceEditorPage()throws
PartInitException{
this.sourcePageIndex = addPage(getSourceEditor(), getEditorInput());
setPageText(this.sourcePageIndex,getEditorInput().getName());
getSourceEditor().setInput(getEditorInput());
}
private
StructuredTextEditor getSourceEditor()
{
if
(this.editor == null)
{
this.editor = new
StructuredTextEditor();
this.editor.setEditorPart( 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="http://..."
xmlns:js-p="http://...">
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]cs.ucy.ac.cy
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev
Attachment:
smime.p7s
Description: Binary data