| Summary: | Remote project outline displays header file from local host | ||
|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | Dave Hudak <dhudak> |
| Component: | RDT | Assignee: | Vivian Kong <vivkong> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ptp-inbox, recoskie |
| Version: | 4.0.6 | ||
| Target Milestone: | 4.0.7 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Dave Hudak
I'll take a look The OpenIncludeAction always tries to open the include on the local host first before attempting the remote host. For remote projects, it should not try to open the include on the local host.
The second issue (in the Project Explorer) will need a separate fix. I'll open another bug for that.
Proposed patch:
### Eclipse Workspace Patch 1.0
#P org.eclipse.ptp.rdt.ui
Index: src/org/eclipse/ptp/internal/rdt/ui/editor/OpenIncludeAction.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/internal/rdt/ui/editor/OpenIncludeAction.java,v
retrieving revision 1.4.2.2
diff -u -r1.4.2.2 OpenIncludeAction.java
--- src/org/eclipse/ptp/internal/rdt/ui/editor/OpenIncludeAction.java 10 Feb 2011 20:11:11 -0000 1.4.2.2
+++ src/org/eclipse/ptp/internal/rdt/ui/editor/OpenIncludeAction.java 28 Apr 2011 19:16:03 -0000
@@ -13,6 +13,11 @@
* Anton Leherbauer (Wind River Systems)
*******************************************************************************/
+/* -- ST-Origin --
+ * Source folder: org.eclipse.cdt.ui/src
+ * Class: org.eclipse.cdt.internal.ui.editor.OpenIncludeAction
+ * Version: 1.34
+ */
package org.eclipse.ptp.internal.rdt.ui.editor;
import java.io.File;
@@ -53,6 +58,7 @@
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.ptp.rdt.core.RDTLog;
+import org.eclipse.ptp.rdt.core.resources.RemoteNature;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
@@ -98,7 +104,10 @@
if (fullFileName != null) {
IPath fullPath= new Path(fullFileName);
if (fullPath.isAbsolute() && fullPath.toFile().exists()) { //local
- filesFound.add(fullPath.toFile().toURI());
+ //Bug 343648 - Remote project outline displays header file from local host
+ if (!RemoteNature.hasRemoteNature(include.getCProject().getProject())) {
+ filesFound.add(fullPath.toFile().toURI());
+ }
}
if (filesFound.isEmpty()) {
//remote: get host information and try again
Fixed in ptp_4_0 and HEAD. See Bug 344190 for the issue in Project Explorer. |