简体   繁体   English

Eclipse WindowBuilder 设计选项卡是空的?

[英]Eclipse WindowBuilder Design Tab is Empty?

I'm new to the WindowBuilder tool of Eclipse (or any frontend dev), and I installed WindowBuilder, SWT to check it out.我是 Eclipse(或任何前端开发人员)的 WindowBuilder 工具的新手,我安装了 WindowBuilder、SWT 来检查它。 When creating a new project, I go to:创建新项目时,我转到:

New > Others > WindowBuilder > SWT Designer > SWT/JFace Java Project新建 > 其他 > WindowBuilder > SWT 设计器 > SWT/JFace Java 项目

When creating a new class, I go to:创建新类时,我转到:

New > Others > WindowBuilder > Swing Designer > Application Window or JFrame , or Under > SWT Designer > SWT >Application Window .新建 > 其他 > WindowBuilder > Swing Designer > Application WindowJFrame ,或 Under > SWT Designer > SWT >Application Window

This generates an initial Main code and I have Source and Design Tabs below.这会生成一个初始的主代码,我在下面有源和设计选项卡。 My problem is that when going to the design tab it's always empty as seen below:我的问题是,转到设计选项卡时,它始终为空,如下所示:

在此处输入图片说明

The initial code in class has this:类中的初始代码是这样的: 在此处输入图片说明

And when executed creates this window:并在执行时创建此窗口: 在此处输入图片说明

I can't find any answers for this problem, and all tutorials I'm seeing have items inside the Design Tab where they can start exploring it.我找不到这个问题的任何答案,我看到的所有教程都在“设计”选项卡中提供了项目,他们可以在其中开始探索它。

I faced the same problem, and what i did was to update the windowbuilder to version: 1.9.2......我遇到了同样的问题,我所做的是将windowbuilder更新到版本:1.9.2......

That solved the problem for me.那为我解决了问题。

PS: Using Eclipse Photon PS:使用 Eclipse Photon

Uninstall eclipse completely, the only thing you need to leave is the eclipse-workspaces folder, so your projects will remain saved.完全卸载 eclipse,您唯一需要离开的是 eclipse-workspaces 文件夹,因此您的项目将保持保存状态。

To uninstall it completely you need to:要完全卸载它,您需要:

  1. Delete the "eclipse" folder in "C:\\Users\\YourName".删除“C:\\Users\\YourName”中的“eclipse”文件夹。
  2. Delete the desktop shortcut.删除桌面快捷方式。
  3. Delete the ".p2" folder in "C:\\Users\\YourName".删除“C:\\Users\\YourName”中的“.p2”文件夹。

Reinstall eclipse from the official site.从官方网站重新安装 eclipse。 This worked for me.这对我有用。

You can try link: https://youtu.be/LgOMN3US6Bk你可以试试链接: https : //youtu.be/LgOMN3US6Bk

I think it will work.我认为它会起作用。

Go to Help -> Eclipse Marketplace -> Installed and then update(if not updated) both WindowBuilder and WindowBuilder Nightly转到Help -> Eclipse Marketplace -> Installed然后更新(如果没有更新) WindowBuilderWindowBuilder Nightly

then Restart然后重启

to open file with design tab : righclick on .java file Open With -> WindowBuilder Editor使用设计选项卡打开文件:右键单击.java文件打开方式 -> WindowBuilder Editor

finally click on design tab it may take few seconds to load最后点击设计选项卡可能需要几秒钟才能加载

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

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