Bug 232126 - [api] type attribute of SystemFilter is not restored
Summary: [api] type attribute of SystemFilter is not restored
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: David Dykstal CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-05-14 13:29 EDT by Li Ding CLA
Modified: 2008-05-26 11:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li Ding CLA 2008-05-14 13:29:05 EDT
Build ID: I20080330-1350

Steps To Reproduce:
1.I created several default filters for my subsystem and contributed customized icons and actions for the filters. Start runtime workbench with a new workspace, the customized icons and right click actions are available for these filters.

2. Exit runtime workbench and restart it again. Noticed the
customized icons are replaced with default openRSE icons for filters. The contributed right click actions from my subsystem configuration adapter are disappeared too.


It looks like the type attribute of system filter are 
not persisted. 

I created some SystemFilter using 
SystemFilterPoolManager.createSystemFilterISystemFilter(Container parent, String aliasName, String[] filterStrings, String type, boolean promptable) in my subsystem's configuration class. I passed in specific type for each customized system filter in this call.


After shuting down the runtime workbench, I looked the profile file saved by openRSE in .metadata/.plugins/org.eclipse.rse.core.  I did not find the type strings I specified. All types were default.

The debugging of code also shows that the type of SystemFilter is null when configuration adapter's getAdditionalFilterActions() call. 

I looked RSEDOMExporter.createNode(RSEDOMNode parent, ISystemFilter filter, boolean clean). It does not save type attribute for ISystemFilter. The method 
createNode(RSEDOMNode parent, ISystemFilterString filterString, boolean clean) does save type attribute but that is ISystemFilterString's type.

This bug blocks my porting work. I used workaround to check the filter name instead of filter type but this work around was easily broken when user renamed the filter.
Comment 1 David Dykstal CLA 2008-05-14 14:16:52 EDT
Added a new attribute for filter type and am now persisting it. Incoming persistent forms will not have a filter type set in the filter.
Comment 2 David Dykstal CLA 2008-05-14 17:12:14 EDT
Reopening to remove extraneous messages from the log.
Comment 3 David Dykstal CLA 2008-05-14 17:18:06 EDT
Fixed by not logging "null" attributes.
Comment 4 Martin Oberhuber CLA 2008-05-15 15:30:06 EDT
This is an API addition because IRSEDOMConstants.java is an API Interface.
Please add the required @since tag to the new ATTRIBUTE_FILTER_TYPE constant.

Or should IRSEDOMConstants.java not be API after all?
Comment 5 David Dykstal CLA 2008-05-15 18:10:33 EDT
I'm uncomfortable making this internal at this point. Folks who right persistence providers may need access to these constants. I will add the @since tag.
Comment 6 David Dykstal CLA 2008-05-15 18:17:40 EDT
tag has been added