Skip to content

Commit

Permalink
Fix 'Non-blaze project is provided' error in GoLand
Browse files Browse the repository at this point in the history
closes #5703
  • Loading branch information
tpasternak committed Nov 15, 2023
1 parent 73cde7e commit c393d52
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import com.google.idea.blaze.base.lang.buildfile.psi.BuildFile;
import com.google.idea.blaze.base.lang.buildfile.psi.FuncallExpression;
import com.google.idea.blaze.base.model.BlazeProjectData;
import com.google.idea.blaze.base.settings.Blaze;
import com.google.idea.blaze.base.settings.BlazeImportSettings;
import com.google.idea.blaze.base.sync.SyncCache;
import com.google.idea.blaze.base.sync.data.BlazeProjectDataManager;
import com.intellij.codeInsight.navigation.CtrlMouseHandler;
Expand Down Expand Up @@ -69,6 +71,10 @@ public Collection<GoPackage> resolve(

@Nullable
static BlazeGoPackage doResolve(String importPath, Project project) {
if (Blaze.getProjectType(project) == BlazeImportSettings.ProjectType.UNKNOWN) {
return null;
}

BlazeProjectData projectData =
BlazeProjectDataManager.getInstance(project).getBlazeProjectData();
if (projectData == null) {
Expand Down

0 comments on commit c393d52

Please sign in to comment.