VSCode中的OmniPascal的Ordner nicht angegeben [英] Ordner nicht angegeben with OmniPascal in VSCode

查看:218
本文介绍了VSCode中的OmniPascal的Ordner nicht angegeben的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 OmniPascal :

Ordner nicht angegeben

Ordner nicht angegeben

其翻译为:

未指定文件夹

Folder not specified

确保设置用户 settings.json 中的路径的第一个想法:

The first thought to ensure the paths in user settings.json are set:

  • objectpascal.delphiInstallationPath
  • objectpascal.objectpascal.searchPath
  • objectpascal.delphiInstallationPath
  • objectpascal.objectpascal.searchPath

当然应该是一棵错误的树:

Would of course be a wrong tree to bark up:

settings.json :

// Place your settings in this file to overwrite the default settings
{
    "objectpascal.delphiInstallationPath": "D:\\Programs\\Embarcadero\\Studio\\14.0",
    "objectpascal.searchPath": "D:\\Delphi Components"
}

错误肯定来自OmniPascal,因为它是一个字符串

The error is definitely coming from OmniPascal, as it is a string inside

bin \ win \ OmniPascalServer.exe

bin\win\OmniPascalServer.exe

匿名遇到了同样的问题:

当我通过在Windows资源管理器中右键单击文件来打开.pas文件时,该文件可以正确打开,但是随后会出现一条消息对话框,其中显示"Ordner nicht angegeben"和确定"按钮.

When I open a .pas file by right clicking on the file in windows explorer, the file opens correctly, but then a messagedialog appears with "Ordner nicht angegeben"' and an OK button.

是否可以调试代码?

我可以在VSCode中看到工作区根路径的变量:

objectPascalServiceClient.js

var config = vscode.workspace.getConfiguration('objectpascal');  
var delphiSDK = config.get('delphiInstallationPath', '');
var searchPath = config.get('searchPath', '');                                                                
var workspacePath = vscode.workspace.rootPath;
if (typeof delphiSDK == 'undefined')
   delphiSDK = "";
if (typeof searchPath == 'undefined')
   searchPath = "";                            

if (isWin) {
    childProcess = cp.spawn(path.join(__dirname, 'bin/win/OmniPascalServer.exe'), [workspacePath, delphiSDK, searchPath]);
                    }

有源代码吗?

OmniPascal似乎已经废弃了.是否有源代码可以让人们尝试准确地解密?

Is there source code?

It looks like OmniPascal is abandonware. Is there source code out there where someone can try to decipher exactly?

real 问题是如何摆脱使用该窗口阻止的模式对话框.

The real question is how to get rid of the modal dialog that blocks using the window.

推荐答案

OmniPascal似乎已经废弃了

It looks like OmniPascal is abandonware

不,即使最近几个月没有新的公开发布,也绝对不是放弃软件. OmniPascal仍在积极开发中.

No it's definetely not abandonware even though there was no new public release within the last months. OmniPascal is still in active development.

真正的问题是如何摆脱使用该窗口阻止的模式对话框.

The real question is how to get rid of the modal dialog that blocks using the window.

此错误消息来自2016年4月14日发行的(当前)0.10.0版本中VSCode的OmniPascal插件附带的OmniPascalServer.exe.

This error message is coming from OmniPascalServer.exe shipped with the OmniPascal plugin for VSCode in (the current) version 0.10.0 released on 2016-04-14.

版本<的变通办法; 0.11.0

据我所知,仅当在Visual Studio Code中打开的文件而不是文件夹中打开时,才会出现此错误消息.因此,最简单的解决方法是打开包含您要使用的文件的文件夹:

As far as I know this error message only appears when a file is opened in Visual Studio Code instead of a folder. So the simplest workaround is to open the folder which contains the file(s) you want to work with:

  • 通过命令行:键入code C:\Projects\MyProjectRootFolder
  • 使用Windows资源管理器:在文件夹(或文件夹内的白色区域)上单击鼠标右键,然后选择使用代码打开. 请勿选择.pas文件打开VSCode!
  • 在VSCode中:转到File -> Open Folder...
  • By command line: Type code C:\Projects\MyProjectRootFolder
  • With the Windows Explorer: Perform a right click on the folder (or a white area inside the folder) and select Open with Code. Do not select a .pas file to open VSCode!
  • From within VSCode: Go to File -> Open Folder...

或应用此修补程序

  • 打开文件C:\Users\USERNAME\.vscode\extensions\Wosi.omnipascal-0.10.0\objectPascalServiceClient.js
  • 替换此行

  • Open the file C:\Users\USERNAME\.vscode\extensions\Wosi.omnipascal-0.10.0\objectPascalServiceClient.js
  • Replace this line

var workspacePath = vscode.workspace.rootPath;

使用这些行

var workspacePath = vscode.workspace.rootPath;
if (typeof workspacePath == 'undefined') {
    var filePath = vscode.workspace.textDocuments[0].fileName;
    workspacePath = path.dirname(filePath);
} 

现在该错误应该不再出现.

Now the error should no longer appear.

这篇关于VSCode中的OmniPascal的Ordner nicht angegeben的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