问题标签 [jsdt]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2096 浏览

java - 基于 Eclipse JSDT 的编辑器的内容辅助

在 Eclipse 中,内容辅助通常由某个类implements IContentAssistProcessorJavaDoc示例)实现

如何CompletionProposal为基于 JSDT 的编辑器实现相同的 s?

我知道的唯一示例是http://code.google.com/a/eclipselabs.org/p/jsdt-jquery/,但它很大且不清楚如何扩展 JSDT 以进行代码辅助。

JSDT 中还有其他 API 吗?请指出要使用的 API。

相关
如何通过添加新功能在 Eclipse 中扩展 JSDT 中的 javascript 编辑器

0 投票
2 回答
2578 浏览

java - Eclipse JSDT 的 javaCompletionProposalComputer 内容辅助不提供建议

Eclipse JSDT 的内容辅助org.eclipse.wst.jsdt.ui.javaCompletionProposalComputer没有给出任何建议。

Preferences -> JavaScript -> Editor -> Content Assist -> Advanced “Nodeclipse Proposals”中可见并被选中。

根据 Bananaweizen 对基于 Eclipse JSDT 的编辑器的内容协助的建议

在 plugin.xml 中

JSDTProposalComputer只是NodeContentAssistant
(实现IContentAssistProcessor)的包装器,对于基于 TextEditor 的编辑器非常有效。

帮助的例子是

所有代码都在 GitHUbcontentassist包上https://github.com/Enide/nodeclipse-1/tree/master/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist

0 投票
1 回答
369 浏览

eclipse - 如何在 Nodeclipse .njs 文件格式化程序中将制表符更改为空格

为 JS 文件编辑器设置 Code Formatter Preferences 很容易,但是 Nodeclipse Node.js 文件编辑器呢?

0 投票
1 回答
204 浏览

javascript - Eclipse 插件开发 - JavaDoc 类似于 JavaScript 的悬停提示 (Eclipse JSDT)

如何为 JavaScript (Eclipse JSDT) 实现悬停提示。

我希望当用户将鼠标悬停在某个关键字上时,会显示一些描述,例如代码完成中的描述:


(来源:nodeclipse.org

但是该描述也应该是将该窗口移动到 Windows 底部的视图堆栈中的方法(就像 JavaDoc 一样)

0 投票
1 回答
100 浏览

javascript - Eclipse keeps rebuilding an accurate model of the universe after every keystroke

I've tried so much I'm almost breaking my laptop on my forehead. But it was an expensive piece of equipment and I need it for my job, so I will try StackOverflow first.

I've got this huge Node.JS project in Eclipse. Eclipse has always been sluggish, but now it's gotten to the point where after every few keystrokes, Eclipse will freeze for minutes with the processor at 100%, often ending with some random useless error message like garbage collection ran out of memory or whatever.

Whatever it is, I don't need it to happen after every few keystrokes! Sometimes, this error message appears, with the advise to disable Template Proposals. I've had the same dialog advising me to disable pretty much everything else that is useful, to the point that Eclipse is starting to become quite similar to your next enhanced Notepad application.

enter image description here

  • Is it really so impossible to have IDE-trickery such as code assist and completion (AKA the whole reason to use an IDE in the first place) with Eclipse, even working with projects bigger than two lines of code?
  • Why would Ctrl+Space take a minute of 100% CPU when the only assist I have enabled is a handful of templates and the others are disabled? enter image description here

Please share the secret option with me that makes Eclipse usable.


0 投票
2 回答
2384 浏览

eclipse - Eclipse 中的任务视图不显示 TODO?

我正在使用 Nodeclipse 运行 Eclipse Kepler,并且无法让 Tasks 视图显示我的标记。

  1. 我已将自己的 FEATURE 标签定义为“文本包含 FEATURE”,但它没有显示出来。

  2. 我不能将我的 node.js 任务限制在我自己的项目中。当我将其设置为“全部显示”时,它会向我显示来自我正在使用的节点模块的数百个任务。当我将其设置为屏幕截图时,它不再向我显示任何任务。

我可以忍受 1. 但 2. 对我来说是一个严重的问题......这是 Kepler 中的错误还是我有配置错误?

这就是我配置它的方式:

任务视图设置

我的项目在选定的工作集中。任务标签在 Preferences->Javascript 中启用。

更新

事实证明这是几个相关的问题,所以这里尝试组织和总结已经取得的进展:(以下所有内容仅涉及问题的第 2 点)

  1. 不尊重所选范围的“全部显示”是所需的行为。范围是配置的一部分(UI 通过将它们放在“配置”组窗格中来暗示这一点),“显示全部”设置会绕过它。所以这实际上不是功能错误,只是误导用户界面。我在这里提出了这个问题

  2. 可以通过转到首选项 -> Javascript -> 验证器 -> 任务标签,更改某些内容并应用来解决根本没有显示的 Javascript 任务。这会触发重建并合并代码中的任何任务标签。但是,未来的任务不会自动合并。这似乎是一个已知问题。

  3. 节点模块污染任务视图的问题可以通过将文件夹设置为库文件夹而不是源文件夹来解决。请参阅此问题的答案

0 投票
1 回答
5606 浏览

javascript - 如何使 JavaScript 函数在 Eclipse“大纲视图”中可见?

我有这样的代码,但如果它在匿名函数中定义,则无法打开函数大纲 - 类没有问题。

我该如何概述something2- 请分享一些提示?

我可以将所有函数标记为构造函数,但这是无效的方法。

坏轮廓截图

我测试了所有过滤选项、jsdoc 并研究了 Eclipse 首选项,但不知道该怎么做才能something2在大纲视图中显示?

第二次尝试

0 投票
0 回答
330 浏览

javascript - How to add jsdoc for Eclipse jsdt to have auto-completion for anonymous function?

See example I trying to use autocompletion and document code together but @param information is ignored - how to do jsdoc correctly?

0 投票
0 回答
183 浏览

java - Eclipse Plugin Development - 修改JavaScript编辑器的大纲

我正在为JOII编写一个 Eclipse 插件,但在 JavaScript 编辑器中修改大纲时遇到了困难。

我有一个 ContentAssistant,它为我提供了一个列表ICompletionProposalIJavaCompletionProposalComputer完美地运行,在我输入时给我很好的代码完成。但是,它没有大纲(除了默认的 javascript 内容)。

所以问题是:我如何将 ContentAssistant 连接到改变/更新大纲视图的东西中?

我正在使用插件解析的示例代码:

在大纲中,“SomeClass”显示为:SomeClass : Any,但我希望它显示为具有成员的实际类。

我整天(字面上)一直在寻找一个例子,但没有运气..

提前致谢!!

0 投票
1 回答
1237 浏览

jquery - JSDT JQuery 自动完成功能不起作用

我正在使用 eclipse(版本:Luna Release (4.4.0))和使用“SPKET”Ext JS 4 (jsb2) 文件的 Java Script 代码辅助。我尝试了很多让它适用于 JQuery,但它不起作用。我已完成以下步骤:

  1. 通过eclipse下载安装JSDT JQuery Integration软件。版本是 1.7.0
  2. 使用 'Window -> preferenes -> Spket -> JavaScript profile -> new -> 映射的 jQuery 路径。但它的代码辅助不起作用。
  3. 我创建了 Java 脚本项目来测试它,但没有工作,甚至尝试使用动态 Web 项目但没有运气。使用 jsb2 文件的 Java Script 遵循的相同步骤对我有用,但 Jquery 有问题。花 2 天时间做这个配置,但失败了。