简体   繁体   English

Eclipse如何知道Swing Designer是否可用于JFrame派生的类?

[英]How does Eclipse know whether the Swing Designer is available for a JFrame-derived class?

I am using Google Web Toolkit's Swing Designer in Eclipse to create and edit components like custom JFrame's. 我正在Eclipse中使用Google Web Toolkit的Swing Designer创建和编辑自定义JFrame之类的组件。

The problem is that the Design View is sometimes broken for my class (probably because the project is also being edited by another person in a different platform), and I want to know how to restore it. 问题是我的班级有时会断开设计视图(可能是因为该项目也正在由另一个平台上的另一个人编辑),并且我想知道如何还原它。 In other words, I am able to edit the code for a custom JFrame, but I cannot use the visual editor to modify the JFrame anymore. 换句话说,我能够编辑自定义JFrame的代码,但是我不能再使用可视化编辑器来修改JFrame。 I notice that the icon for my JFrame's source code also changes to a normal java-source-code icon when the design view is broken. 我注意到,当设计视图损坏时,JFrame源代码的图标也更改为普通的Java源代码图标。

In which file does Eclipse keep track of what JFrame's can be edited using the visual editor and which ones not? Eclipse会在哪个文件中跟踪可以使用可视化编辑器编辑哪些JFrame,哪些不可以?

Thanks in advance. 提前致谢。

如果要在设计器中打开文件,但是默认情况下不会打开文件,请右键单击“ 打开方式”>“ WindowBuilder编辑器”

If you don't see the Design tab, that means that you are just using the standard Eclipse Java Editor rather than the WindowBuilder editor. 如果没有看到“ 设计”选项卡,则意味着您仅在使用标准的Eclipse Java编辑器,而不是WindowBuilder编辑器。 Eclipse allows you to use different editors via the Open With command. Eclipse允许您通过“ 打开方式”命令使用不同的编辑器。 This is very basic Eclipse behavior, so it is something you should learn about. 这是非常基本的Eclipse行为,因此您应该了解这一点。 This is also covered in the WB docs and FAQ . WB 文档FAQ中也对此进行了介绍。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM