Eclipse2.1 "org.eclipse.ui.propertyPages " extension point code generating wizard question [message #81527] |
Tue, 24 June 2003 10:44 |
Eclipse User |
|
|
|
Originally posted by: danielmarkhot.hotmail.com
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C33A35.25B87870
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Hello all:
I found a strange thing when I compare the =
org.eclipse.ui.examples.readmetool.ReadmeFilePropertyPage
with my source code for propertyPage created by Eclipse2.1.
In the implementation of =
org.eclipse.ui.examples.readmetool.ReadmeFilePropertyPage, the Class =
ReadmeFilePropertyPage
only extends PropertyPage, but in the code created by Eclipse include =
both Class PropertyPage and Interface IWorkbenchPropertyPage. The source =
code I got from eclipse looks like:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D
package org.eclipse.examples.helloworld;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.dialogs.PropertyPage;
import org.eclipse.ui.IWorkbenchPropertyPage;
public class WorkbenchPropertyPageOne extends PropertyPage implements =
IWorkbenchPropertyPage {
public WorkbenchPropertyPageOne() {
}
protected Control createContents(Composite parent) {
return null;
}
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D
My question is:
Why the class code created by eclipse include "implements =
IWorkbenchPropertyPage"???
I had referred to the online manual and found that:
org.eclipse.ui.dialogs.PropertyPage
All Implemented Interfaces:=20
IDialogPage, IMessageProvider, IPreferencePage, =
IWorkbenchPropertyPage=20
In fact Property implements the Interface IWorkbenchPropertyPage, why =
should we define the class use
the form "class WorkbenchPropertyPageOne extends PropertyPage implements =
IWorkbenchPropertyPage "
rather than the simple way "class WorkbenchPropertyPageOne extends =
PropertyPage"
thank you very much
-Daniel
------=_NextPart_000_000A_01C33A35.25B87870
Content-Type: text/html;
charset="gb2312"
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=3Dgb2312">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hello all:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> I found a strange =
thing when I=20
compare the=20
org.eclipse.ui.examples.readmetool.ReadmeFilePropertyPage</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2>with my source code for propertyPage =
created=20
by Eclipse2.1.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> In the =
implementation of=20
org.eclipse.ui.examples.readmetool.ReadmeFilePropertyPage, the Class=20
ReadmeFilePropertyPage</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>only extends PropertyPage, but in the =
code created=20
by Eclipse include both Class PropertyPage and Interface =
IWorkbenchPropertyPage.=20
The source code I got from eclipse looks like:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>package=20
org.eclipse.examples.helloworld;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>import =
org.eclipse.swt.widgets.Control;<BR>import=20
org.eclipse.swt.widgets.Composite;<BR>import=20
org.eclipse.ui.dialogs.PropertyPage;<BR>import=20
org.eclipse.ui.IWorkbenchPropertyPage;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>public class WorkbenchPropertyPageOne =
extends=20
PropertyPage implements <U><FONT =
color=3D#ff0000>IWorkbenchPropertyPage</FONT></U>=20
{<BR> public WorkbenchPropertyPageOne() {<BR> }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> protected Control =
createContents(Composite=20
parent) {<BR> return null;<BR> }<BR>}</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My question is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why the class code created by eclipse =
include=20
"<U><FONT color=3D#ff0000>implements=20
IWorkbenchPropertyPage</FONT></U>"???</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I had referred to the online manual and =
found=20
that:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2>org.eclipse.ui.dialogs.PropertyPage<BR></FONT><FONT=20
face=3DArial size=3D2>All Implemented Interfaces: </FONT></DIV>
<DIV><A=20
href=3D" http://127.0.0.1:1750/help/topic/org.eclipse.platform.doc.is v/ref=
erence/api/org/eclipse/jface/dialogs/IDialogPage.html"><FONT=20
face=3DArial color=3D#000000 size=3D2> =
IDialogPage</FONT></A><FONT=20
face=3DArial size=3D2>, </FONT><A=20
href=3D" http://127.0.0.1:1750/help/topic/org.eclipse.platform.doc.is v/ref=
erence/api/org/eclipse/jface/dialogs/IMessageProvider.html"> <FONT=20
face=3DArial color=3D#000000 size=3D2>IMessageProvider</FONT></A><FONT =
face=3DArial=20
size=3D2>, </FONT><A=20
href=3D" http://127.0.0.1:1750/help/topic/org.eclipse.platform.doc.is v/ref=
erence/api/org/eclipse/jface/preference/IPreferencePage.html "><FONT=20
face=3DArial color=3D#000000 size=3D2>IPreferencePage</FONT></A><FONT =
face=3DArial=20
size=3D2>, </FONT><A=20
href=3D" http://127.0.0.1:1750/help/topic/org.eclipse.platform.doc.is v/ref=
erence/api/org/eclipse/ui/IWorkbenchPropertyPage.html"><FONT=20
face=3DArial color=3D#000000 =
size=3D2>IWorkbenchPropertyPage</FONT></A><FONT=20
face=3DArial size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>In fact Property implements the =
Interface=20
IWorkbenchPropertyPage, why should we define the class use</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the form "<FONT color=3D#800000>class=20
WorkbenchPropertyPageOne extends PropertyPage implements=20
IWorkbenchPropertyPage</FONT> "</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>rather than the simple way "<FONT=20
color=3D#ff00ff>class WorkbenchPropertyPageOne extends=20
PropertyPage</FONT>"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>thank you very much</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-Daniel</FONT></DIV></BODY></HTML>
------=_NextPart_000_000A_01C33A35.25B87870--
|
|
|
Powered by
FUDForum. Page generated in 0.03530 seconds