문제

I am working on an RCP application that has eclipse navigator viewer with ID org.eclipse.ui.navigator.ProjectExplorer. I want to override delete action (DeleteResourceAction) in order to do something before my resources are deleted from workspace/file system. Is it possible and how?

도움이 되었습니까?

해결책

You can use the org.eclipse.ltk.core.refactoring.deleteParticipants extension point to add a participant that is called whenever resources are deleted.

Your code extends the org.eclipse.ltk.core.refactoring.participants.DeleteParticipant class.

Some more details in this article

The delete participant is called before the delete is performed to check that the delete can be performed. It then provides a set of Change objects that are called during the actual delete. There are also rename, copy and move participants.

For building you can add builders to a project description to get code run during the build.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top