use of com.intellij.pom.NavigatableAdapter in project intellij by bazelbuild.
the class BlazePythonSyncPlugin method validateProjectView.
@Override
public boolean validateProjectView(@Nullable Project project, BlazeContext context, ProjectViewSet projectViewSet, WorkspaceLanguageSettings workspaceLanguageSettings) {
ProjectViewFile topLevelProjectViewFile = projectViewSet.getTopLevelProjectViewFile();
if (!supportsPythonWorkspaceType() && workspaceLanguageSettings.isWorkspaceType(WorkspaceType.PYTHON)) {
String msg = "Python workspace type is not supported (and is unnecessary) for this IDE. ";
boolean fixable = topLevelProjectViewFile != null && topLevelProjectViewFile.projectView.getScalarValue(WorkspaceTypeSection.KEY) == WorkspaceType.PYTHON;
msg += fixable ? "Click here to remove it, retaining python support" : "Please remove it and resync.";
IssueOutput.error(msg).navigatable(project == null || !fixable ? null : new NavigatableAdapter() {
@Override
public void navigate(boolean requestFocus) {
fixLanguageSupport(project, true);
}
}).submit(context);
return false;
}
return true;
}
Aggregations