버튼은 편집자와 직접적인 관련이 없습니다.
당신은해야, described there)로 다음 commandId이 IWorkbenchActionDefinitionIds
예에서 찾을 수있는 표준 명령 ID로 설정하여
:
protected void makeActions(final IWorkbenchWindow window) {
// Creates the actions and registers them.
// Registering is needed to ensure that key bindings work.
// The corresponding commands keybindings are defined in the plugin.xml
// file.
// Registering also provides automatic disposal of the actions when
// the window is closed.
saveAction = ActionFactory.SAVE.create(window);
register(saveAction);
}
- 는
Editor
부분적으로 더러운 플래그를 추가하고 isDirty()
, setDirty()
및 clean()
방법을 구현한다. user s-d에서 업데이트 2013년 2월
:
참고 : 추가하기 ActionBarContributor
의 saveAction
인디고 R2 (3.7.2)에 따라 더 이상 필요 개의 RCP에 없습니다.
제안 편집에 대한 감사의-D @
public void commandStackChanged(EventObject event) {
firePropertyChange(PROP_DIRTY);
super.commandStackChanged(event);
}
을 다음과 같이이의
menuContribution
추가 편집기의doSave()
방법에 를 추가하고commandStackChanged()
를 대체하기에 충분하다. – VonC