Bug 162340 NPE thrown when select the report name in outline and press F2 in RCP
NPE thrown when select the report name in outline and press F2 in RCP Steps to reproduce: 1.new a RCP report and new a report design 2.go to outline and select the report design name 3.press F2 Expected result: No NPE thrown in error log Actual result: NPE thrown in erro log
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/views/actions/RenameAction.java
import org.eclipse.birt.report.model.api.command.NameException;
import org.eclipse.birt.report.model.api.metadata.MetaDataConstants;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
/**
 * This class represents the rename action
 */
public class RenameAction extends AbstractViewerAction
{
	/**
	 * the default text
	 */
	public static final String TEXT = Messages.getString( "RenameAction.text" ); 
	private TreeItem selectedItem;
	private String originalName;
	private static final String ERROR_TITLE = Messages.getString( "RenameInlineTool.DialogTitle.RenameFailed" ); 
	private static final String TRANS_LABEL = Messages.getString( "RenameInlineTool.TransLabel.Rename" ); 
	/**
	 * Create a new rename action under the specific viewer
	 * 
	 * @param sourceViewer
	 *            the source viewer
	 * 
	 */
	public RenameAction( TreeViewer sourceViewer )
	{
		this( sourceViewer, TEXT );
	}