Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to link multipage editor to source code file?
How to link multipage editor to source code file? [message #329143] Fri, 13 June 2008 17:15 Go to next message
Eclipse UserFriend
Originally posted by: tchurch+eclipse.nullring.com

[Reposting from eclipse.newcomer group since this is forms related]

I am trying to develop a simple multipage editor that has 2 pages. The
first page is an eclipse form with a couple input fields, and the second
page is the source xml file. I am able to create both pages, but I am
missing a fundamental concept - how do I link the form page to the source
xml file? In other words, how can I have the input on the form page
automatically update the related field in the xml file when it is edited?

Does anyone have a simple example of how this works?

I have searched through the newsgroup and read through the help, but this
has not been clear to me. I have tried to trace through the code for the
Plugin Manifest Editor but have been unable to follow it.

My assumption is that I need some sort of listener on the input field,
probably a ModifyListener, which will open the xml file, parse it for the
correct field, update the field, and then refresh the source page. Is
this the correct approach?
Re: How to link multipage editor to source code file? [message #329163 is a reply to message #329143] Mon, 16 June 2008 09:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bangyi.nfs-china.com

Tim Church wrote:
> [Reposting from eclipse.newcomer group since this is forms related]
>
> I am trying to develop a simple multipage editor that has 2 pages. The
> first page is an eclipse form with a couple input fields, and the second
> page is the source xml file. I am able to create both pages, but I am
> missing a fundamental concept - how do I link the form page to the
> source xml file? In other words, how can I have the input on the form
> page automatically update the related field in the xml file when it is
> edited?
> Does anyone have a simple example of how this works?
>
> I have searched through the newsgroup and read through the help, but
> this has not been clear to me. I have tried to trace through the code
> for the Plugin Manifest Editor but have been unable to follow it.
> My assumption is that I need some sort of listener on the input field,
> probably a ModifyListener, which will open the xml file, parse it for
> the correct field, update the field, and then refresh the source page.
> Is this the correct approach?
>
hi, tim, you can analyze the source code of WST XML editor , which is a
two-page editor.

1 Record the line nubmer of every xml element when resolving XML file.

2 Every UI widget you constructed need contain a property whose value is
line number for according xml element.
you can do it like this :
widget.setData("StartLineNumber",elementLineMap.get(element));
Re: How to link multipage editor to source code file? [message #329228 is a reply to message #329163] Mon, 16 June 2008 21:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tchurch+eclipse.nullring.com

I do not have the source code for the WST XML editor. I am using the
Eclipse for RCP/Plug-in Developers (Europa) version. Can this be
downloaded somewhere?
Re: How to link multipage editor to source code file? [message #329263 is a reply to message #329228] Tue, 17 June 2008 17:33 Go to previous message
Eclipse UserFriend
Originally posted by: tchurch+eclipse.nullring.com

For anyone who is missing source code, I found instructions on how to
check out the source from the CVS repository to add it to your local
Eclipse -
http://www.eclipse.org/webtools/community/tutorials/Developi ngWTP/DevelopingWTP.html
Previous Topic:Migration Questions
Next Topic:special Jface dialog
Goto Forum:
  


Current Time: Wed Jul 17 19:37:34 GMT 2024

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

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

Back to the top