Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 306933 - NullPointerException prevents New Ecore Model wizard from appearing
Summary: NullPointerException prevents New Ecore Model wizard from appearing
Status: CLOSED DUPLICATE of bug 305961
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 306932 307054 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-24 08:04 EDT by Rüdiger Herrmann CLA
Modified: 2010-03-25 10:09 EDT (History)
2 users (show)

See Also:


Attachments
Stacktrace (6.74 KB, text/plain)
2010-03-24 08:07 EDT, Rüdiger Herrmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2010-03-24 08:04:48 EDT
Environment: 
Helios M6 RCP package and latest EMF SDK from http://download.eclipse.org/releases/helios

Steps to reproduce:
1. Open the new wizard
2. Select "Ecode Model" from the "Eclipse Modeling Framework" category
3. Click on the "Next" button
4. A NullPointerException is written to the error log (see attached stacktrace)
Comment 1 Rüdiger Herrmann CLA 2010-03-24 08:07:01 EDT
Created attachment 162854 [details]
Stacktrace
Comment 2 Ed Merks CLA 2010-03-24 10:25:18 EDT
*** Bug 306932 has been marked as a duplicate of this bug. ***
Comment 3 Ed Merks CLA 2010-03-24 10:37:22 EDT
This looks to be a problem in the platform. 

This code

	private boolean isFilteredByParent() {
		if (linkTargetPath != null)
			return false;
		IPath containerPath = resourceGroup.getContainerFullPath();
		String resourceName = resourceGroup.getResource();
		if (resourceName.length() > 0) {
			IPath newFolderPath = containerPath.append(resourceName);

assumes that container path isn't null but this call makes it clear

	/**
	 * Returns the path of the currently selected container or null if no
	 * container has been selected. Note that the container may not exist yet if
	 * the user entered a new container name in the field.
	 * 
	 * @return The path of the container, or <code>null</code>
	 */
	public IPath getContainerFullPath() {
		return containerGroup.getContainerFullPath();
	}

that it could be null if there is no selected container.

As such, if you invoke the wizard making sure there is no selection in the workspace (a necessary step to reproduce this bug) this code will encounter a null pointer exception.  I believe there should be a guard for this so that false is returned.
Comment 4 Paul Webster CLA 2010-03-24 10:56:09 EDT

*** This bug has been marked as a duplicate of bug 305961 ***
Comment 5 Ed Merks CLA 2010-03-25 10:09:24 EDT
*** Bug 307054 has been marked as a duplicate of this bug. ***