Open Bananeweizen opened 1 year ago
I think the best place would be at that point where an API first states that it must execute in the SWT Thread.
The one can use Display.execute(...)
to make sure the call is always performed in the UI thread.
I would tend to PDEModelUtilility.generateModelEdits(). Anyone with opinions?
May be one call before, PDEModelUtility.modifyModel()
should already check in which thread it runs and in case it is a background one, run the code in UI job.
I think the best place would be at that point where an API first states that it must execute in the SWT Thread.
That is where PDEModelUtility.modifyModel()
does things like
PDEFormEditor editor = getOpenEditor(modification);
IBaseModel model = getModelFromEditor(editor, modification);
Happens when a diff editor is open on the manifest.mf that gets updated by PDE DS. I'm not sure who is the best responsible in the stack trace to wrap an action into a UI thread runnable or similar. I would tend to PDEModelUtilility.generateModelEdits(). Anyone with opinions?