includeSourceSection.setStringValue( dialog.getPath( ) .substring( 0, dialog.getPath( ).lastIndexOf( "." ) ) );
String path = dialog.getPath( ); if ( path.lastIndexOf( "." ) > 0 ) { path = path.substring( 0, path.lastIndexOf( "." ) ); } includeSourceSection.setStringValue( path );
	public void buildUI( Composite parent  )	{		super.buildUI( parent );		// TODO Auto-generated method stub		container.setLayout( WidgetUtil.createGridLayout( 5 ) );		TextPropertyDescriptorProvider includeSourceProvider = new TextPropertyDescriptorProvider( ModuleHandle.INCLUDE_RESOURCE_PROP,				ReportDesignConstants.MODULE_ELEMENT );		includeSourceSection = new TextAndButtonSection( includeSourceProvider.getDisplayName( ),				container,				true );		includeSourceSection.setProvider( includeSourceProvider );		includeSourceSection.addSelectionListener( new SelectionAdapter( ) {			public void widgetSelected( SelectionEvent e )			{				final NewResourceFileDialog dialog = new NewResourceFileDialog( );				if ( dialog.open( ) == Window.OK )				{					includeSourceSection.setStringValue( dialog.getPath( )							.substring( 0, dialog.getPath( ).lastIndexOf( "." ) ) ); //$NON-NLS-1$					includeSourceSection.forceFocus( );				}			}		} );		includeSourceSection.setWidth( 500 );		includeSourceSection.setButtonText( Messages.getString( "ReportPage.text.Resource.Add" ) );		includeSourceSection.setButtonWidth( 60 );		includeSourceSection.setGridPlaceholder( 1, true );		addSection( PageSectionId.RESOURCE_INCLUDE, includeSourceSection );		SeperatorSection seperatorSection = new SeperatorSection( container,				SWT.HORIZONTAL );		addSection( PageSectionId.RESOURCE_SEPERATOR, seperatorSection );		JarFileFormProvider jarFileProvider = new JarFileFormProvider( );		FormSection jarFileSection = new FormSection( jarFileProvider.getDisplayName( ),				container,				true );		jarFileSection.setCustomForm( new JarFileFormPropertyDescriptor( true ) );		jarFileSection.setProvider( jarFileProvider );		jarFileSection.showDisplayLabel( true );		jarFileSection.setButtonWithDialog( true );		jarFileSection.setStyle( FormPropertyDescriptor.FULL_FUNCTION );		jarFileSection.setFillForm( true );		jarFileSection.setWidth( 500 );		jarFileSection.setHeight( 200 );		jarFileSection.setDisplayLabelStyle( SWT.HORIZONTAL );		jarFileSection.setGridPlaceholder( 1, true );		addSection( PageSectionId.RESOURCE_JARFILE, jarFileSection );		createSections( );		layoutSections( );	}