Difference between revisions of "Architectural and Design Notes"

From Eclipsepedia

Jump to: navigation, search
m (Fixed external links - removed pipe character)
(Programming for Source and Version Control Management Systems)
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>]. See also bug [https://bugs.eclipse.org/bugs/show_bug.cgi?id=160905 160905].
  
 
Lastly, there are some  
 
Lastly, there are some  
Line 36: Line 36:
 
"pessimistic file system" then you can assume they'll work correctly
 
"pessimistic file system" then you can assume they'll work correctly
 
with the real thing.
 
with the real thing.
 +
[[Category:Eclipse Web Tools Platform Project]]

Revision as of 13:30, 23 April 2007

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. See also bug 160905.

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.