Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] Validation interfaces

What is your use case for trying to pre-hook the #setContents calls for 
all files in all projects, reguardless of their team provider? (which is 
essentially what this method does)

The file validation hook is "internal API" intended for use only by the 
Team team. They notify individual team providers if the files being 
modified are controlled by them.





Rod Iversen <riversen@xxxxxxxxxxxx>
Sent by: platform-core-dev-admin@xxxxxxxxxxx
05/10/2002 01:48 PM
Please respond to platform-core-dev

 
        To:     platform-core-dev@xxxxxxxxxxx
        cc: 
        Subject:        [platform-core-dev] Validation interfaces

In Eclipse 2.0 the org.eclipse.core.resourcesIWorkspace  interface
defines a validateEdit() function which takes a list of file resources.
It calls the validateEdit() function defined in
org.eclipse.team.core.RepositoryProvider for each file's repository
provider, or the default provider
(org.eclipse.team.internal.core.DefaultFileModificationValidator) if the
file has no provider.

We intend to call this function from our plugin package because:

    1. it simplifies our code since we don't care which provider is
managing a resource
    2. it handles the situation when a file has no provider

We would also like to call an equivalent function for validateSave().
However, validateSave() is currently not defined by IWorkspace, even
though it is implemented by the Workspace class.

Is there a good reason for this?
Can validateSave() be added to IWorkspace?
It would make our application (and, I'm sure, others) much cleaner.
Otherewise we are forced to essentially clone the Workspace and
DefaultFileModificationValidator implementations to achieve the same
end.

Rod



_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-core-dev





Back to the top