Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330064 - [commons] allow disabling and enabling notifications for certain event types
Summary: [commons] allow disabling and enabling notifications for certain event types
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.5   Edit
Assignee: Torkild Resheim CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 327712 331424
  Show dependency tree
 
Reported: 2010-11-12 05:08 EST by Torkild Resheim CLA
Modified: 2011-01-13 23:05 EST (History)
1 user (show)

See Also:


Attachments
Patch to fix the issue (17.43 KB, patch)
2010-12-07 03:55 EST, Torkild Resheim CLA
steffen.pingel: iplog+
Details | Diff
mylyn/context/zip (28.29 KB, application/octet-stream)
2010-12-07 03:55 EST, Torkild Resheim CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torkild Resheim CLA 2010-11-12 05:08:20 EST
Currently it is only possible to globally enable/disable notifications. It should be possible to enable or disable notifications for certain event types using the preference page under General > Notifications.

See bug 272189.
Comment 1 Torkild Resheim CLA 2010-11-12 08:28:44 EST
I'm taking a stab at this one and is wondering about the "selected" attribute in "org.eclipse.mylyn.commons.notificaitons.event" declarations. It is currently used for selected state of events in the preference setting UI. Now I assume this is just temporary? Or is this the default value of the event notification?
Comment 2 Steffen Pingel CLA 2010-11-12 13:05:06 EST
(In reply to comment #1)
> I'm taking a stab at this one and is wondering about the "selected" attribute in
> "org.eclipse.mylyn.commons.notificaitons.event" declarations. It is currently
> used for selected state of events in the preference setting UI. Now I assume
> this is just temporary? Or is this the default value of the event notification?

Yes, this is to determine the default initialization for an event notifications. The state for the actual notifications is kept in NotificationAction which should be persisted (but is not yet).
Comment 3 Torkild Resheim CLA 2010-11-12 13:40:18 EST
(In reply to comment #2)
> Yes, this is to determine the default initialization for an event notifications.
> The state for the actual notifications is kept in NotificationAction which
> should be persisted (but is not yet).
OK. Thanks.
Comment 4 Torkild Resheim CLA 2010-12-07 03:55:54 EST
Created attachment 184688 [details]
Patch to fix the issue

I've implemented a mechanism for persisting the NotificationEvent and NotificationAction  settings. Filtering has been added to the NotificationService and the UI in the NotificationsPreferencesPage is handling the settings. I'm not so sure about the UI and the data model though. Currently it is only possible to change enablement of the various actions. The state of these are propagated to the events when changed. I'm don't know if this was how it was intended to work.

Anyhow we got a working solution and I guess we could always tweak it later on.
Comment 5 Torkild Resheim CLA 2010-12-07 03:55:57 EST
Created attachment 184689 [details]
mylyn/context/zip
Comment 6 Steffen Pingel CLA 2010-12-20 18:26:19 EST
Great stuff! I have committed the patch with two minor modifications: I added a null check where the model was being loaded to handle the case when no memento existed and I commented out the code that adds the "Test" button. I like the idea of a preview but I think we need a better place for the button.
Comment 7 Torkild Resheim CLA 2010-12-21 04:31:10 EST
Thanks for applying the patch Steffen. I was not sure about the "Test" button either. You're right that it did not look too good where it was.