summaryrefslogtreecommitdiff
path: root/propertysheet/README.txt
blob: 6c2feab520d83bdd73c5bfb64d0b4aee5c5cf4b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
WINDOWBUILDER PROPERTY SHEET LIBRARY
-------------------------------------

This project is a fork of a subset of the WindowBuilder Eclipse
plugin: http://www.eclipse.org/windowbuilder/

Specifically, it contains the subset of WindowBuilder related to the
propertysheet, intended for reuse in AOSP by the ADT plugin.

The fork was modified as follows:
* Started with revision 424 from the trunk:
  http://dev.eclipse.org/svnroot/tools/org.eclipse.windowbuilder/trunk

* Extracted the property package from org.eclipse.wb.core:
   src/org/eclipse/wb/internal/core/model/property
  and then everything it transitively references.  This turns out to
  be a lot. I then started pruning out references to code we don't
  need, such as support for editing Java constructs such as enums, or
  dealing with a Java code model, etc.  This means some of the files
  have been edited to remove methods and fields. For example, the
  property category code was modified to no longer support the
  persistent storage of categories.

* The WindowBuilder code depended on a number of Apache Commons
  libraries such as collections, lang, etc. Since ADT already uses
  Guava, which provides a lot of the same functionality, I replaced
  all the Commons calls with Guava calls in order to avoid having to
  make ADT depend on (and load at runtime) the Commons libraries.

* Finally, the propertysheet code was made into a library instead of a
  plugin, such that it can be loaded into the ADT plugin.  This meant
  mostly rewriting the DesignerPlugin class. It has kept its name
  (since a lot of code references it for logging, resource loading
  etc), but it is no longer an actual plugin. Instead it has init and
  dispose methods for use by the AdtPlugin, and for logging it
  delegates to the ADT plugin, etc.

* Icons were moved into the DesignerPlugin package such that the
  resource loading code could use a relative path, since with an
  absolute path it would be looking in the embedding plugin's
  resources.

* To be consistent with the ADT codebase, I converted the files from
  \r\n to \n newlines. Other than that, all formatting was left
  unmodified.

* Removed unused resources such as unreferences colors from
  IColorConstants, unneeded messages from ModelMessages, and so on.

* Note also that this Eclipse project is using a modified version of
  the standard ADT Eclipse compiler settings: methods overriding other
  methods and interfaces *without* using an @Override annotation are
  ignored, since they were not using @Override annotations in the
  WindowBuilder source base.
  

ADT ENHANCEMENTS
------------------
* I also modified the propertysheet in a few ways to add features
  needed by ADT. These are all bracketed in the codebase with
   // BEGIN ADT MODIFICATIONS
   ...
   // END ADT MODIFICATIONS

  Specifically, I made the property table able to expand all and
  collapse all. Properties have sorting priorities, and have separate
  name and title attributes (and tooltips show the property name
  rather than the title.) Text property editors allow field completion
  by providing IContentProposalProvider (and optionally
  ILabelProvider) instances via their getAdapter method. And the
  property table will color values differently based on whether the
  property is modified. (This allows us to draw default attributes
  differently). Finally, the propertysheet now supports "expand by
  default" (and for certain categories to be excluded, such as
  deprecations).


UPDATES
--------

We should keep an eye on the propertysheet code in WindowBuilder and
migrate bug fixes and feature enhancements. To do that, first check
out revision 424 from
http://dev.eclipse.org/svnroot/tools/org.eclipse.windowbuilder/trunk
That's the same baseline that this fork was based on.
You can limit the checkout to just the org.eclipse.wb.core tree.

Then check out the newest revision of WindowBuilder in a separate
directory.

Now diff the two trees. Look for diffs in the packages related to the
propertysheet; this is going to be the packages that are present in
this library.  If any of the diffs are related to the propertysheet or
supporting code, apply them to this library, and then update this
document to contain the new baseline revision (use 'svnversion .' to
get the number).  Note that the diffs may need some rewriting if they
reference Apache Commons code.

Note that the ComponentsPropertiesPage.java class which is the main
window in WindowBuilder is not used in our implementation; we instead
have the PropertySheetPage class in ADT, so changes in that class
should be checked to see whether they apply to our property sheet page
(which uses the PropertyTable in a similar way, but obviously is based
around our own UI model rather than the WindowBuilder ObjectInfo
model.