Source:
public void start(BundleContext context) throws Exception { super.start(context); PreferencesHint.registerPreferenceStore(DiagramUIPlugin.DIAGRAM_PREFERENCES_HINT, getPreferenceStore()); dynamicPreferences = new DynamicDiagramUIPreferences(getPreferenceStore()); exportDialogDefaultSettingsUpdater = new IPropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { if (SiriusDiagramUiPreferencesKeys.PREF_SCALE_DIAGRAMS_ON_EXPORT.name().equals(event.getProperty())) { Object value = event.getNewValue(); if (value instanceof Boolean) { updateExportDialogAutoScaleSettings(((Boolean) value).booleanValue()); } else { updateExportDialogAutoScaleSettings(false); } } else if (SiriusDiagramUiPreferencesKeys.PREF_SCALE_LEVEL_DIAGRAMS_ON_EXPORT.name().equals(event.getProperty())) { Object value = event.getNewValue(); if (value instanceof Integer) { updateExportDialogScaleLevelSettings((Integer) value); } else { updateExportDialogScaleLevelSettings(100); } } } }; updateExportDialogAutoScaleSettings(getPreferenceStore().getBoolean(SiriusDiagramUiPreferencesKeys.PREF_SCALE_DIAGRAMS_ON_EXPORT.name())); updateExportDialogScaleLevelSettings(getPreferenceStore().getInt(SiriusDiagramUiPreferencesKeys.PREF_SCALE_LEVEL_DIAGRAMS_ON_EXPORT.name())); getPreferenceStore().addPropertyChangeListener(exportDialogDefaultSettingsUpdater); adapterFactory = createAdapterFactory(); descriptorsToImages = new HashMap<ImageWithDimensionDescriptor, Image>(); ressourceMissingDocumentProvider = new ResourceMissingDocumentProvider(); workspaceImageFigureRefresher = new WorkspaceImageFigureRefresher(); workspaceImageFigureRefresher.init(); imageSelectorDescriptorRegistryListener = new ImageSelectorDescriptorRegistryListener(); imageSelectorDescriptorRegistryListener.init(); formatDataManagerRegistryListener = new FormatDataManagerRegistryListener(); formatDataManagerRegistryListener.init(); layoutDataManagerRegistryListener = new LayoutDataManagerRegistryListener(); layoutDataManagerRegistryListener.init(); registerCoreDecorationProviders(); }

Target:
public void start(BundleContext context) throws Exception { super.start(context); PreferencesHint.registerPreferenceStore(DiagramUIPlugin.DIAGRAM_PREFERENCES_HINT, getPreferenceStore()); dynamicPreferences = new DynamicDiagramUIPreferences(getPreferenceStore()); exportDialogDefaultSettingsUpdater = new IPropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { if (SiriusDiagramUiPreferencesKeys.PREF_SCALE_DIAGRAMS_ON_EXPORT.name().equals(event.getProperty())) { Object value = event.getNewValue(); if (value instanceof Boolean) { updateExportDialogAutoScaleSettings(((Boolean) value).booleanValue()); } else { updateExportDialogAutoScaleSettings(false); } } else if (SiriusDiagramUiPreferencesKeys.PREF_SCALE_LEVEL_DIAGRAMS_ON_EXPORT.name().equals(event.getProperty())) { Object value = event.getNewValue(); if (value instanceof Integer) { updateExportDialogScaleLevelSettings((Integer) value); } else { updateExportDialogScaleLevelSettings(100); } } } }; updateExportDialogScaleLevelSettings(getPreferenceStore().getInt(SiriusDiagramUiPreferencesKeys.PREF_SCALE_LEVEL_DIAGRAMS_ON_EXPORT.name())); updateExportDialogAutoScaleSettings(getPreferenceStore().getBoolean(SiriusDiagramUiPreferencesKeys.PREF_SCALE_DIAGRAMS_ON_EXPORT.name())); getPreferenceStore().addPropertyChangeListener(exportDialogDefaultSettingsUpdater); adapterFactory = createAdapterFactory(); descriptorsToImages = new HashMap<ImageWithDimensionDescriptor, Image>(); ressourceMissingDocumentProvider = new ResourceMissingDocumentProvider(); workspaceImageFigureRefresher = new WorkspaceImageFigureRefresher(); workspaceImageFigureRefresher.init(); imageSelectorDescriptorRegistryListener = new ImageSelectorDescriptorRegistryListener(); imageSelectorDescriptorRegistryListener.init(); formatDataManagerRegistryListener = new FormatDataManagerRegistryListener(); formatDataManagerRegistryListener.init(); layoutDataManagerRegistryListener = new LayoutDataManagerRegistryListener(); layoutDataManagerRegistryListener.init(); registerCoreDecorationProviders(); }