+
+ @Override
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
+ throws CoreException {
+ if ("class".equals(propertyName)) {
+ if (data instanceof String) {
+ setEditorId((String)data);
+ } else if (data instanceof Hashtable) {
+ @SuppressWarnings("unchecked")
+ Hashtable<String,String> params = (Hashtable<String, String>)data;
+ setEditorId(params.get("editorId"));
+ }
+ if ("activeEditorId".equals(this.editorId)) {
+ setEditorId(WorkbenchUtils.getActiveWorkbenchPart().getSite().getId());
+ }
+ }
+ }
+
+ public void setEditorId(String editorId) {
+ this.editorId = editorId;
+ }
+