Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356205

Summary: NPE when creating synchronized project
Product: [Tools] PTP Reporter: Praful Hebbar <prafhebb>
Component: Remote ToolsAssignee: John Eblen <jdeblen1>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jdeblen1, jeblen
Version: 5.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 380933    
Bug Blocks:    

Description Praful Hebbar CLA 2011-08-30 10:18:13 EDT
Note: You may have to configure git on remote machine to reproduce this.

The steps you need to reproduce this is:
1> Click on New->Project->Sync C/C++ Project. Click Next. 
2> Enter a project name. 
3> Choose Executable->Empty Project for Project Type and click on next. 
4> Click on Advanced  Settings. 
5> Click on Synchronize.

If Synchronize option is not available in the last step check that you have the project location pointing to a remote location using the remote tools connection.

Stack Trace:
java.lang.NullPointerException
	at org.eclipse.cdt.ui.newui.AbstractSinglePage.setVisible(AbstractSinglePage.java:92)
	at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1323)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:674)
	at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	......

Attached a screen shot.
Comment 1 John Eblen CLA 2011-08-30 11:00:47 EDT
This is a known issue with synchronization projects. On the wiki, we advise users not to change configurations inside the wizard but to wait until after project creation.

Synchronization project code is not run until the last page of the wizard. So it is not possible to initialize the project data before that point. This makes the bug rather difficult to fix, but I'll take another look and see what can be done.
Comment 2 John Eblen CLA 2012-05-29 13:30:14 EDT
This is fixed with the new synchronized project wizard. The "Synchronize" option is no longer available from the configuration page.