1WINDOWBUILDER PROPERTY SHEET LIBRARY 2------------------------------------- 3 4This project is a fork of a subset of the WindowBuilder Eclipse 5plugin: http://www.eclipse.org/windowbuilder/ 6 7Specifically, it contains the subset of WindowBuilder related to the 8propertysheet, intended for reuse in AOSP by the ADT plugin. 9 10The fork was modified as follows: 11* Started with revision 424 from the trunk: 12 http://dev.eclipse.org/svnroot/tools/org.eclipse.windowbuilder/trunk 13 14* Extracted the property package from org.eclipse.wb.core: 15 src/org/eclipse/wb/internal/core/model/property 16 and then everything it transitively references. This turns out to 17 be a lot. I then started pruning out references to code we don't 18 need, such as support for editing Java constructs such as enums, or 19 dealing with a Java code model, etc. This means some of the files 20 have been edited to remove methods and fields. For example, the 21 property category code was modified to no longer support the 22 persistent storage of categories. 23 24* The WindowBuilder code depended on a number of Apache Commons 25 libraries such as collections, lang, etc. Since ADT already uses 26 Guava, which provides a lot of the same functionality, I replaced 27 all the Commons calls with Guava calls in order to avoid having to 28 make ADT depend on (and load at runtime) the Commons libraries. 29 30* Finally, the propertysheet code was made into a library instead of a 31 plugin, such that it can be loaded into the ADT plugin. This meant 32 mostly rewriting the DesignerPlugin class. It has kept its name 33 (since a lot of code references it for logging, resource loading 34 etc), but it is no longer an actual plugin. Instead it has init and 35 dispose methods for use by the AdtPlugin, and for logging it 36 delegates to the ADT plugin, etc. 37 38* Icons were moved into the DesignerPlugin package such that the 39 resource loading code could use a relative path, since with an 40 absolute path it would be looking in the embedding plugin's 41 resources. 42 43* To be consistent with the ADT codebase, I converted the files from 44 \r\n to \n newlines. Other than that, all formatting was left 45 unmodified. 46 47* Removed unused resources such as unreferences colors from 48 IColorConstants, unneeded messages from ModelMessages, and so on. 49 50* Note also that this Eclipse project is using a modified version of 51 the standard ADT Eclipse compiler settings: methods overriding other 52 methods and interfaces *without* using an @Override annotation are 53 ignored, since they were not using @Override annotations in the 54 WindowBuilder source base. 55 56 57ADT ENHANCEMENTS 58------------------ 59* I also modified the propertysheet in a few ways to add features 60 needed by ADT. These are all bracketed in the codebase with 61 // BEGIN ADT MODIFICATIONS 62 ... 63 // END ADT MODIFICATIONS 64 65 Specifically, I made the property table able to expand all and 66 collapse all. Properties have sorting priorities, and have separate 67 name and title attributes (and tooltips show the property name 68 rather than the title.) Text property editors allow field completion 69 by providing IContentProposalProvider (and optionally 70 ILabelProvider) instances via their getAdapter method. And the 71 property table will color values differently based on whether the 72 property is modified. (This allows us to draw default attributes 73 differently). Finally, the propertysheet now supports "expand by 74 default" (and for certain categories to be excluded, such as 75 deprecations). 76 77WINDOW DOCKING 78--------------- 79 80The window docking support (the "FlyoutControlComposite" and 81supporting classes) was also included, since it's used to present the 82property sheet view in ADT. This code was also modified in a couple of 83minor ways, using the same modification markers as above: 84- Support invisible children (where the whole flyout is hidden) 85- Added a "dismiss hover" method used to hide a temporary hover 86 (needed when the hovers are used with native drag & drop) 87- Added a listener interface and notification when window states chane 88 (used to auto-zoom the layout canvas when windows are collapsed or 89 expanded). 90- Changed the sizeall cursor used for dragging composites from the SWT 91 SIZE_ALL cursor to the HAND cursor since (at least on Mac) the 92 cursor looked wrong for docking. 93 94UPDATES 95-------- 96 97We should keep an eye on the propertysheet code in WindowBuilder and 98migrate bug fixes and feature enhancements. To do that, first check 99out revision 424 from 100http://dev.eclipse.org/svnroot/tools/org.eclipse.windowbuilder/trunk 101That's the same baseline that this fork was based on. 102You can limit the checkout to just the org.eclipse.wb.core tree. 103 104Then check out the newest revision of WindowBuilder in a separate 105directory. 106 107Now diff the two trees. Look for diffs in the packages related to the 108propertysheet; this is going to be the packages that are present in 109this library. If any of the diffs are related to the propertysheet or 110supporting code, apply them to this library, and then update this 111document to contain the new baseline revision (use 'svnversion .' to 112get the number). Note that the diffs may need some rewriting if they 113reference Apache Commons code. 114 115Note that the ComponentsPropertiesPage.java class which is the main 116window in WindowBuilder is not used in our implementation; we instead 117have the PropertySheetPage class in ADT, so changes in that class 118should be checked to see whether they apply to our property sheet page 119(which uses the PropertyTable in a similar way, but obviously is based 120around our own UI model rather than the WindowBuilder ObjectInfo 121model. 122