Skip to main content

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

ValidateSave() is triggered as a side effect of calling IFile.setContents
().   It is therefore guaranteed to be called when a resource is saved.
There are no cases that we know of where someone would need call it
directly, thus it isn't available for explicit invocation.

If this doesn't match what you are trying to do, let us know.

Kevin McGuire




                                                                                                                     
                      Rod Iversen                                                                                    
                      <riversen@xxxxxxxxxxxx>          To:      platform-core-dev@xxxxxxxxxxx                        
                      Sent by:                         cc:                                                           
                      platform-core-dev-admin@         Subject: [platform-core-dev] Validation interfaces            
                      eclipse.org                                                                                    
                                                                                                                     
                                                                                                                     
                      05/10/2002 01:48 PM                                                                            
                      Please respond to                                                                              
                      platform-core-dev                                                                              
                                                                                                                     
                                                                                                                     



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