Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » MultiPageEditor + HTML Source Page Editor
MultiPageEditor + HTML Source Page Editor [message #86155] Wed, 23 March 2005 05:43 Go to next message
Eclipse UserFriend
Originally posted by: rpereira.di.ubi.pt

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C52F95.32AF0290
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I'm new in eclipse.

I'm trying to use the "HTML Source Page Editor" from "WST" in a =
"MultiPageEditor", but "addPage" receives "IEditorPart" in first =
argument. How can I do that? It's possible?

Thanks.

My code:

void createPage0() {

try {

//editor =3D new HTMLEditorPlugin();

HTMLUIPlugin editor =3D new HTMLUIPlugin();


index =3D addPage(editor, getEditorInput()); /* ERROR */

setPageText(0, "simple source");

setPartName(getEditorInput().getName());


} catch (PartInitException e) {....}

}

------=_NextPart_000_000C_01C52F95.32AF0290
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<P><FONT face=3DArial size=3D2>Hi,</FONT></P>
<P><FONT face=3DArial size=3D2>I=92m new in eclipse.</FONT></P>
<P><FONT face=3DArial size=3D2>I=92m trying to use the "HTML Source Page =
Editor" from=20
"WST" in a "MultiPageEditor", but "addPage" receives "IEditorPart" in =
first=20
argument. How can I do that? It's possible?</FONT></P>
<P><FONT face=3DArial size=3D2>Thanks.</FONT></P>
<P><FONT face=3DArial size=3D2>My code:</FONT></P>
<P><FONT face=3D"Courier New" size=3D2>void createPage0() {</FONT></P>
<P><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; try =
{</FONT></P>
<P><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
//editor =3D new HTMLEditorPlugin();</FONT></P>
<P><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
HTMLUIPlugin editor =3D new HTMLUIPlugin();</FONT></P>
<P><FONT face=3D"Courier New" size=3D2></FONT></P>
<P><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; index =3D=20
addPage(editor, getEditorInput());&nbsp; /* ERROR */</FONT></P>
<P><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
setPageText(0, "simple source");</FONT></P>
<P><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
setPartName(getEditorInput().getName());</FONT></P>
<P><FONT face=3D"Courier New" size=3D2></FONT></P>
<P><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; } catch =
(PartInitException=20
e) {</FONT><FONT face=3D"Courier New" size=3D2>....</FONT><FONT =
face=3D"Courier New"=20
size=3D2>}</FONT></P>
<P><FONT face=3D"Courier New" size=3D2>}</FONT></P></BODY></HTML>

------=_NextPart_000_000C_01C52F95.32AF0290--
Re: MultiPageEditor + HTML Source Page Editor [message #87103 is a reply to message #86155] Thu, 24 March 2005 16:56 Go to previous messageGo to next message
Eclipse UserFriend
Rui Pereira wrote:
>
>
> Hi,
>
> I’m new in eclipse.
>
> I’m trying to use the "HTML Source Page Editor" from "WST" in a
> "MultiPageEditor", but "addPage" receives "IEditorPart" in first
> argument. How can I do that? It's possible?
>
> Thanks.
>
> My code:
>
> void createPage0() {
>
> try {
>
> //editor = new HTMLEditorPlugin();
>
> HTMLUIPlugin editor = new HTMLUIPlugin();
>
> index = addPage(editor, getEditorInput()); /* ERROR */
>
> setPageText(0, "simple source");
>
> setPartName(getEditorInput().getName());
>
> } catch (PartInitException e) { .... }
>
> }
>

The HTML source editor is implemented by
org.eclipse.wst.html.ui.StructuredTextEditorHTML so you can safely
create an instance of that to use as your source page. This may
change since the APIs are in flux, but that class or
org.eclipse.wst.sse.ui.StructuredTextEditor would be the classes to
use as they both implement IEditorPart.

--
- Nitin
Re: MultiPageEditor + HTML Source Page Editor [message #87489 is a reply to message #87103] Sat, 26 March 2005 04:23 Go to previous message
Eclipse UserFriend
Originally posted by: rpereira.di.ubi.pt

Hi Nitin,

Thanks for your answer.

Rui


"Nitin Dahyabhai" <nitind@us.ibm.com> escreveu na mensagem
news:d1vhsi$mgo$1@news.eclipse.org...
Rui Pereira wrote:
>
>
> Hi,
>
> I
Previous Topic:install just the sse bits
Next Topic:WTP 1.0M3 - Database Manager support for MySQL in "Servers Explorer"
Goto Forum:
  


Current Time: Wed Apr 30 06:05:07 EDT 2025

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

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

Back to the top