<commit_before>
package org.eclipse.birt.report.designer.internal.ui.views.attributes.provider;

import java.util.List;

import org.eclipse.birt.report.designer.ui.dialogs.ExpressionProvider;
import org.eclipse.birt.report.designer.util.DEUtil;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.GroupElementFactory;
import org.eclipse.birt.report.model.api.GroupPropertyHandle;
import org.eclipse.birt.report.model.api.ReportElementHandle;

public class ExpressionPropertyDescriptorProvider extends
		PropertyDescriptorProvider
{

	public ExpressionPropertyDescriptorProvider( String property, String element )
	{
		super( property, element );
		// TODO Auto-generated constructor stub
	}

	public boolean isEnable( )
	{
		List list = DEUtil.getInputElements( input );
		if ( list == null || list.size( ) == 0 )
			return false;
		else
			return true;
	}

	public ExpressionProvider getExpressionProvider( )
	{
		List lst = DEUtil.getInputElements( input );
		if ( lst != null && lst.size( ) == 1 )
		{
			DesignElementHandle elementHandle = (DesignElementHandle) lst.get( 0 );
			return new ExpressionProvider( elementHandle );
		}
		else<commit_msg>- Summary: TOC will be lost when change two labels page break together<commit_after>
package org.eclipse.birt.report.designer.internal.ui.views.attributes.provider;

import java.util.List;

import org.eclipse.birt.report.designer.ui.dialogs.ExpressionProvider;
import org.eclipse.birt.report.designer.util.DEUtil;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.GroupElementFactory;
import org.eclipse.birt.report.model.api.GroupPropertyHandle;
import org.eclipse.birt.report.model.api.ReportElementHandle;

public class ExpressionPropertyDescriptorProvider extends
		PropertyDescriptorProvider
{

	public ExpressionPropertyDescriptorProvider( String property, String element )
	{
		super( property, element );
		// TODO Auto-generated constructor stub
	}

	
	public boolean isEnable( )
	{
		if ( DEUtil.getInputSize( input ) != 1 )
			return false;
		else
			return true;
	}

	public ExpressionProvider getExpressionProvider( )
	{
		List lst = DEUtil.getInputElements( input );
		if ( lst != null && lst.size( ) == 1 )
		{
			DesignElementHandle elementHandle = (DesignElementHandle) lst.get( 0 );
			return new ExpressionProvider( elementHandle );
		}
		else
{'fraction_non_alphanumeric': 0.10045473336089293, 'fraction_numerical': 0.0024803637866887144, 'mean_word_length': 4.734597156398104, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '266301', 'n_tokens_mistral': 760, 'n_tokens_neox': 708, 'n_words': 154}