|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitor
com.google.gwt.resources.gss.ExternalClassesCollector
public class ExternalClassesCollector
Compiler pass that collects external styles declared with the @external at-rule.
This pass also removes the @external nodes from the AST.
| Field Summary | |
|---|---|
static java.lang.String |
EXTERNAL_AT_RULE
|
| Constructor Summary | |
|---|---|
ExternalClassesCollector(com.google.gwt.thirdparty.common.css.compiler.ast.MutatingVisitController visitController,
com.google.gwt.thirdparty.common.css.compiler.ast.ErrorManager errorManager)
|
|
| Method Summary | |
|---|---|
boolean |
enterClassSelector(com.google.gwt.thirdparty.common.css.compiler.ast.CssClassSelectorNode classSelector)
|
com.google.gwt.thirdparty.guava.common.collect.ImmutableSet<java.lang.String> |
getExternalClassNames(java.util.Set<java.lang.String> styleClassesSet,
java.util.Set<java.lang.String> orphanClassName)
Returns an immutable set of external class names that should not be renamed. |
void |
leaveUnknownAtRule(com.google.gwt.thirdparty.common.css.compiler.ast.CssUnknownAtRuleNode node)
|
void |
runPass()
|
| Methods inherited from class com.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitor |
|---|
enterArgumentNode, enterAttributeSelector, enterBlock, enterCombinator, enterComponent, enterCompositeValueNode, enterCompositeValueNodeOperator, enterConditionalBlock, enterConditionalRule, enterDeclaration, enterDeclarationBlock, enterDefinition, enterFontFace, enterFunctionNode, enterIdSelector, enterImportBlock, enterImportRule, enterKey, enterKeyBlock, enterKeyframeRuleset, enterKeyframesRule, enterMediaRule, enterMediaTypeListDelimiter, enterMixin, enterMixinDefinition, enterPageRule, enterPageSelector, enterPropertyValue, enterProvideNode, enterPseudoClass, enterPseudoElement, enterRequireNode, enterRuleset, enterSelector, enterSelectorBlock, enterTree, enterUnknownAtRule, enterValueNode, leaveArgumentNode, leaveAttributeSelector, leaveBlock, leaveClassSelector, leaveCombinator, leaveComponent, leaveCompositeValueNode, leaveCompositeValueNodeOperator, leaveConditionalBlock, leaveConditionalRule, leaveDeclaration, leaveDeclarationBlock, leaveDefinition, leaveFontFace, leaveFunctionNode, leaveIdSelector, leaveImportBlock, leaveImportRule, leaveKey, leaveKeyBlock, leaveKeyframeRuleset, leaveKeyframesRule, leaveMediaRule, leaveMediaTypeListDelimiter, leaveMixin, leaveMixinDefinition, leavePageRule, leavePageSelector, leavePropertyValue, leaveProvideNode, leavePseudoClass, leavePseudoElement, leaveRequireNode, leaveRuleset, leaveSelector, leaveSelectorBlock, leaveTree, leaveValueNode, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String EXTERNAL_AT_RULE
| Constructor Detail |
|---|
public ExternalClassesCollector(com.google.gwt.thirdparty.common.css.compiler.ast.MutatingVisitController visitController,
com.google.gwt.thirdparty.common.css.compiler.ast.ErrorManager errorManager)
| Method Detail |
|---|
public void runPass()
runPass in interface com.google.gwt.thirdparty.common.css.compiler.ast.CssCompilerPasspublic boolean enterClassSelector(com.google.gwt.thirdparty.common.css.compiler.ast.CssClassSelectorNode classSelector)
enterClassSelector in interface com.google.gwt.thirdparty.common.css.compiler.ast.CssTreeVisitorenterClassSelector in class com.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitorpublic void leaveUnknownAtRule(com.google.gwt.thirdparty.common.css.compiler.ast.CssUnknownAtRuleNode node)
leaveUnknownAtRule in interface com.google.gwt.thirdparty.common.css.compiler.ast.AtRuleHandlerleaveUnknownAtRule in class com.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitor
public com.google.gwt.thirdparty.guava.common.collect.ImmutableSet<java.lang.String> getExternalClassNames(java.util.Set<java.lang.String> styleClassesSet,
java.util.Set<java.lang.String> orphanClassName)
@external as well as all of the class names from
styleClassesSet that match prefixes defined with @external.
The set will contain also the class names that are not in the AST anymore (defined in a
conditional node that has been evaluated to false) and are not associated to a java method.
That doesn't make sense to rename these class names because they are not in the final css
and javascript. Moreover we handle the case where an @external related to these
style classes has been removed from the AST (because it was also defined in a conditional
node evaluated to false) and the compiler doesn't have to throw and error for this case.
/* conditional node evaluated to false at compile time */
styleClassesSet - a set of class names that should be filtered to
return those matching external prefixes. Note that the passed-in set is not
modified.orphanClassName - a set of class names that aren't associated to a java method of the
CssResource interface.
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||