use of com.android.tools.idea.gradle.project.sync.hyperlink.OpenUrlHyperlink in project android by JetBrains.
the class GradleVersionReader method getQuickFixes.
@Override
@NotNull
public List<NotificationHyperlink> getQuickFixes(@NotNull Module module, @Nullable VersionRange expectedVersion, @Nullable PositionInFile location) {
List<NotificationHyperlink> quickFixes = new ArrayList<>();
AndroidPluginInfo pluginInfo = AndroidPluginInfo.find(module.getProject());
if (pluginInfo != null) {
GradleVersion pluginVersion = GradleVersion.parse(pluginInfo.getPluginGeneration().getLatestKnownVersion());
GradleVersion gradleVersion = GradleVersion.parse(GRADLE_LATEST_VERSION);
String text = "Fix Gradle version (as part of the update, the Android plugin will be updated to version " + pluginVersion + ")";
quickFixes.add(new FixAndroidGradlePluginVersionHyperlink(text, pluginVersion, gradleVersion));
}
quickFixes.add(new OpenUrlHyperlink("https://developer.android.com/studio/releases/index.html#Revisions", "Open Documentation"));
return quickFixes;
}
use of com.android.tools.idea.gradle.project.sync.hyperlink.OpenUrlHyperlink in project android by JetBrains.
the class ExpiredPreviewBuildSetupStep method setUpProject.
@Override
public void setUpProject(@NotNull Project project, @Nullable ProgressIndicator indicator) {
if (myExpirationChecked) {
return;
}
String ideVersion = myApplicationInfo.getFullVersion();
if (isPreview(ideVersion)) {
// Expire preview builds two months after their build date (which is going to be roughly six weeks after release; by
// then will definitely have updated the build
Calendar expirationDate = (Calendar) myApplicationInfo.getBuildDate().clone();
expirationDate.add(MONTH, 2);
Calendar now = Calendar.getInstance();
if (now.after(expirationDate)) {
String message = String.format("This preview build (%1$s) is old; please update to a newer preview or a stable version.", ideVersion);
OpenUrlHyperlink hyperlink = new OpenUrlHyperlink("http://tools.android.com/download/studio/", "Show Available Versions");
AndroidGradleNotification.getInstance(project).showBalloon("Old Preview Build", message, INFORMATION, hyperlink);
// If we show an expiration message, don't also show a second balloon.
myExpirationChecked = true;
}
}
}
use of com.android.tools.idea.gradle.project.sync.hyperlink.OpenUrlHyperlink in project android by JetBrains.
the class LayoutRenderingIssueValidationStrategy method fixAndReportFoundIssues.
@Override
void fixAndReportFoundIssues() {
if (myModelVersion != null) {
String text = String.format("Using an obsolete version of the Gradle plugin (%1$s);", myModelVersion);
text += " this can lead to layouts not rendering correctly.";
SyncMessage message = new SyncMessage(DEFAULT_GROUP, WARNING, text);
message.add(Arrays.asList(new FixAndroidGradlePluginVersionHyperlink(), new OpenUrlHyperlink("https://code.google.com/p/android/issues/detail?id=170841", "More Info...")));
SyncMessages.getInstance(getProject()).report(message);
}
}
use of com.android.tools.idea.gradle.project.sync.hyperlink.OpenUrlHyperlink in project android by JetBrains.
the class NdkIntegrationDeprecatedErrorHandler method getQuickFixHyperlinks.
@Override
@NotNull
protected List<NotificationHyperlink> getQuickFixHyperlinks(@NotNull NotificationData notification, @NotNull Project project, @NotNull String text) {
List<NotificationHyperlink> hyperlinks = new ArrayList<>();
hyperlinks.add(new OpenUrlHyperlink("https://developer.android.com/studio/build/experimental-plugin.html", "Consider trying the new experimental plugin"));
hyperlinks.add(new SetUseDeprecatedNdkHyperlink());
return hyperlinks;
}
use of com.android.tools.idea.gradle.project.sync.hyperlink.OpenUrlHyperlink in project android by JetBrains.
the class UnknownHostErrorHandler method getQuickFixHyperlinks.
@Override
@NotNull
protected List<NotificationHyperlink> getQuickFixHyperlinks(@NotNull NotificationData notification, @NotNull Project project, @NotNull String text) {
List<NotificationHyperlink> hyperlinks = new ArrayList<>();
NotificationHyperlink enableOfflineMode = ToggleOfflineModeHyperlink.enableOfflineMode(project);
if (enableOfflineMode != null) {
hyperlinks.add(enableOfflineMode);
}
hyperlinks.add(new OpenUrlHyperlink("https://docs.gradle.org/current/userguide/userguide_single.html#sec:accessing_the_web_via_a_proxy", "Learn about configuring HTTP proxies in Gradle"));
return hyperlinks;
}
Aggregations