Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source triggers copied to style properties before updating them in cacheProperties #372

Merged
merged 3 commits into from
Mar 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1287,10 +1287,27 @@ private void buildCachedPropertyDefns( )
if ( sourcePropertyDefn instanceof IElementPropertyDefn
&& !( (IElementPropertyDefn) sourcePropertyDefn ).isStyleProperty( ) )
{
ElementDefn style = (ElementDefn) MetaDataDictionary.getInstance( )
.getStyle( );
ElementDefn style = (ElementDefn) MetaDataDictionary
.getInstance( ).getStyle( );
if ( style.getProperty( IStyleModel.HEIGHT_PROP ) != null )
{

// Copy semantic triggers from SourceTriggers to
// StyleTriggers while replacing the style property
// BIRT-674
IPropertyDefn propertyDefn = style
.getProperty( IStyleModel.HEIGHT_PROP );
List<SemanticTriggerDefn> sourceTriggers = ( (PropertyDefn) sourcePropertyDefn )
.getTriggerDefnSet( ).getTriggerList( );

// Adding source defined semantic triggers to style
// properties and adding them to chachedProperties
for ( SemanticTriggerDefn semanticTrigger : sourceTriggers )
{
( (PropertyDefn) propertyDefn ).getTriggerDefnSet( )
.add( semanticTrigger );
}

cachedProperties.put( IStyleModel.HEIGHT_PROP,
style.getProperty( IStyleModel.HEIGHT_PROP ) );
}
Expand All @@ -1302,10 +1319,25 @@ private void buildCachedPropertyDefns( )
if ( sourcePropertyDefn instanceof IElementPropertyDefn
&& !( (IElementPropertyDefn) sourcePropertyDefn ).isStyleProperty( ) )
{
ElementDefn style = (ElementDefn) MetaDataDictionary.getInstance( )
.getStyle( );
ElementDefn style = (ElementDefn) MetaDataDictionary
.getInstance( ).getStyle( );
if ( style.getProperty( IStyleModel.WIDTH_PROP ) != null )
{
// Copy semantic triggers from SourceTriggers to
// StyleTriggers while replacing the style property
// BIRT-674
IElementPropertyDefn propertyDefn = style
.getProperty( IStyleModel.WIDTH_PROP );
List<SemanticTriggerDefn> sourceTriggers = ( (PropertyDefn) sourcePropertyDefn )
.getTriggerDefnSet( ).getTriggerList( );

// Adding source defined semantic triggers to style
// properties and adding them to chachedProperties
for ( SemanticTriggerDefn semanticTrigger : sourceTriggers )
{
( (PropertyDefn) propertyDefn ).getTriggerDefnSet( )
.add( semanticTrigger );
}
cachedProperties.put( IStyleModel.WIDTH_PROP,
style.getProperty( IStyleModel.WIDTH_PROP ) );
}
Expand Down