microsoft / azure-devops-intellij

IntelliJ IDEA plug-in for Visual Studio Team Services and Team Foundation Server (TFS)
MIT License
149 stars 95 forks source link

"Manage Workspaces" action in Rider triggers ToolException KEY_TF_HOME_NOT_SET #483

Open josefblaha opened 2 years ago

josefblaha commented 2 years ago

When I trigger "Manage Worspaces..." action in Rider, I get the below exception. It's same as in #417, but with a different callstack.

com.microsoft.alm.plugin.external.exceptions.ToolException: KEY_TF_HOME_NOT_SET
    at com.microsoft.alm.plugin.external.tools.TfTool.getValidLocation(TfTool.java:67)
    at com.microsoft.alm.plugin.external.commands.Command.run(Command.java:148)
    at com.microsoft.alm.plugin.external.commands.Command.runSynchronously(Command.java:228)
    at com.microsoft.alm.plugin.external.utils.CommandUtils.getAllWorkspaces(CommandUtils.java:166)
    at com.microsoft.alm.plugin.idea.tfvc.ui.management.ManageWorkspacesModel$ServerWorkspaceContentProvider.getRoots(ManageWorkspacesModel.java:258)
    at com.microsoft.alm.plugin.idea.common.ui.common.treetable.CustomTreeTable.createModel(CustomTreeTable.java:134)
    at com.microsoft.alm.plugin.idea.common.ui.common.treetable.CustomTreeTable.initialize(CustomTreeTable.java:172)
    at com.microsoft.alm.plugin.idea.tfvc.ui.management.ManageWorkspacesForm.setShowWorkspaces(ManageWorkspacesForm.java:236)
    at com.microsoft.alm.plugin.idea.tfvc.ui.management.ManageWorkspacesDialog.createCenterPanel(ManageWorkspacesDialog.java:71)
    at com.intellij.openapi.ui.DialogWrapper.init(DialogWrapper.java:1309)
    at com.microsoft.alm.plugin.idea.common.ui.common.BaseDialogImpl.<init>(BaseDialogImpl.java:59)
    at com.microsoft.alm.plugin.idea.tfvc.ui.management.ManageWorkspacesDialog.<init>(ManageWorkspacesDialog.java:44)
    at com.microsoft.alm.plugin.idea.tfvc.ui.management.ManageWorkspacesController.<init>(ManageWorkspacesController.java:22)
    at com.microsoft.alm.plugin.idea.tfvc.actions.ManageWorkspacesAction.actionPerformed(ManageWorkspacesAction.java:35)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:244)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:265)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:244)
    at com.intellij.ide.actions.GotoActionAction.performActionImpl(GotoActionAction.java:111)
    at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:84)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
    at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        ...

My environment: Azure DevOps plugin 1.162.0 Rider 2021.3.3 Build #RD-213.6775.4 Runtime version: 11.0.13+7-b1751.25 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Windows 11 21H2

ForNeVeR commented 2 years ago

Most likely, you haven't configured the TFVC client in the plugin settings.

josefblaha commented 2 years ago

@ForNeVeR Why should I do that? I connect to Azure DevOps with Git repository. I don't use TFVC.

josefblaha commented 2 years ago

Oh I see. The action "Manage Worspaces..." comes from the plugin, not Rider itself, right? I thought it relates to Rider workspaces.

ForNeVeR commented 2 years ago

Manage Workspaces is an action for managing the TFVC workspaces, which, I agree, is named poorly.

josefblaha commented 2 years ago

OK, now it makes sense. I suggest to: