Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] IDataModelProvider.getPropertyNames() changed


This method will actually return Set instead of Collection.  This will help strengthen the API by not allowing duplicates.  Thanks, Ed, for pointing this out.

new code:
       public
Set getPropertyNames() {
               Set propertyNames =
super.getPropertyNames();
               propertyNames.add(NESTED_MODEL_SERVER_TARGET);

               propertyNames.add(ADD_SERVER_TARGET);

               propertyNames.add(RUNTIME_TARGET_ID);

               
return propertyNames;
       }


Thank you,

Jason A. Sholl
jsholl@xxxxxxxxxx
919-543-0011 (t/l 441-0011)



Jason A Sholl/Raleigh/IBM@IBMUS
Sent by: wtp-dev-bounces@xxxxxxxxxxx

09/06/2005 11:44 AM

Please respond to
"General discussion of project-wide or architectural issues."

To
wtp-dev@xxxxxxxxxxx
cc
Subject
[wtp-dev] IDataModelProvider.getPropertyNames() changed






In an effort to improve the IDataModel API, IDataModelProvider.getPropertyNames() has changed its signature to return a Collection rather than a String [].  This change makes subclassing more straight forward.  Below is an example of the types of changes implementers need to make:


old code:

   public
String[] getPropertyNames() {
       String[] props =
new String[]{NESTED_MODEL_SERVER_TARGET, ADD_SERVER_TARGET, RUNTIME_TARGET_ID};
       
return combineProperties(super.getPropertyNames(), props);
   }


new code:

       public
Collection getPropertyNames() {
               Collection propertyNames =
super.getPropertyNames();
               propertyNames.add(NESTED_MODEL_SERVER_TARGET);

               propertyNames.add(ADD_SERVER_TARGET);

               propertyNames.add(RUNTIME_TARGET_ID);

               
return propertyNames;
       }


Thank you,

Jason A. Sholl
jsholl@xxxxxxxxxx
919-543-0011 (t/l 441-0011)
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top