Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [subversive-dev] How to set some properties at the creation offolders/files?

Title: How to set some properties at the creation of folders/files?
Hello, Tongjia.
 
To set SVN properties the resources it firstly must be added to source control. To add resources to the source control AddToSVNOperation should be used. After success the properties can be set.
To set properties SetPropertiesOperation should be used. Both operations are from org.eclipse.team.svn.core.operation.local, not org.eclipse.team.svn.core.operation.file....
 
So to solve the task you shoud (for example):
 
SetPropertiesOperation mainOp = new SetPropertiesOperation(resources, properties);

AddToSVNOperation addOp = new AddToSVNOperation(resources);

CompositeOperation op = new CompositeOperation(mainOp.getId());

op.add(addOp);

op.add(mainOp, new IActionOperation [] {addOp});

ProgressMonitorUtility.doTaskScheduledDefault(op);

 
And that's all.
Best regards, Alexei Goncharov (Subversive Team).
 

From: subversive-dev-bounces@xxxxxxxxxxx [mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Yin, Tongjia
Sent: Friday, August 29, 2008 1:46 AM
To: subversive-dev@xxxxxxxxxxx
Subject: [subversive-dev] How to set some properties at the creation offolders/files?

Hi,

I am wondering how to programmatically set some properties (not revision properties) at the creation of folders/files. And reset them at later time. I could not find the right API to use. For folders, I am using CreateFolderAction as the entry point. 

Thank you very much in advance.

Regards,
Tongjia



Back to the top