标签: eclipse-plugin

Eclipse编辑器插件:在项目外打开文件时出现"ERROR"

我正在为eclipse开发一个编辑器插件.它在eclipse项目中的文件上工作正常,但是当通过"文件 - >打开文件"菜单(用例如Java文件工作文件)打开外部文件时,我得到的页面只显示水平蓝线和单词"ERROR".eclipse的错误日志为空,与.metadata目录中的日志文件一样.

什么可能导致这个?当我没有错误消息告诉我在哪里查看时,如何诊断错误?似乎没有办法从eclipse获得更详细的日志记录.

编辑:

我发现问题的根源与jamesh提到的一样,但不是ClassCastException - IDocument文本查看器根本没有显示的实例,因为StorageDocumentProvider.createDocument()返回null.这样做的原因是它只知道如何为实例创建文档org.eclipse.ui.IStorageEditorInput,但在这种情况下它获取的实例org.eclipse.ui.ide.FileStoreEditorInput,它不实现该接口,而是实现org.eclipse.ui.IURIEditorInput

java eclipse-pde eclipse-plugin

8
推荐指数
1
解决办法
6694
查看次数

JFreeChart与SWT

我正在为eclipse开发一个插件并扩展org.eclipse.ui.views扩展点.我想使用JFreeChart在eclipse视图中绘制一些图形.是否可以在eclipse视图中使用JFreeChart和SWT?

java eclipse-plugin jfreechart

8
推荐指数
1
解决办法
3773
查看次数

构建自定义Eclipse JDT新建项目向导?

我想为我工作的一些常见Java项目开发一些项目模板.

基本上,我想在标准的New Java Project Wizard上的额外Window中捕获一些信息,然后在一堆模板文件上做一些文本替换并将它们添加到项目中.

关于如何做到这一点的教程,我一直在寻找高低,但看起来你需要真正了解Eclipse插件开发的各种方法才能获得.

任何人都可以指向我在Eclipse中自定义新项目向导的教程的方向或类似的项目,所以我可以查看源代码?

eclipse-plugin

8
推荐指数
1
解决办法
3464
查看次数

何时在创建新的Eclipse插件项目时选择"生成激活器..."

有很多Eclipse RCP教程从明显的第一步开始:"创建一个新的插件项目......"

好像差不多了.其中70%指定检查"生成激活器,控制插件生命周期的Java类".其他人特别说不要检查切换.

替代文字http://img179.imageshack.us/img179/6710/newpluginoptions.png

我不清楚,当你需要一个激活类时,为你生成什么,当你不需要时,它会为你做什么.

为了成为一个突出的选项,每次你创建一个新的插件项目(它似乎默认设置)时,这个选项在我找到的任何地方都没有得到很好的解释.

在创建Eclipse插件项目时选择此选项的任何建议/经验法则?

java eclipse eclipse-plugin eclipse-rcp eclipse-3.5

8
推荐指数
2
解决办法
5763
查看次数

以编程方式添加Java代码模板

我喜欢当Eclipse允许我使用Tab键在方法调用中跳转参数时.我希望我的插件提供类似的功能.确切地说,我正在向编辑器中注入一些文本,我想强调特定的语法,让程序员使用Tab键跳转到下一个匹配.

这是一个例子.让我们假设我动态创建了以下代码段:

String a = "bogus string";
int i = a.[?]
Run Code Online (Sandbox Code Playgroud)

我会将其注入编辑器中,我希望它[?]能够突出显示并准备好进行修改(用户可能会输入length()).此外,如果有更多[?]碎片,我希望用户使用Tab移动到下一个.

经过一番研究后,我发现可以使用模板完成.但是,我在网上找不到任何相关的例子.有没有人有这方面的经验?

更新:

我找到了两个可能有用的链接,虽然我仍然无法提出解决方案.

链接一个

链接二

java eclipse eclipse-plugin

8
推荐指数
1
解决办法
1722
查看次数

eclipse checkstyle错误无法初始化模块TreeWalker - 不允许TreeWalker作为FileLength的父级

当我尝试加载用户定义的检查样式模板时,我收到以下错误.

cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of FileLength
Run Code Online (Sandbox Code Playgroud)

我想这可能是因为我的日食与checkstyle版本不兼容.如何使用checkstyle xml文件找到合适的checkstyle版本

java eclipse eclipse-plugin checkstyle

8
推荐指数
1
解决办法
9580
查看次数

安装AJDT我有一个插件org.eclipse.jdt.ui无法加载类org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor

在Rational Software Archtect上安装AJDT 2.2.3之后,每个编辑器都显示错误:插件org.eclipse.jdt.ui无法加载类org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor我正在使用Rational Software Architect 9与Eclipse 4.2.2.使用链接(http://download.eclipse.org/tools/ajdt/42/update)安装AJDT.在网上搜索我发现了这个:http://www.eclipse.org/forums/index.php/t/74968/),但删除数据工具并不适合我.我还将数据工具更新为1.10.2,但尚未运行.

有谁能够帮我?

添加更多信息:我在首选项中搜索已安装的JRE,但是当我单击Preferences - > Java时出现错误:"创建此首选项页面时出错." 当我尝试"已安装的JRE时,我有一个弹出窗口:"无法创建所选的首选项页面.自动激活bundle org.eclipse.jdt.debug.ui时发生错误(1537)"另一件事我不确定它是否清楚.我提到的编辑器是Java文件编辑器,包浏览器,Java视图.我试图打开一个.xml文件,它似乎工作正常.

以下是Eclipse错误选项卡的图片:dl.dropboxusercontent.com/u/71227599/ajdt.PNG

这是详细信息堆栈:

org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:62)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:112)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:262)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:299)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:861)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:841)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:113)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:321)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:242)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
at …
Run Code Online (Sandbox Code Playgroud)

eclipse eclipse-plugin ajdt

8
推荐指数
2
解决办法
1万
查看次数

Google是否停止支持Android Eclipse插件?

如果问题不在这里,我会将其删除.

有人知道Android是否已停止支持Eclipse插件?现在,当你从google搜索"Android SDK"进入他​​们的网站时,你可以下载Android Studio,我找不到Eclipse插件的位置......我记得他们说他们不会停止支持它,但是好吧,谷歌毕竟...所以有人知道吗?

eclipse android eclipse-plugin android-studio

8
推荐指数
1
解决办法
3113
查看次数

这是什么意思:'私有'修饰符与JLS建议无序

在将'final'添加到myItem声明之前,我首先收到此警告:

私人领域'myItem'可以成为最终的; 它只在声明或构造函数中初始化.

private Item myItem;
Run Code Online (Sandbox Code Playgroud)

添加最终后,这是我得到的警告:

"私有"修饰符与JLS建议无关.

final private Item myItem;
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么我得到这个?我做了一些研究,但似乎无法找到解决这个问题的任何东西.

java warnings field eclipse-plugin

8
推荐指数
2
解决办法
1万
查看次数

GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'在ubuntu中出现问题

org.eclipse.m2e.logback.configuration:在初始化状态位置之前激活了org.eclipse.m2e.logback.configuration包.将在状态位置初始化后重试.

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= NULL'失败

(Eclipse:5550):GLib-CRITICAL**:g_base64_encode_step:断言'in!= …

java eclipse ubuntu eclipse-plugin

8
推荐指数
1
解决办法
5039
查看次数