Bug 122283 [Smoke][Regression][SPM-Linux WS]Item in library can't be used when include library from library explorer
Details: Item in library can't be used when include library from library explorer Step: 1.New a library and Insert a label. 2.Open a report design 3.Open the library exploer in report and use the library 4.Drop the library label from library explorer into layout Actual results: Expection pop up. If use the library from report outline, label can drop in layout succeed.
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/views/actions/ImportLibraryAction.java
}
	private boolean isInExplorer( String fileName )
	{
		IEditorPart editor = UIUtil.getActiveEditor( true );
		ILibraryProvider provider = (ILibraryProvider)editor.getAdapter(ILibraryProvider.class);
		if(provider!=null){
			LibraryHandle[] libraries = provider.getLibraries();
			for ( int i = 0; i < libraries.length; i++ )
			{
				if(libraries[i].getFileName( ).equals(fileName))
					return true;
			}
		}
		return false;
	}
	private void addToPreference( String fileName )
	{
		String[] libraries = ReportPlugin.getDefault( )
				.getLibraryPreference( );
		String[] newLibraries = new String[libraries.length + 1];
		System.arraycopy( libraries,
				0,
				newLibraries,
				0,
				libraries.length );
		newLibraries[libraries.length] = fileName;
		ReportPlugin.getDefault( ).setLibraryPreference( newLibraries );
	}
}