org.eclipse.ui.ide, Menu and toolbar paths

本文介绍了 Eclipse IDE 中 IIDEActionConstants 接口的内容,该接口定义了 IDE 菜单、工具栏及操作组的标识符。这些标识符用于统一管理 IDE 中的各种操作,如文件操作、编辑操作等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

public interface IIDEActionConstants

Identifiers for IDE menus, toolbars and groups.

This interface contains constants only; it is not intended to be implemented or extended.

Note: want to move IDE-specific stuff out of IWorkbenchActionConstants. There's still some cleanup to be done here (and there).

 

 

Since:
3.0

Field Summary
static StringADD_EXT
          Edit menu: name of group for extra Add-like actions (value "add.ext").
static StringBUILD_EXT
          Workbench menu: name of group for extra Build-like actions (value "build.ext").
static StringBUILD_GROUP
          Group ids for build toolbar group.
static StringCLOSE_EXT
          File menu: name of group for extra Close-like actions (value "close.ext").
static StringCUT_EXT
          Edit menu: name of group for extra Cut-like actions (value "cut.ext").
static StringEDIT_END
          Edit menu: name of group for end of menu (value "editEnd").
static StringEDIT_START
          Edit menu: name of group for start of menu (value "editStart").
static StringFILE_END
          File menu: name of group for end of menu (value "fileEnd").
static StringFILE_START
          File menu: name of group for start of menu (value "fileStart").
static StringFIND_EXT
          Edit menu: name of group for extra Find-like actions (value "find.ext").
static StringGO_INTO
          Navigate menu: name of standard Go Into global action (value "goInto").
static StringGO_TO
          Navigate menu: name of standard Go To submenu (value "goTo").
static StringGO_TO_RESOURCE
          Navigate menu: name of standard Go To Resource global action (value "goToResource").
static StringGROUP_ADD
          Pop-up menu: name of group for Add actions (value "group.add").
static StringGROUP_FILE
          Pop-up menu and cool bar: name of group for File actions (value "group.file").
static StringGROUP_NAV
          Coolbar: name of group for Navigate actions (value "group.nav").
static StringGROUP_SHOW_IN
          Pop-up menu: name of group for Show In actions (value "group.showIn").
static StringHELP_END
          Help menu: name of group for end of menu (value "helpEnd").
static StringHELP_START
          Help menu: name of group for start of menu (value "helpStart").
static StringHISTORY_GROUP
          Group ids for history toolbar group.
static StringIMPORT_EXT
          File menu: name of group for extra Import-like actions (value "import.ext").
static StringM_EDIT
          Name of standard Edit menu (value "edit").
static StringM_FILE
          Name of standard File menu (value "file").
static StringM_HELP
          Name of standard Help menu (value "help").
static StringM_NAVIGATE
          Name of standard Navigate menu (value "navigate").
static StringM_PROJECT
          Name of standard Project menu (value "project").
static StringM_WINDOW
          Name of standard Window menu (value "window").
static StringMRU
          File menu: name of "Most Recently Used File" group.
static StringNAV_END
          Navigate menu: name of group for end of menu (value "navEnd").
static StringNAV_START
          Navigate menu: name of group for start of menu (value "navStart").
static StringNEW_EXT
          File menu: name of group for extra New-like actions (value "new.ext").
static StringNEW_GROUP
          Group ids for new toolbar group.
static StringOPEN_EXT
          Navigate menu: name of group for extra Open actions (value "open.ext").
static StringPIN_GROUP
          Group id for pin toolbar group.
static StringPRINT_EXT
          File menu: name of group for extra Print-like actions (value "print.ext").
static StringPROJ_END
          Project menu: name of group for start of menu (value "projEnd").
static StringPROJ_START
          Project menu: name of group for start of menu (value "projStart").
static StringSAVE_EXT
          File menu: name of group for extra Save-like actions (value "save.ext").
static StringSAVE_GROUP
          Group ids for save toolbar group.
static StringSHOW_EXT
          Navigate menu: name of group for extra Show actions (value "show.ext").
static StringTOOLBAR_FILE
          Workbench toolbar id for file toolbar group.
static StringTOOLBAR_NAVIGATE
          Workbench toolbar id for navigate toolbar group.
static StringUNDO_EXT
          Edit menu: name of group for extra Undo-like actions (value "undo.ext").
 

 

 

Named tool bars in the workbench

The workbench tool bar is composed of tool bars contributed by different plug-ins, including the workbench itself.  Within any particular tool bar, there are named groups or slots that can be used for inserting new tool bar items.    

