Rafael,
It looks like this NPE can occur if a) you have a remote include path that uses a connection name that no longer exists in any of your remote services providers AND b) you have the PTP RSE remote adapter plugin installed. (a) may occur if you have removed or renamed a connection after adding the remote include path.
If you’d like to try it and let me know if it fixes the NPE, it would be appreciated.
Thanks, Greg
Hi folks, when creating a sync project and changing the providers in
order to locate the remote includes I got the following error:
!ENTRY org.eclipse.ui.navigator 4 0 2014-09-23 09:12:37.848
!MESSAGE An exception occurred invoking extension:
org.eclipse.cdt.ui.navigator.content for object
org.eclipse.jface.viewers.TreePath@63bc0fb7
!STACK 0
java.lang.NullPointerException
at
org.eclipse.remote.core.RemoteServicesUtils.toURI(RemoteServicesUtils.java:126)
at
org.eclipse.ptp.internal.rdt.sync.cdt.core.SyncUNCPathConverter.toURI(SyncUNCPathConverter.java:36)
at
org.eclipse.cdt.internal.core.UNCPathConverterImpl.toURI(UNCPathConverterImpl.java:75)
at
org.eclipse.cdt.internal.core.model.IncludeReference.computeChildren(IncludeReference.java:152)
at
org.eclipse.cdt.internal.core.model.IncludeReference.buildStructure(IncludeReference.java:101)
at
org.eclipse.cdt.internal.core.model.Openable.generateInfos(Openable.java:273)
at
org.eclipse.cdt.internal.core.model.CElement.openWhenClosed(CElement.java:427)
at
org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:305)
at
org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:295)
at
org.eclipse.cdt.internal.core.model.Parent.hasChildren(Parent.java:81)
This error is associated with this snippet of code from
SyncGCCBuiltinSpecsDetector class (I removed the Windows part):
List<ICLanguageSettingEntry> newEntries = new
ArrayList<ICLanguageSettingEntry>();
for (ICLanguageSettingEntry entry : entries) {
if ((entry instanceof CIncludePathEntry) &&
((entry.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH) == 0))
{
String oldPath = ((CIncludePathEntry)
entry).getValue();
String newPath = "//" + conn.getName() + oldPath;
//$NON-NLS-1$
ICLanguageSettingEntry newEntry = new
CIncludePathEntry(newPath, entry.getFlags());
newEntries.add(newEntry);
} else {
newEntries.add(entry);
}
}
Using the following snippet of code, the problem is gone, but the
editor marks all the symbols as errors:
List<ICLanguageSettingEntry> newEntries = new
ArrayList<ICLanguageSettingEntry>();
for (ICLanguageSettingEntry entry : entries) {
if ((entry instanceof CIncludePathEntry) &&
((entry.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH) == 0))
{
String oldPath = ((CIncludePathEntry)
entry).getValue();
//String newPath = "//" + conn.getName() +
oldPath; //$NON-NLS-1$
ICLanguageSettingEntry newEntry = new
CIncludePathEntry(oldPath, entry.getFlags());
newEntries.add(newEntry);
} else {
newEntries.add(entry);
}
}
Do you guys have any idea about the root of this problem ? I'm using
the latest version of PTP.
_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/ptp-dev |