The most significant changes are summarized in the attached diffs. The
first (build-diff.txt) shows the changes to the build file; the second
(designtime-diff.txt), the changes to the design-time code.
// Gregory
Jayashri Visvanathan wrote:
> Gregory,
> Thanks for the heads up. Please send a change bundle out before you
> check in so that people have a chance review the diffs and voice their
> concerns if any.
> -Jayashri
>
> Gregory Murphy wrote:
>
>> As I wrote in previous mail, I have been working on extracting a
>> public API of property editors and some helper classes so that the
>> Woodstock components will continue to benefit from full support in
>> the Visual Web Pack plug-in for the next major release of NetBeans, 6.0.
>>
>> I have made a few minor changes to the Woodstock design-time code
>> already, but nothing that changes compatibility with NetBeans 5.5.
>>
>> However, the next set of changes, which are required so that the
>> data-provider design-time UI panels can still be referenced from
>> Woodstock, will _break_ compatibility with NB 5.5. Speak now, or
>> forever hold your peace! ;-)
>>
>> The good news: as part of the changes, we can remove the org.openide
>> libraries, as they will no longer be needed. At that point, the
>> Woodstock build will no longer have any dependencies at all on
>> NetBeans modules.
>>
>> // Gregory
>
Index: src/designtime/com/sun/webui/jsf/component/table/TableCustomizerMainPanel.java
===================================================================
RCS file: /cvs/woodstock/webui/src/designtime/com/sun/webui/jsf/component/table/TableCustomizerMainPanel.java,v
retrieving revision 1.2
diff -r1.2 TableCustomizerMainPanel.java
61a62
> import java.util.ResourceBundle;
66d66
< import org.openide.ErrorManager;
95a96,98
> private ResourceBundle bundle =
> ResourceBundle.getBundle(TableCustomizerMainPanel.class.getPackage().getName() + ".Bundle");
>
150c153
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Static_Text"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Static_Text"));
152c155
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Label"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Label"));
154c157
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Text_Field"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Text_Field"));
156c159
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Text_Area"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Text_Area"));
158c161
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Button"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Button"));
160c163
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Hyperlink"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Hyperlink"));
162c165
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Image_Hyperlink"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Image_Hyperlink"));
164c167
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Drop_Down_List"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Drop_Down_List"));
166c169
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Checkbox"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Checkbox"));
168c171
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Radio_Button"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Radio_Button"));
170c173
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Image"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Image"));
174c177
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Group_Panel"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Group_Panel"));
176c179
< componentTypeComboBoxModel.addElement(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Message"));
---
> componentTypeComboBoxModel.addElement(bundle.getString("Message"));
527c530
< addDataProviderButton.setMnemonic(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "ADD_DATAPROVIDER_BUTTON_MNEMONIC").charAt(0));
---
> addDataProviderButton.setMnemonic(bundle.getString("ADD_DATAPROVIDER_BUTTON_MNEMONIC").charAt(0));
824c827
< lblComponentType.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "SELECT_COLUMN_TYPE_ACCESS_DESC"));
---
> lblComponentType.getAccessibleContext().setAccessibleDescription(bundle.getString("SELECT_COLUMN_TYPE_ACCESS_DESC"));
886c889
< cbSortable.setMnemonic(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "SORT_CHECKBOX_MNEMONIC").charAt(0));
---
> cbSortable.setMnemonic(bundle.getString("SORT_CHECKBOX_MNEMONIC").charAt(0));
896c899
< jLabel1.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "WIDTH_MNEMONIC").charAt(0));
---
> jLabel1.setDisplayedMnemonic(bundle.getString("WIDTH_MNEMONIC").charAt(0));
905c908
< jLabel1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "WIDTH_ACCESS_DESC"));
---
> jLabel1.getAccessibleContext().setAccessibleDescription(bundle.getString("WIDTH_ACCESS_DESC"));
946c949
< lblTableSummary.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "EMPTY_MESSAGE_ACCESS_DESC"));
---
> lblTableSummary.getAccessibleContext().setAccessibleDescription(bundle.getString("EMPTY_MESSAGE_ACCESS_DESC"));
1004c1007
< lblEmptyDataMsg.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "EMPTY_MESSAGE_DISPLAYED_MNEMONIC").charAt(0));
---
> lblEmptyDataMsg.setDisplayedMnemonic(bundle.getString("EMPTY_MESSAGE_DISPLAYED_MNEMONIC").charAt(0));
1059c1062
< lblPageSize.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "PAGINATION_MNEMONIC").charAt(0));
---
> lblPageSize.setDisplayedMnemonic(bundle.getString("PAGINATION_MNEMONIC").charAt(0));
1064c1067
< lblPageSize.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "PAGE_ROWS_ACCESS_DESC"));
---
> lblPageSize.getAccessibleContext().setAccessibleDescription(bundle.getString("PAGE_ROWS_ACCESS_DESC"));
1094c1097
< cbClearSortButton.setMnemonic(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "CLEAR_SORT_CHECKBOX_MNEMONIC").charAt(0));
---
> cbClearSortButton.setMnemonic(bundle.getString("CLEAR_SORT_CHECKBOX_MNEMONIC").charAt(0));
1104c1107
< cbSortPanelButton.setMnemonic(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "SHOW_SORT_CHECKBOX_MNEMONIC").charAt(0));
---
> cbSortPanelButton.setMnemonic(bundle.getString("SHOW_SORT_CHECKBOX_MNEMONIC").charAt(0));
1181,1182c1184,1185
< String message = org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Incorrect_component_type_msg") + currentTableColumnDesignState.getColumnType().getName();
< String title = org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "Incorrect_component_type_title");
---
> String message = bundle.getString("Incorrect_component_type_msg") + currentTableColumnDesignState.getColumnType().getName();
> String title = bundle.getString("Incorrect_component_type_title");
1208,1209c1211,1212
< String name = currentTableDataProviderDesignState.getUniqueColumnName(org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "column"));
< TableColumnDesignState colDesignState = new TableColumnDesignState(name, name, org.openide.util.NbBundle.getMessage(TableCustomizerMainPanel.class, "text")); //NOI18N
---
> String name = currentTableDataProviderDesignState.getUniqueColumnName(bundle.getString("column"));
> TableColumnDesignState colDesignState = new TableColumnDesignState(name, name, bundle.getString("text")); //NOI18N
Index: src/designtime/com/sun/webui/jsf/component/table/TableDataProviderDesignState.java
===================================================================
RCS file: /cvs/woodstock/webui/src/designtime/com/sun/webui/jsf/component/table/TableDataProviderDesignState.java,v
retrieving revision 1.1
diff -r1.1 TableDataProviderDesignState.java
39d38
< import org.openide.ErrorManager;
67c66
< ErrorManager.getDefault().notify(exc);
---
> exc.printStackTrace();
Index: src/designtime/com/sun/webui/jsf/component/table/TableRowGroupDesignState.java
===================================================================
RCS file: /cvs/woodstock/webui/src/designtime/com/sun/webui/jsf/component/table/TableRowGroupDesignState.java,v
retrieving revision 1.1
diff -r1.1 TableRowGroupDesignState.java
47d46
< import org.openide.ErrorManager;
199c198
< ErrorManager.getDefault().notify(exc);
---
> exc.printStackTrace();
Index: src/designtime/com/sun/webui/jsf/design/AbstractDesignInfo.java
===================================================================
RCS file: /cvs/woodstock/webui/src/designtime/com/sun/webui/jsf/design/AbstractDesignInfo.java,v
retrieving revision 1.1
diff -r1.1 AbstractDesignInfo.java
36c36,37
< import com.sun.rave.propertyeditors.binding.data.DataBindingHelper;
---
> import com.sun.rave.propertyeditors.binding.DataBindingHelper;
> import com.sun.rave.propertyeditors.binding.DataBindingHelperRegistry;
382c383
< Class bindingPanelClass = null;
---
> DataBindingHelper.Panel bindingPanel = null;
385c386
< bindingPanelClass = DataBindingHelper.BIND_VALUE_TO_DATAPROVIDER;
---
> bindingPanel = DataBindingHelper.Panel.BIND_VALUE_TO_DATAPROVIDER;
387c388
< bindingPanelClass = DataBindingHelper.BIND_OPTIONS_TO_DATAPROVIDER;
---
> bindingPanel = DataBindingHelper.Panel.BIND_OPTIONS_TO_DATAPROVIDER;
389c390,397
< bindingPanelClass = DataBindingHelper.BIND_VALUE_TO_DATAPROVIDER;
---
> bindingPanel = DataBindingHelper.Panel.BIND_VALUE_TO_DATAPROVIDER;
> }
> DataBindingHelper dataBindingHelper = DataBindingHelperRegistry.getDataBindingHelper();
> if (dataBindingHelper != null) {
> displayActions.add(
> dataBindingHelper.getDataBindingAction(bean,
> property.getPropertyDescriptor().getName(),
> new DataBindingHelper.Panel[] {bindingPanel, DataBindingHelper.Panel.BIND_VALUE_TO_OBJECT}));
391,395d398
< displayActions.add(
< DataBindingHelper.getDataBindingAction(bean,
< property.getPropertyDescriptor().getName(),
< new Class[] {bindingPanelClass, DataBindingHelper.BIND_VALUE_TO_OBJECT}));
---
>
571,577c574,580
< if ((valueField == null) && isTypeOf(Integer.class, "int", provider.getType(fieldKeys[i]))){
< valueField = fieldKeys[i].getFieldId();
< valueFieldType = provider.getType(fieldKeys[i]);
< }
< if ((displayField == null) && provider.getType(fieldKeys[i]).isAssignableFrom(String.class)){
< displayField = fieldKeys[i].getFieldId();
< }
---
> if ((valueField == null) && isTypeOf(Integer.class, "int", provider.getType(fieldKeys[i]))){
> valueField = fieldKeys[i].getFieldId();
> valueFieldType = provider.getType(fieldKeys[i]);
> }
> if ((displayField == null) && provider.getType(fieldKeys[i]).isAssignableFrom(String.class)){
> displayField = fieldKeys[i].getFieldId();
> }
Index: build.xml
===================================================================
RCS file: /cvs/woodstock/webui/build.xml,v
retrieving revision 1.1
diff -r1.1 build.xml
171,176d170
<
< <path id="jsfcl.jars">
< <pathelement location="${lib.creator}/jsfcl.jar"/>
< <pathelement location="${lib.creator}/jsfsupport-designtime.jar"/>
< <pathelement location="${lib.external}/rowset.jar"/>
< </path>
179a174,175
> <pathelement location="${lib.creator}/jsfcl.jar"/>
> <pathelement location="${lib.external}/rowset.jar"/>
183,185c179
< <pathelement location="${lib.creator}/com-sun-rave-propertyeditors.jar"/>
< <pathelement location="${lib.netbeans}/openide.jar"/>
< <pathelement location="${lib.netbeans}/openide-loaders.jar"/>
---
> <pathelement location="${lib.creator}/editors.jar"/>
296d289
< <path refid="jsfcl.jars"/>