platform-ui-home/code-conventions/index.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8.2.1, Tue Nov 16 18:14:26 2004 UTC revision 1.9, Fri Mar 18 14:06:04 2005 UTC
# Line 13  Line 13 
13                          </tr>                          </tr>
14                          <tr>                          <tr>
15                                  <td align=right valign=top width="2%">                                  <td align=right valign=top width="2%">
16                                          <img src="http://dev.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16 alt = "Eclipse idea banner">                                          <img src="http://dev.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16 alt = "arrow">
17                                  </td>                                  </td>
18                                  <td width="98%">                                  <td width="98%">
19                                  <p>The main Eclipse coding conventions can be found <a href="http://dev.eclipse.org/conventions.html">here</a>.</p>                                  <p>The main Eclipse coding conventions can be found <a href="http://dev.eclipse.org/conventions.html">here</a>.</p>
# Line 60  Line 60 
60                                      <a href="codeconventions.epf">file</a>.                                      <a href="codeconventions.epf">file</a>.
61                                  </td>                                  </td>
62                          </tr>                          </tr>
63                            <tr>
64                                    <td align=right valign=top width="2%">
65                                            <img src="http://dev.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16 alt = "arrow">
66                                    </td>
67                                    <td width="98%">
68                                            <p>Platform UI covers several components: JFace, the Generic Workbench, and the IDE.
69                                            </p>
70                                            <p>
71                                            Code in these components should respect the API boundaries of these other components
72                                            (i.e. treat other components as if they were owned by another team).
73                                            In particular, code in the <code>org.eclipse.ui.ide</code> plug-in should not refer
74                                            to internal classes in <code>org.eclipse.ui</code> or <code>org.eclipse.ui.workbench</code>.
75                                            The IDE should follow the same rules as any other RCP application.
76                                            <p>
77                                            Code in these components should respect the API boundaries of these other components
78                                            (i.e. treat other components as if they were owned by another team).
79                                            In particular, code in the <code>org.eclipse.ui.ide</code> plug-in should not refer
80                                            to internal classes in <code>org.eclipse.ui</code> or <code>org.eclipse.ui.workbench</code>.
81                                            The IDE should follow the same rules as any other RCP application.
82                                            </p>
83                                    </td>
84                            </tr>
85                            <tr>
86                                    <td align=right valign=top width="2%">
87                                            <img src="http://dev.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16 alt = "arrow">
88                                    </td>
89                                    <td width="98%">
90                                            <p>In the IDE, we occasionally need to map between workspace resources and workbench objects.
91                                            For example, when closing a project, we need to determine the affected editors by checking
92                                            whether their input corresponds to a file in the project.  Although the IDE provides IFileEditorInput
93                                            and FileEditorInput, we must not assume that this is the only kind of editor input that
94                                            can represent an workspace file.  When mapping from an editor input, use the adaptable mechanism
95                                            rather than instanceof checks for [I]FileEditorInput.  See ResourceUtil.getFile(IEditorInput) for
96                                            a convenience method that will do this properly.
97                                            </p>
98                                    </td>
99                            </tr>
100                  </table>                  </table>
101          </body>          </body>
   
   
   
102  </html>  </html>

Legend:
Removed from v.1.8.2.1  
changed lines
  Added in v.1.9