我想开发一个Eclipse插件,它可以获取特定方法的所有可见变量.例如:
public class testVariable {
String test1;
Object test2;
void method_test1(){
int test3,test4;
}
void method_test2(){
int test5,test6;
//get variable here!!!!
}
}
Run Code Online (Sandbox Code Playgroud)
我只想得到可见的变量是:test1, test2,test5,test6在方法中method_test2.我能做什么?
我经常从Eclipse切换到Netbeans并返回.Netbeans中有一个功能,允许您在存储库中查看代码中已更改的行.
例:

Eclipse中有类似的东西吗?
有没有人设法检查Eclipse Papyrus中建模的类图上的OCL约束?我已经定义了一个简单的测试配置文件,只对一个构造型属性有一个约束:
{OCL} self.property > 0
Run Code Online (Sandbox Code Playgroud)
构造型扩展了Property元类,因此我将它应用于类属性,并将构造型的属性设置为0.但是我从未在上下文菜单中使用Validation> Validate Model命令出错.
任何帮助都会非常感激.
谢谢你提前.
我正在使用Eclipse CDT和egit,我需要从多个存储库构建一个项目.一个包含源代码的主体,另一个包含用作构建过程一部分的实用程序脚本(在构建其他几个项目时也使用它们).
我很难理解我是否可以通过这种设置明智地工作.我无法弄清楚如何将CDT项目与多个git存储库相关联,这意味着我无法对项目中的某些文件执行VCS操作.
我希望能够右键单击工作区中的任何文件,并且能够确定它所在的存储库,从而正确执行操作(历史记录,责备...).有没有人设法做到这一点,或者你能指出我无法找到的文档,因为大量的"单个回购中的多个项目"指南.
每次我更新Appengine SDK时,我都必须手动将Eclipse /插件中的一些JAR文件复制粘贴到WEB-INF/lib文件夹中.原因是我在Eclipse上遇到"丢失文件"错误,直到我这样做.
为什么Eclipse不在插件文件夹中查找JAR?有没有办法在构建路径上配置它?谢谢
我现在面对这个问题大约一个小时,我不知道我做错了什么.你在我的plugin.xml代码中看到错误了吗?
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="de.tps.client.workspace.perspective">
<view
closeable="true"
id="de.tps.client.inboxplusplus.views.inboxplusplusview"
minimized="false"
moveable="true"
ratio="0.3"
relationship="bottom"
relative="de.tps.client.iteminfo.view"
showTitle="false"
standalone="false"
visible="true">
</view>
</perspectiveExtension>
Run Code Online (Sandbox Code Playgroud)
并且观点:
<extension
point="org.eclipse.ui.views">
<view
allowMultiple="false"
category="com.contmgmt.client.category"
class="de.tps.client.inboxplusplus.views.Inboxplusplusview"
id="de.tps.client.inboxplusplus.views.inboxplusplusview"
name="%view.inbox.name"
restorable="true">
</view>
Run Code Online (Sandbox Code Playgroud)
任何建议将受到高度赞赏.
我在pom.xml中添加了以下代码段,但是在eclipse中,执行部分错误提示:
Plugin execution not covered by lifecycle configuration: com.mysema.maven:maven-apt-plugin:1.0.3:process (execution: default, phase: generate-sources)
Run Code Online (Sandbox Code Playgroud)
虽然当我从命令行运行mvn clean install时,它仍然可以正常工作。
<build>
<plugins>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>${project.basedir}/target/generated-sources/java</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
<processors>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</processors>
<showWarnings>true</showWarnings>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
从命令行运行后,它会生成查询dsl类(QClasses),但是从eclipse中不会生成它们。
另外,当我从eclipse运行我的应用程序时,它给出以下错误:
Caused by: java.lang.ClassNotFoundException: xxx.QClass
Run Code Online (Sandbox Code Playgroud)
Eclipse Maven插件有问题吗?我该如何解决?
我有一个必须返回布尔值的方法.该方法具有对run方法的异步调用.在run方法中,我必须在封闭方法中设置变量.下面是我的代码.
private boolean isTrue() {
boolean userAnswer;
Display.getDefault().asyncExec(new Runnable() {
public void run() {
userAnswer = MessageDialog.openQuestion(new Shell(), "some message", "some question?");
}
});
return userAnswer;
}
Run Code Online (Sandbox Code Playgroud)
这段代码给出了错误 - "userAnswer"必须是最终的,如果我做到最后我不能为它分配一个值.请建议一种处理此方案的方法.
没有教程提供了如何创建国际化插件片段的具体示例.我需要翻译到plugin.xml和源代码文件.试着把头转过去翻译的地方,以及i18n门面的去处.
1.该片段如何应用于多插件企业应用程序,更重要的是,所有这些插件如何将其字符串外部化到片段中的相应文件夹中?
2. 外部JAR怎么样?该机制如何为外部资源提供翻译支持?
3.有远程风险,是否可以提供a view或perspective?的独立翻译?不一定是在运行时,因为我知道bundle无法动态切换.
我想从我的数据库中为几个表(不是全部)创建一个Hibernate映射文件.我怎样才能做到这一点?
当我尝试时,它正在考虑我的整个数据库并崩溃而不创建任何映射文件.它给了我以下错误:
org.hibernate.cfg.JDBCBinderException:为'org.hibernate.mapping.Table(AG_TXN.sys.check_constraints)生成的重复类名'CheckConstraints'.为'org.hibernate.mapping.Table(AG_TXN.sys.check_constraints)生成的相同名称'
org.hibernate.cfg.JDBCBinderException:为'org.hibernate.mapping.Table生成的重复类名'CheckConstraints'(AG_TXN.sys. CHECK_CONSTRAINTS)".为'org.hibernate.mapping.Table(AG_TXN.sys.check_constraints)生成的相同名称
eclipse-plugin ×10
eclipse ×5
java ×4
eclipse-cdt ×1
eclipse-jdt ×1
eclipse-rcp ×1
egit ×1
git ×1
gwt ×1
hibernate ×1
jar ×1
m2eclipse ×1
netbeans ×1
ocl ×1
papyrus ×1
querydsl ×1
rcp ×1
uml ×1