How do Eclipse plug-ins share data? Today I encountered this problem. Because I want to access the deploy directory of eclipseme, Which is configurable.
There are two possibilities: one is to put the data to be shared by the plug-in one location, the other is to get the data from the specified location, and the other is to provide some interfaces for the plug-in, allow access by other plug-ins. Eclipse is the second method.
Iworkspace Space = resourcesplugin. getworkspace () is used most. This sentence actually implies access to the org. Eclipse. Core. Resource plug-in. Each generated plug-in project's plug-in. xml file contains dependency in org. Eclipse. Core. runtime and org. Eclipse. Core. Resources.
Add dependency on eclipseme in denpendency, and then directly access the methods allowed to access eclipseme.
Generally, it is a static access method. For plug-in developers, static method access should also be set for information that needs to be provided for external access. No one wants to build a new object to access the existing data, this is also unreasonable.
This method also facilitates the use of plug-ins. If I'm not sure which plug-ins a plug-in depends on, you can simply look at plugin. xml.