本文整理汇总了Java中org.tigris.subversion.clientadapter.Activator类的典型用法代码示例。如果您正苦于以下问题:Java Activator类的具体用法?Java Activator怎么用?Java Activator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Activator类属于org.tigris.subversion.clientadapter包,在下文中一共展示了Activator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAdapter
import org.tigris.subversion.clientadapter.Activator; //导入依赖的package包/类
private ISVNClientAdapter getAdapter(String key) throws SVNException {
ISVNClientAdapter client = null;
if (key == null) {
key = "default";
}
if (cachedClients != null) // See if we have cached a client
client = (ISVNClientAdapter) cachedClients.get(key);
if (client == null) {
if (!key.equals("default"))
client = Activator.getDefault().getClientAdapter(svnClientInterface);
if (client == null)
client = Activator.getDefault().getAnyClientAdapter();
if (client == null)
throw new SVNException(UNABLE_TO_LOAD_DEFAULT_CLIENT);
setupClientAdapter(client);
if (client.isThreadsafe())
cacheClient(key, client);
}
return client;
}
示例2: SVNPreferencesPage
import org.tigris.subversion.clientadapter.Activator; //导入依赖的package包/类
public SVNPreferencesPage() {
fFields = new ArrayList();
// sort the options by display text
setDescription(Policy.bind("SVNPreferencePage.description")); //$NON-NLS-1$
ISVNClientWrapper[] clients = null;
clients = Activator.getDefault().getAllClientWrappers();
if (clients != null) {
CLIENT_LABELS = new String[clients.length];
CLIENT_VALUES = new String[clients.length];
for (int i = 0; i < clients.length; i++) {
CLIENT_LABELS[i] = clients[i].getDisplayName();
CLIENT_VALUES[i] = clients[i].getAdapterID();
}
} else {
CLIENT_LABELS = new String[0];
CLIENT_VALUES = new String[0];
}
}
示例3: setSvnClientConfigDir
import org.tigris.subversion.clientadapter.Activator; //导入依赖的package包/类
/**
* set the svn client config dir
* @param configDir
*/
private void setSvnClientConfigDir(String configDir) {
if (SVNUIPlugin.getPlugin().passwordStoresConfiguredOnLinux() && !SVNUIPlugin.getPlugin().getDialogSettings().getBoolean(UnsupportedPasswordStoresDialog.SETTING_DO_NOT_SHOW_AGAIN)) {
if (!SVNUIPlugin.TEST_MODE) {
ISVNClientWrapper clientWrapper = Activator.getDefault().getClientWrapper("javahl");
String version = null;
if (clientWrapper != null) {
version = clientWrapper.getVersionString();
}
boolean bugFixed = version != null && new SvnVersion(version).isNewerThanOrEqualTo(SvnVersion.VERSION_1_8_11);
if (!bugFixed) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
UnsupportedPasswordStoresDialog dialog = new UnsupportedPasswordStoresDialog(Display.getDefault().getActiveShell());
if (dialog.open() == UnsupportedPasswordStoresDialog.OK) {
try {
SVNUIPlugin.getPlugin().clearPasswordStoresFromConfiguration(false);
} catch (Exception e) {
SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.Preferences_0, e.getMessage());
}
}
else {
SVNUIPlugin.getPlugin().getDialogSettings().put(UnsupportedPasswordStoresDialog.SETTING_DO_NOT_SHOW_AGAIN, dialog.isDoNotShowAgain());
}
}
});
}
}
}
SVNProviderPlugin plugin = SVNProviderPlugin.getPlugin();
SVNClientManager svnClientManager = plugin.getSVNClientManager();
if (configDir == null || "".equals(configDir)) { //$NON-NLS-1$
svnClientManager.setConfigDir(null);
} else {
File configDirFile = new File(configDir);
svnClientManager.setConfigDir(configDirFile);
}
}