本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNWCClient.doSetProperty方法的典型用法代码示例。如果您正苦于以下问题:Java SVNWCClient.doSetProperty方法的具体用法?Java SVNWCClient.doSetProperty怎么用?Java SVNWCClient.doSetProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tmatesoft.svn.core.wc.SVNWCClient
的用法示例。
在下文中一共展示了SVNWCClient.doSetProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext());
SVNWCClient wcClient = myVcs.createWCClient();
SVNPropertyData propValue = null;
try {
propValue = wcClient.doGetProperty(myFile, SVNProperty.KEYWORDS, SVNRevision.UNDEFINED, SVNRevision.WORKING);
} catch (SVNException e1) {
// show error message
}
SetKeywordsDialog dialog = new SetKeywordsDialog(project,
propValue != null ? SVNPropertyValue.getPropertyAsString(propValue.getValue()) : null);
dialog.show();
if (dialog.isOK()) {
String value = dialog.getKeywords();
try {
wcClient.doSetProperty(myFile, SVNProperty.KEYWORDS, SVNPropertyValue.create(value), false, false, null);
}
catch (SVNException err) {
// show error message
VcsBalloonProblemNotifier.showOverChangesView(myVcs.getProject(), "Can not set property: " + err.getMessage(), MessageType.ERROR);
}
}
setFile(myVcs, myFile);
updateFileStatus(false);
}
示例2: setProperty
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private void setProperty(final File file, final String name, final String value) throws SVNException {
final SVNWCClient client = myVcs.getSvnKitManager().createWCClient();
client.doSetProperty(file, new ISVNPropertyValueProvider() {
@Override
public SVNProperties providePropertyValues(File path, SVNProperties properties) throws SVNException {
final SVNProperties result = new SVNProperties();
result.put(name, SVNPropertyValue.create(value));
return result;
}
}, true, SVNDepth.EMPTY, null, null);
}
示例3: setIgnores
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public static void setIgnores(final SvnVcs vcs, final Collection<String> patterns, final File file)
throws SVNException {
final SVNWCClient client = vcs.createWCClient();
final StringBuilder sb = new StringBuilder();
for (String pattern : patterns) {
sb.append(pattern).append('\n');
}
if (! patterns.isEmpty()) {
final String value = sb.toString();
client.doSetProperty(file, SvnPropertyKeys.SVN_IGNORE, SVNPropertyValue.create(value), false, SVNDepth.EMPTY, null, null);
} else {
client.doSetProperty(file, SvnPropertyKeys.SVN_IGNORE, null, false, SVNDepth.EMPTY, null, null);
}
}
示例4: batchPerform
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
protected void batchPerform(Project project, SvnVcs activeVcs, VirtualFile[] file, DataContext context)
throws VcsException {
File[] ioFiles = new File[file.length];
for (int i = 0; i < ioFiles.length; i++) {
ioFiles[i] = new File(file[i].getPath());
}
SetPropertyDialog dialog = new SetPropertyDialog(project, ioFiles, null, true);
dialog.show();
if (dialog.isOK()) {
String name = dialog.getPropertyName();
String value = dialog.getPropertyValue();
boolean recursive = dialog.isRecursive();
SVNWCClient wcClient = activeVcs.createWCClient();
for (int i = 0; i < ioFiles.length; i++) {
File ioFile = ioFiles[i];
try {
wcClient.doSetProperty(ioFile, name, SVNPropertyValue.create(value), false, recursive, null);
}
catch (SVNException e) {
throw new VcsException(e);
}
}
for(int i = 0; i < file.length; i++) {
if (recursive && file[i].isDirectory()) {
VcsDirtyScopeManager.getInstance(project).dirDirtyRecursively(file[i], true);
} else {
VcsDirtyScopeManager.getInstance(project).fileDirty(file[i]);
}
}
}
}
示例5: setProperty
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private void setProperty(final File file, final String name, final String value) throws SVNException {
final SVNWCClient client = myVcs.createWCClient();
client.doSetProperty(file, new ISVNPropertyValueProvider() {
@Override
public SVNProperties providePropertyValues(File path, SVNProperties properties) throws SVNException {
final SVNProperties result = new SVNProperties();
result.put(name, SVNPropertyValue.create(value));
return result;
}
}, true, SVNDepth.EMPTY, null, null);
}