Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354896 - Can WorkspaceModifyAction be made to depend only on JFace and core resources?
Summary: Can WorkspaceModifyAction be made to depend only on JFace and core resources?
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-16 18:53 EDT by Alberto Ricart CLA
Modified: 2011-08-17 09:41 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Ricart CLA 2011-08-16 18:53:18 EDT
Build Identifier: I20110519-1138

Yes, this is an UI plugin, but some non-ui apis can be referenced from it. When the workbench is operating headless (antrunner), any code that causes activation of IDEWorkbenchPlugin, will force ui activation which will explode the user code in wonderful and interesting ways.

Plugin activation should not cause the UI to initialize until the UI is required and is to be displayed.

The workaround for this is trivial but quite substantial. Perhaps services/apis that don't require UI should be moved to org.eclipse.core.resources. WorkspaceModifyOperation is one of these things.


Reproducible: Always

Steps to Reproduce:
1. Create an Ant task that makes use of WorkspaceModifyOperation
2. Call the ant taks headless on 3.7+
Comment 1 Paul Webster CLA 2011-08-16 19:40:28 EDT
IDEWorkbenchPlugin was designed this way, and we are not looking into making UI plugins non-UI.

WorkbenchModifyOperation is API, but I'll leave this open as a request to decouple it (perhaps providing a non-UI implementation it can use/inherit from) from the main IDE plugin.

PW
Comment 2 Oleg Besedin CLA 2011-08-17 09:41:42 EDT
Using WorkspaceModifyOperation as an example, it does not have much of interest if not used in UI. Rather, resources plugin code can be used directly.