[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-core-dev] Validation interfaces
|
In our case we have external (to Eclipse) applications that can edit or
overwrite resources in projects managed in the workbench. Our plugin acts as
a bridge between these applications and Eclipse. These applications access
our plugin to determine the editability/saveability of resources. They do
not care what CM system manages them. A simple call to these Workspace
validation hooks from our plugin can be returned to the applications.
The Team file validation hooks are public APIs which all can access.
The Workspace equivalents merely dispatch these calls to the proper
providers.
I do not understand the rational why they should therefore be private in the
Workspace.
The Workspace.validateEdit() function is public, presumably because you
realized that non-resource packages should also be able to call it (e.g.
org.eclipse.jdt.internal.*).
All I am saying is that there are equally legitimate reasons for making
Workspace.validateSave() public.
Cheers,
Rod
-----Original Message-----
From: DJ_Houghton@xxxxxxx [mailto:DJ_Houghton@xxxxxxx]
Sent: Friday, May 10, 2002 2:20 PM
To: platform-core-dev@xxxxxxxxxxx
Subject: 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
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-core-dev