The following description of the workbench tool bars is adapted from the IWorkbenchActionConstants class definition.

// Workbench toolbar ids
public static final String TOOLBAR_FILE = "org.eclipse.ui.workbench.file"
public static final String TOOLBAR_NAVIGATE = "org.eclipse.ui.workbench.navigate"; 

// Workbench toolbar group ids.  To add an item at the beginning of the group, 
// use the GROUP id.  To add an item at the end of the group, use the EXT id.
public static final String PIN_GROUP = "pin.group"; 
public static final String HISTORY_GROUP = "history.group"; 
public static final String NEW_GROUP = "new.group"; 
public static final String SAVE_GROUP = "save.group"; 
public static final String BUILD_GROUP = "build.group";

 

 

备注:本文转载自:

http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/ide/IIDEActionConstants.html

 

http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench_menupaths.htm

kettle-webspoon 17-Jun-2025 09:04:16.616 信息 [Thread-129] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina] Exception while disposing shell: Shell {Spoon - [FileRepository] [没有名称]} org.eclipse.swt.SWTException: Graphic is disposed at org.eclipse.swt.SWT.error(SWT.java:3808) at org.eclipse.swt.SWT.error(SWT.java:3731) at org.eclipse.swt.SWT.error(SWT.java:3702) at org.eclipse.swt.graphics.Image.getBounds(Image.java:425) at org.eclipse.swt.widgets.ToolItem.getPreferredHeight(ToolItem.java:587) at org.eclipse.swt.widgets.ToolItem.getHeight(ToolItem.java:541) at org.eclipse.swt.widgets.ToolItem.getBounds(ToolItem.java:497) at org.eclipse.swt.widgets.ToolBar.layoutItems(ToolBar.java:385) at org.eclipse.swt.widgets.ToolBar.destroyItem(ToolBar.java:379) at org.eclipse.swt.widgets.ToolItem.releaseParent(ToolItem.java:805) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:848) at org.eclipse.swt.widgets.ToolBar.releaseChildren(ToolBar.java:354) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:844) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:873) at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:992) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:844) at org.eclipse.swt.widgets.Display.disposeShells(Display.java:763) at org.eclipse.swt.widgets.Display.release(Display.java:739) at org.eclipse.swt.graphics.Device.dispose(Device.java:279) at org.eclipse.rap.rwt.internal.lifecycle.UIThread.processShutdown(UIThread.java:179) at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:309) at java.lang.Thread.run(Thread.java:748) at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:107) /usr/local/tomcat/bin/catalina.sh: line 149: /usr/local/tomcat/bin/setenv.sh: Operation not permitted
最新发布
07-01
<think>我们正在处理用户关于Kettle-WebSpoon的两个问题:1.SWTException:Graphic isdisposed2. Catalinastartup errorOperation notpermitted根据引用内容,我们有一些线索:对于第一个问题,引用[1]提到删除工作空间的.metadata/.plugins文件夹然后以-clean方式启动Eclipse解决了问题。这提示我们可能是工作区元数据损坏。引用[2]和[3]则提到了另一个SWT异常:Widgetis disposed,这通常是因为在非UI线程中访问了已经被释放的控件。但用户遇到的是Graphic isdisposed,可能涉及图形资源。第二个问题,Tomcat启动时出现Operationnot permitted,这通常与文件权限或访问限制有关。因此,我们分两部分解决。第一部分:解决SWTException:Graphic isdisposed步骤:1.尝试清理工作区:关闭Kettle-WebSpoon,删除工作空间中的.metadata/.plugins目录(注意:这会重置工作区设置,如视图布局等,但项目本身通常不受影响,因为项目文件在别处)。然后使用-clean参数启动WebSpoon(具体启动命令取决于部署方式,如果是Docker则可能需要调整启动脚本)。2.如果问题仍然存在,考虑更新或重新安装图形驱动,因为SWT依赖于本地图形库。3.检查是否在非UI线程中操作了UI组件。引用[3]展示了如何在非UI线程中安全更新UI(使用asyncExec)。如果WebSpoon中有自定义代码,需要检查。第二部分:解决Tomcat的Catalina启动错误:Operationnot permitted这个错误通常发生在Linux系统,可能的原因:1.文件权限:Tomcat需要写入某些目录(如logs、temp、work)的权限。确保Tomcat进程的用户对这些目录有写权限。2.安全策略限制:例如SELinux或AppArmor阻止了Tomcat的操作。可以尝试临时禁用SELinux(setenforce0)来测试,但生产环境需要配置正确的策略。3.端口占用:如果Tomcat需要绑定到特权端口(如80)而没有权限,也会导致错误。但错误信息是Operation notpermitted,更可能是文件系统权限或安全模块。具体步骤:1.检查Tomcat目录的权限:-确认Tomcat的安装目录(如/usr/local/tomcat)和Kettle-WebSpoon的工作目录,确保运行Tomcat的用户(如tomcat用户)有读写权限。-重点检查logs、temp、work目录。2.检查SELinux状态:-运行 `sestatus`,如果处于enforcing状态,可以尝试临时禁用:`setenforce0`,然后重启Tomcat看是否解决。-如果解决,则需要为Tomcat配置SELinux策略,或者将Tomcat目录的上下文设置为允许(例如:`chcon -R -t tomcat_exec_t /path/to/tomcat`),或者永久禁用SELinux(不推荐)。3.如果使用Docker,检查容器内的权限。可能需要在运行容器时以root用户运行(不推荐)或挂载卷时设置正确的权限。或者,在Dockerfile中确保目录权限正确。由于用户同时遇到两个问题,且可能相互影响(例如图形界面异常导致Web界面不可用,而Tomcat权限问题导致服务无法启动),需要分别处理。注意:Kettle-WebSpoon是一个Web应用,运行在Tomcat中,所以第二个问题直接导致服务无法启动。而第一个问题可能在服务启动后,在访问Web界面时出现。因此,我们优先解决Tomcat的启动问题,确保服务能正常启动。然后再解决图形界面异常。根据上述分析,给出解决方案。</think>### Kettle-WebSpoon 异常解决方案 #### 一、解决 `SWTException: Graphic is disposed` 问题 此错误通常由 SWT 图形资源被提前释放引起,常见于多线程操作或资源管理不当。以下是系统级解决方案: 1. **清理工作区元数据**(核心修复) ```bash rm -rf /path/to/workspace/.metadata/.plugins ``` 删除后使用 `-clean` 参数重启应用: ```bash ./spoon.sh -clean # 或启动脚本添加 -clean 参数 ``` > 此操作会重置工作区设置,但保留项目文件[^1]。 2. **检查线程安全** 确保所有 UI 操作都在 UI 线程执行,使用 `asyncExec` 同步: ```java Display.getDefault().asyncExec(() -> { if (!widget.isDisposed()) { // 必须检查控件状态 widget.setText("更新内容"); } }); ``` 参考引用[^3],任何非UI线程访问控件都需此模式。 3. **升级图形驱动** 在 Linux 环境下: ```bash sudo apt update && sudo apt upgrade mesa-utils libgl1-mesa-glx ``` 4. **调整 JVM 参数** 在启动脚本添加: ```bash -Dsun.awt.xembed=true -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false ``` #### 二、解决 `Catalina startup error: Operation not permitted` 此错误通常由权限问题或安全策略引起: 1. **目录权限修复** 授予 Tomcat 目录写权限: ```bash sudo chown -R tomcat_user:tomcat_group /opt/tomcat/ sudo chmod -R 755 /opt/tomcat/{logs,temp,work} ``` 2. **禁用 SELinux 限制**(临时方案) ```bash sudo setenforce 0 # 临时禁用 sudo ausearch -c 'catalina' --raw | audit2allow -M mypolicy sudo semodule -i mypolicy.pp # 永久方案 ``` 3. **调整文件系统挂载选项** 在 `/etc/fstab` 中为相关分区添加: ``` defaults,exec,nosuid 0 0 ``` 执行 `mount -o remount /` 4. **检查端口冲突** ```bash netstat -tulnp | grep 8080 # 检查 WebSpoon 端口 sudo fuser -k 8080/tcp # 释放被占端口 ``` #### 三、联合调试建议 1. 启动顺序: ```bash sudo systemctl start tomcat # 先启动 Tomcat ./spoon.sh -clean & # 再启动 WebSpoon ``` 2. 日志诊断: ```bash tail -f /opt/tomcat/logs/catalina.out # 监控 Tomcat 日志 grep -i "disposed" ~/.kettle/logs/* # 检查 Kettle 日志 ``` > **重要提示**: > - 生产环境避免直接使用 `root` 用户运行 > - 若使用 Docker 部署,需添加 `--privileged` 参数 > - WebSpoon 要求至少 2GB 内存,检查 `-Xmx` 参数设置
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值