我正在为Mountain Lion开发Eclipse Juno插件.
我可以通过run as> 来测试我的插件没有问题Eclipse application.
但是,当我尝试通过执行以下操作导出插件时,它会失败.
plugin.xmlOverviewExport Wizard它返回以下错误:
/Users/luca/Documents/University/PhD/FODA/.metadata/.plugins/org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/compile.org.eclipse.pde.container.feature.xml:4: The following error occurred while executing this line:
/Users/luca/Documents/University/PhD/FODA/it.unibg.robotics.featuremodels.model/build.xml:31: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/Classes does not exist.
The following error occurred while executing this line:
/Users/luca/Documents/University/PhD/FODA/it.unibg.robotics.featuremodels.model/build.xml:31: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/Classes does not exist.
Run Code Online (Sandbox Code Playgroud)
有什么问题?
我有一个TableViewer在view我的RCP应用程序.在TableViewer具有List的objects作为输入.是否可以selection使用我设置为输入的List中的对象的索引为特定对象创建TableViewer?例如,我想在每次打开应用程序时为第三个对象设置默认选择.如何设置选择?
我试图使用TCP/IP Monitor监控请求.
但是,我看到有两个端口正在使用中.一个是应用程序端口[8080]和其他监视端口[9833].
任何人都可以告诉,为什么有两个不同的端口?
当我启动应用程序时,它将在9833而不是8080启动.为什么会发生这种变化?
我正在编写一个eclipse插件,项目环境配置正确(我相信).
我能够编译解决方案而没有任何编译时错误.以下是在调试解决方案时抛出异常的代码片段.我确信所有必需的插件和外部jar都配置正确.
我尝试了几乎所有用户在互联网上建议的方法,但没有任何效果.(我甚至根据他们的建议改变了代码).
所以请你告诉我为什么我会低于错误并建议替代方法.
public static IProject getCurrentSelectedProject() {
try {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject[] projects = workspace.getRoot().getProjects();
for (int i = 0; i < projects.length; i++) {
IProject project = projects[i];
if ((project.isOpen())) {
return project;
}
}
} catch (Throwable ex) {
ex.printStackTrace();
}
return null;
}
Run Code Online (Sandbox Code Playgroud)
以下是我收到的错误
java.lang.NoClassDefFoundError: org/eclipse/core/resources/ResourcesPlugin
at com.prithvi.editor.actions.UploadAction.getCurrentSelectedProject(UploadAction.java:81)
at com.prithvi.editor.actions.UploadAction.run(UploadAction.java:39)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at …Run Code Online (Sandbox Code Playgroud) 我正在尝试为eclipse中的Compare With菜单贡献一个动作,但我找不到用于我的动作的id menuPath.
Go to Previous line visited编辑器中是否有任何快捷方式.
谢谢 ,
卡纳安
我想像电子表格一样创建GUI.具有可调整大小的单元格,填充颜色,放大和缩小等功能.我可以使用draw2d吗?
在任何基于Java的GUI框架中是否有像小部件一样的网格?或者我需要在行和列中绘制矩形?
在此代码中,prosseek.B #bar()方法调用prosseek.SuperA#foo().
package prosseek;
public class SuperA {
int i = 0;
public void foo()
{
System.out.println(i);
}
}
public class B {
public void bar()
{
SuperA a = new SuperA();
a.foo();
}
}
Run Code Online (Sandbox Code Playgroud)
我需要检测bar()中调用的foo()的类型.我使用ASTVisitor来检测MethodInvocation代码(a.foo()),但我不知道我该怎么办才能从中获取SuperA类型.
ICompilationUnit icu = type.getCompilationUnit();
final ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(icu);
parser.setResolveBindings(true); // we need bindings later on
CompilationUnit unit = (CompilationUnit) parser.createAST(null);
unit.accept(new ASTVisitor() {
public boolean visit(MethodInvocation methodInvocation)
{
// ???
return false;
}
}
Run Code Online (Sandbox Code Playgroud)
我从JDT基础知识教程中得到了提示.

我尝试了以下代码:
IBinding binding …Run Code Online (Sandbox Code Playgroud) 我想将自定义视图添加到"窗口"菜单中.此代码仅添加打开的视图
IMenuManager pencereler = new MenuManager("sample");
pencereler.add(ContributionItemFactory.VIEWS_SHORTLIST.create(window));
viewMenu.add(pencereler);
Run Code Online (Sandbox Code Playgroud)
如果我打开自定义视图,则会将其添加到此菜单中.但是,我想在此菜单中始终显示我的自定义视图,而不仅仅是在打开它之后.
那么我可以从视图中创建"ContributionItem"还是有任何其他方式,例如向"plugin.xml"添加一些行或将我的视图的id添加到任何扩展名?
这不是Spring Tool Suite缺少Spring MVC项目模板的重复
使用STS 2.9.2并在我的插件文件夹中包含com.springsource.sts.wizard_2.9.2.201205071000-RELEASE.
我想使用Spring MVC项目模板,但无法在仪表板上或"New-> Other-> SpringSource Tool Suite"菜单下找到它.
我不想进行新安装,存在大量已安装的插件.

eclipse-plugin ×10
eclipse ×5
eclipse-rcp ×4
java ×3
draw2d ×1
eclipse-jdt ×1
eclipse-juno ×1
http ×1
jface ×1
macos ×1
menu ×1
plugins ×1
servlets ×1
spring ×1
swt ×1
tcp-ip ×1
view ×1