Author: [email protected]
Date: Wed Apr 15 15:05:30 2009
New Revision: 5241
Modified:
wiki/ResourceOracle.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/ResourceOracle.wiki
==============================================================================
--- wiki/ResourceOracle.wiki (original)
+++ wiki/ResourceOracle.wiki Wed Apr 15 15:05:30 2009
@@ -98,21 +98,20 @@
==When multiple {{{PathPrefix}}}es have the same path==
_(Note: As of Gwt 1.6, this section has not been implemented)_
-As of Gwt 1.6, if multiple {{{PathPrefix}}}es have the same path attribute
but different {{{ResourceFilter}}}s, only the last one was kept. This is an
undesirable outcome in most cases. For example, if there are two
{{{PathPrefix}}}es p4 and p5:
+As of Gwt 1.6, if multiple {{{PathPrefix}}}es have the same path attribute
but different {{{ResourceFilter}}}s, only the last one is kept. This is an
undesirable outcome in most cases. For example, if there are two
{{{PathPrefix}}}es p4 and p5:
{{{
-p4:<source path="client" includes="*.java" excludes="**/testing/***" />
+p4: <source path="client" includes="*.java" excludes="**/testing/***" />
p5: <source path="client" includes="Foo.java" excludes="shared/**" />
}}}
-only the second path-prefix is kept. In particular, a path like
client/Bar.java will be excluded by the second path-prefix, which is
probably different from what the user wanted. With Gwt 1.6, when a resource
with a specified path is processed by a {{{PathPrefix}}}, the output is
either include or exclude.
+only the second path-prefix is kept. In particular, a path like
client/Bar.java is excluded, as a result of being excluded by the second
path-prefix. This outcome is probably different from what the user expects.
In this scenario, any path-prefixes defined by a user, however specific,
could end up clobbering any path-prefixes that the user's modules inherit.
The primary reason this clobbering happens is because Gwt 1.6 internally
does not distinguish between the inclusion (exclusion) being specifically
mentioned by the {{{PathPrefix}}} and the inclusion (exclusion) due to
defaults. When a resource with a specified path is processed by a Gwt 1.6
{{{PathPrefix}}}, the output is either *include* or *exclude*. The resource
is included if the output is *include*. Else, the output is *exclude* and
the resource is excluded. To handle multiple {{{PathPrefix}}}es
meaningfully, we generalize the output to be:
+ # *include*: if the include filter of the {{{PathPrefix}}} specifically
includes the resource and its exclude filter does not excludes the resource.
+ # *exclude*: if the exclude filter of the {{{PathPrefix}}} specifically
excludes the resource.
+ # *unspecified_include*: if the resource is included just by default.
For example, a path-prefix {{{<source path="client" />}}} includes all java
files in the client directory by default.
+ # *unspecified_exclude*: if the resource is excluded just by default.
For example, a path-prefix {{{<source path="client" />}}} excludes a file
with path as {{{client/.svn/FOO}}} by default.
-To handle multiple {{{PathPrefix}}}es meaningfully, we generalize the
output of a {{{PathPrefix}}}. When a resource is processed by a
{{{PathPrefix}}}, the output can be:
+For each path-prefix path, an ordered list of {{{PathPrefix}}}es is
maintained, with the lexically last {{{PathPrefix}}} at the head of the
list. If a resource matches a {{{PathPrefix}}} path, path-prefixes are
applied from the ordered list starting from the head. The next
{{{PathPrefix}}} in the list is applied only if the previous path-prefix
filter's output is either *unspecified_include* or *unspecified_exclude*.
If the output remains *unspecified_include* (*unspecified_exclude*) at the
end, it is treated as an *include* (*exclude*). As with Gwt 1.6, the
resource is included if the output is *include* at the end. Else, the
output is *exclude* and it is excluded.
- # *include*: if its include filter specifically includes the resource
and its exclude filter does not excludes the resource
- # *exclude*: if its exclude filter specifically excludes the resource
- # *unspecified_include*: if the resource is included by default
- # *unspecified_exclude*: if the resource is excluded just by default
-
-
\ No newline at end of file
+This algorithm is just a generalization of Gwt 1.6's resource filtering
algorithm. It should not be a breaking change except in a few edge cases
relying on inclusion or exclusion by default.
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---