Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] [Sync Projects] - Problems with providers

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.

Back to the top