Hi Greg,
My scenario is the following: I've created a sync project using
GCC (a simple hello world). Then, I I went to C/C++ General >
Preprocessor Macro Includes, path, etc ... unchecked the following

and checked this:

So, at this point I have the remote entries selected:
 
So, I assume that now I'm using the remote includes. But although I
can get it working (I can build it), somehow it can resolve the
symbols:

With your latest fix, it is possible to generate the source outline:

Summing it up: the AST is being generated, we have the remote
includes and I can build the project. The only missing part is
related to solving the symbols.
As the .log does no point any errors, I have no idea about where to
start debugging this problem.
On 09/24/2014 03:37 PM, Greg Watson
wrote:
Yes, it will be included in 8.1.1.
Without knowing more about your setup, it is impossible to
know why the remote includes are not being resolved.
I just tried adding "//connection_name/usr/include” to the
"CDT User Settings Entries" in "C/C++ General > Preprocessor
Include Paths” and it seemed to work fine. You MUST select "File
System Path” and “Contains system headers” or it will not work.
I could not get adding "//connection_name/usr/include” to
“GNU C” under the “Includes” tab of “C/C++ General > Paths
and Symbols” to work.
The “Paths and Symbols” properties are deprecated anyway I
think, so I would stick to the first method.
Also, I am using the built-in JSch provider. I can’t vouch
for the other other providers working.
Greg
Greg, although your solution works, sync projects still
can't find symbols.
On 09/24/2014 11:06 AM,
Rafael Peria de Sene wrote:
Hi Greg, your solution works !
Are you planning to include this fix in the PTP
8.1.1. ?
On 09/24/2014 10:26 AM,
Greg Watson wrote:
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
|