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
  • Loading branch information
tpasternak committed Nov 15, 2023
1 parent 73cde7e commit 25550d6
Showing 1 changed file with 5 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,9 @@ 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 25550d6

Please sign in to comment.