use of com.intellij.openapi.updateSettings.impl.UpdateSettings in project smali by JesusFreke.
the class ITNProxy method createParameters.
public static Map<String, String> createParameters(ErrorBean error) {
Map<String, String> params = ContainerUtil.newLinkedHashMap(40);
params.put("protocol.version", "1");
params.put("os.name", SystemProperties.getOsName());
params.put("java.version", SystemProperties.getJavaVersion());
params.put("java.vm.vendor", SystemProperties.getJavaVmVendor());
ApplicationInfoEx appInfo = ApplicationInfoEx.getInstanceEx();
ApplicationNamesInfo namesInfo = ApplicationNamesInfo.getInstance();
Application application = ApplicationManager.getApplication();
params.put("app.name", namesInfo.getProductName());
params.put("app.name.full", namesInfo.getFullProductName());
params.put("app.name.version", appInfo.getVersionName());
params.put("app.eap", Boolean.toString(appInfo.isEAP()));
params.put("app.internal", Boolean.toString(application.isInternal()));
params.put("app.build", appInfo.getBuild().asString());
params.put("app.version.major", appInfo.getMajorVersion());
params.put("app.version.minor", appInfo.getMinorVersion());
params.put("app.build.date", format(appInfo.getBuildDate()));
params.put("app.build.date.release", format(appInfo.getMajorReleaseBuildDate()));
params.put("app.compilation.timestamp", IdeaLogger.getOurCompilationTimestamp());
UpdateSettings updateSettings = UpdateSettings.getInstance();
params.put("update.channel.status", updateSettings.getSelectedChannelStatus().getCode());
params.put("update.ignored.builds", StringUtil.join(updateSettings.getIgnoredBuildNumbers(), ","));
params.put("plugin.name", error.getPluginName());
params.put("plugin.version", error.getPluginVersion());
params.put("last.action", error.getLastAction());
params.put("previous.exception", error.getPreviousException() == null ? null : Integer.toString(error.getPreviousException()));
params.put("error.message", error.getMessage());
params.put("error.stacktrace", error.getStackTrace());
params.put("error.description", error.getDescription());
params.put("assignee.id", error.getAssigneeId() == null ? null : Integer.toString(error.getAssigneeId()));
for (Attachment attachment : error.getAttachments()) {
params.put("attachment.name", attachment.getName());
params.put("attachment.value", attachment.getEncodedBytes());
}
return params;
}
use of com.intellij.openapi.updateSettings.impl.UpdateSettings in project intellij-community by JetBrains.
the class ExternalComponentManagerImpl method registerComponentSource.
@Override
public void registerComponentSource(@NotNull ExternalComponentSource site) {
mySources.add(site);
UpdateSettings updateSettings = UpdateSettings.getInstance();
List<String> knownSources = updateSettings.getKnownExternalUpdateSources();
if (!knownSources.contains(site.getName())) {
knownSources.add(site.getName());
updateSettings.getEnabledExternalUpdateSources().add(site.getName());
List<String> channels = site.getAllChannels();
if (channels != null) {
updateSettings.getExternalUpdateChannels().put(site.getName(), channels.get(0));
}
}
}
use of com.intellij.openapi.updateSettings.impl.UpdateSettings in project intellij-community by JetBrains.
the class PluginHostsConfigurable method apply.
@Override
public void apply() throws ConfigurationException {
UpdateSettings settings = UpdateSettings.getInstance();
settings.getStoredPluginHosts().clear();
settings.getStoredPluginHosts().addAll(myUpdatesSettingsPanel.getPluginsHosts());
}
use of com.intellij.openapi.updateSettings.impl.UpdateSettings in project android by JetBrains.
the class SdkComponentSourceTest method testIgnored.
public void testIgnored() throws Exception {
final AtomicReference<String> id = new AtomicReference<String>();
ProgressIndicator progress = new StudioProgressIndicatorAdapter(new FakeProgressIndicator(), null);
for (UpdatableExternalComponent c : myTestComponentSource.getAvailableVersions(progress, null)) {
if ("package newerRemote".equals(c.getName())) {
id.set(SdkComponentSource.getPackageRevisionId((RepoPackage) c.getKey()));
}
}
assertNotNull(id.get());
ExternalComponentManager.getInstance().registerComponentSource(myTestComponentSource);
UpdateSettings settings = new UpdateSettings() {
@Override
public List<String> getEnabledExternalUpdateSources() {
return ImmutableList.of(myTestComponentSource.getName());
}
@Override
public List<String> getIgnoredBuildNumbers() {
return ImmutableList.of(id.get());
}
};
Collection<ExternalUpdate> updates = UpdateChecker.updateExternal(true, settings, progress);
assertEquals(1, updates.size());
ExternalUpdate update = updates.iterator().next();
Iterator<UpdatableExternalComponent> iter = update.getComponents().iterator();
UpdatableExternalComponent component = iter.next();
assertEquals("package newerPreview", component.getName());
assertEquals(new Revision(1, 0, 0, 2), ((RepoPackage) component.getKey()).getVersion());
assertFalse(iter.hasNext());
}
use of com.intellij.openapi.updateSettings.impl.UpdateSettings in project android by JetBrains.
the class SdkComponentSourceTest method testBetaUpdates.
public void testBetaUpdates() throws Exception {
myChannelId = 1;
ExternalComponentManager.getInstance().registerComponentSource(myTestComponentSource);
ProgressIndicator progress = new StudioProgressIndicatorAdapter(new FakeProgressIndicator(), null);
UpdateSettings settings = new UpdateSettings() {
@Override
public List<String> getEnabledExternalUpdateSources() {
return ImmutableList.of(myTestComponentSource.getName());
}
};
Collection<ExternalUpdate> updates = UpdateChecker.updateExternal(true, settings, progress);
assertEquals(1, updates.size());
ExternalUpdate update = updates.iterator().next();
Iterator<UpdatableExternalComponent> iter = update.getComponents().iterator();
UpdatableExternalComponent component = iter.next();
assertEquals("package newerPreview", component.getName());
assertEquals(new Revision(1, 0, 0, 2), ((RepoPackage) component.getKey()).getVersion());
component = iter.next();
assertEquals("package newerRemote", component.getName());
assertEquals(new Revision(1, 1, 0), ((RepoPackage) component.getKey()).getVersion());
component = iter.next();
assertEquals("package zNewerInBeta", component.getName());
assertEquals(new Revision(2, 0, 0), ((RepoPackage) component.getKey()).getVersion());
assertFalse(iter.hasNext());
}
Aggregations