Difference between revisions of "Architectural and Design Notes"

From Eclipsepedia

Jump to: navigation, search
 
m (Fixed external links - removed pipe character)
Line 3: Line 3:
 
=== Programming for Source and Version Control Management Systems ===
 
=== Programming for Source and Version Control Management Systems ===
  
Eclipse supports [http://www.eclipse.org/community/team.php| many Source or Version Control Management (SCM or VCM) repositories.]
+
Eclipse supports [http://www.eclipse.org/community/team.php many Source or Version Control Management (SCM or VCM) repositories.]
  
 
Some of these have special needs, and special interfaces to interact
 
Some of these have special needs, and special interfaces to interact
Line 9: Line 9:
 
community of repository providers.  
 
community of repository providers.  
  
One easy thing that sometimes applies, is to use [http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/resAdv_derived.htm|<code>IResource.setDerived(true)</code>]
+
One easy thing that sometimes applies, is to use [http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/resAdv_derived.htm <code>IResource.setDerived(true)</code>]
 
for resources
 
for resources
 
which should not be version controlled
 
which should not be version controlled
Line 26: Line 26:
 
includes the sometimes forgotten .project files and other system files
 
includes the sometimes forgotten .project files and other system files
 
that are shared</b>, as well as the normal resource files. Luckily, there's
 
that are shared</b>, as well as the normal resource files. Luckily, there's
a handy API so Eclipse plugin providers do not have to do too much: [http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IWorkspace.html|<code>IWorkSpace.validateEdit</code>.]
+
a handy API so Eclipse plugin providers do not have to do too much: [http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IWorkspace.html <code>IWorkSpace.validateEdit</code>.]
  
 
Lastly, there are some  
 
Lastly, there are some  
[http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/samples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html|"example test environments"]
+
[http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/samples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html "example test environments"]
 
that help test some of these issues --
 
that help test some of these issues --
 
without having to setup some whole particular repository systems. It is
 
without having to setup some whole particular repository systems. It is

Revision as of 18:27, 29 March 2006

Good Citizenship in Eclipse

Programming for Source and Version Control Management Systems

Eclipse supports many Source or Version Control Management (SCM or VCM) repositories.

Some of these have special needs, and special interfaces to interact with, in order for Eclipse projects to be "good citizens" in this community of repository providers.

One easy thing that sometimes applies, is to use IResource.setDerived(true) for resources which should not be version controlled (such as, because they are frequently changing, and derived from other resources).

A harder thing, sometimes, to program for, is to anticipate ahead of time if a resource is about to be changed. In these cases, some VCM providers want to do something "special" before a file on local system is modified. For example, it may want to "check it out" of the repository library "for exclusive use" when edited ... and if this is not done, the edit will sometimes fail, or be at risk of being "stale" if someone else modifies the same shared resource.

This includes the sometimes forgotten .project files and other system files that are shared, as well as the normal resource files. Luckily, there's a handy API so Eclipse plugin providers do not have to do too much: IWorkSpace.validateEdit.

Lastly, there are some "example test environments" that help test some of these issues -- without having to setup some whole particular repository systems. It is not perfectly accurate for all repository systems, but from what I've heard, it is "close enough" that if things work correctly with the "pessimistic file system" then you can assume they'll work correctly with the real thing.