diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog
index 7f5d1ff8af3..54319adcd21 100644
--- a/core/org.eclipse.cdt.core/ChangeLog
+++ b/core/org.eclipse.cdt.core/ChangeLog
@@ -1,3 +1,18 @@
+2004-02-24 Alain Magloire
+
+ Bug fix the binary runner thread could get interrupted
+ on shutdown we should check:
+ Thread.getCurrentThread().isInterrupted()
+ and bring down the thread.
+
+ * model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
+
+2004-02-23 Alain Magloire
+
+ Another refactoring, to make the API lighter
+ move the the getPath() method to the base IPathEntry class
+ Too many files to enumerate(JDT refactoris ... is great!)
+
2004-02-23 Alain Magloire
Support for IPathEntry deltas in the ICElementDelta
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContainerEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContainerEntry.java
index 60a68ca0121..ed48ef3212c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContainerEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContainerEntry.java
@@ -12,14 +12,7 @@
***********************************************************************/
package org.eclipse.cdt.core.model;
-import org.eclipse.core.runtime.IPath;
public interface IContainerEntry extends IPathEntry {
- /**
- * Returns the id identifying this container.
- * @return IPath
- */
- IPath getPath();
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java
index 8feec25a55c..bb5d6cf1e1b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java
@@ -16,12 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface IIncludeEntry extends IPathEntry {
- /**
- * Returns the affected resource by the include.
- * @return IPath
- */
- IPath getResourcePath();
-
/**
* Returns the include path
* @return IPath
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java
index 9fd58e9f8fd..1e914c08674 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java
@@ -16,12 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface ILibraryEntry extends IPathEntry {
- /**
- * Returns the absolute path of the library
- * @return String
- */
- IPath getLibraryPath();
-
/**
* Returns the path to the source archive or folder associated with this
* C path entry, or null
if this C path entry has no
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java
index ccb51cbd105..0542ba6f5a8 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java
@@ -16,13 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface IMacroEntry extends IPathEntry {
- /**
- * Returns the absolute path from the worskspace root or
- * relative path of the affected resource.
- * @return String
- */
- IPath getResourcePath();
-
/**
* Returns the macro name.
* @return String
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntry.java
index f707d8282e0..1159f834aee 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntry.java
@@ -12,6 +12,8 @@
***********************************************************************/
package org.eclipse.cdt.core.model;
+import org.eclipse.core.runtime.IPath;
+
public interface IPathEntry {
@@ -71,8 +73,7 @@ public interface IPathEntry {
*
* @return one of:
*
CDT_SOURCE
- this entry describes a source root in
- its project
+ * CDT_SOURCE
- this entry describes a source root in its project
* CDT_LIBRARY
- this entry describes a library
* CDT_PROJECT
- this entry describes another project
* CDT_INCLUDE
- this entry describes a include path
@@ -83,12 +84,12 @@ public interface IPathEntry {
int getEntryKind();
/**
- * Returns whether this entry is exported to dependent projects.
- * Always returns false
for source entries (kind
- * CPE_SOURCE
), which cannot be exported.
+ * Returns the affected IPath
*
- * @return true
if exported, and false
otherwise
+ * @return IPath
*/
boolean isExported();
+ IPath getPath();
+
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IProjectEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IProjectEntry.java
index ed859938234..406baa62001 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IProjectEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IProjectEntry.java
@@ -12,15 +12,8 @@
***********************************************************************/
package org.eclipse.cdt.core.model;
-import org.eclipse.core.runtime.IPath;
public interface IProjectEntry extends IPathEntry {
- /**
- * Returns the absolute path relative to the workspace root.
- * @return IPath
- */
- IPath getProjectPath();
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceEntry.java
index 05202e4c076..f1f48bc45ab 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceEntry.java
@@ -16,13 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface ISourceEntry extends IPathEntry {
- /**
- * Returns the absolute path from the worskspace root or
- * relative path of the source folder.
- * @return String
- */
- IPath getSourcePath();
-
/**
* Whether or not to look recursively in the folder.
* @return boolean
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
index 94ca47f4732..4873a0d6cee 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
@@ -20,8 +20,8 @@ public abstract class APathEntry extends PathEntry {
IPath[] exclusionPatterns;
boolean isRecursive;
- public APathEntry (int kind, boolean isRecursive, IPath[] exclusionPatterns, boolean isExported) {
- super(kind, isExported);
+ public APathEntry (int kind, IPath path, boolean isRecursive, IPath[] exclusionPatterns, boolean isExported) {
+ super(kind, path, isExported);
this.exclusionPatterns = exclusionPatterns;
this.isRecursive = isRecursive;
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
index 3f1cefba23f..615e23f2eab 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
@@ -28,6 +28,9 @@ public class BinaryRunner {
runner = new Thread(new Runnable() {
public void run() {
ICProject cproject = CModelManager.getDefault().create(project);
+ if (cproject == null || Thread.currentThread().isInterrupted()) {
+ return;
+ }
ArchiveContainer clib;
BinaryContainer cbin;
cbin = (BinaryContainer)cproject.getBinaryContainer();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
index c252d61eeb4..f4c6f3ed0bc 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
@@ -105,7 +105,7 @@ public class CProject extends CContainer implements ICProject {
if (binParser != null) {
IBinaryFile bin;
try {
- bin = binParser.getBinary(entry.getLibraryPath());
+ bin = binParser.getBinary(entry.getPath());
if (bin.getType() == IBinaryFile.ARCHIVE) {
lib = new LibraryReferenceArchive(this, entry, (IBinaryArchive)bin);
} else {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContainerEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContainerEntry.java
index eea05ae95cf..c5448a4e7e4 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContainerEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContainerEntry.java
@@ -17,19 +17,8 @@ import org.eclipse.core.runtime.IPath;
public class ContainerEntry extends PathEntry implements IContainerEntry {
- IPath path;
-
public ContainerEntry(IPath path, boolean isExported) {
- super(IContainerEntry.CDT_CONTAINER, isExported);
- this.path = path;
- }
-
- /**
- * Returns the id identifying this container.
- * @return IPath
- */
- public IPath getPath() {
- return path;
+ super(IContainerEntry.CDT_CONTAINER, path, isExported);
}
public boolean equals(Object obj) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java
index d0bf9fb90f7..ba1f2ab3fc7 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java
@@ -17,27 +17,16 @@ import org.eclipse.core.runtime.IPath;
public class IncludeEntry extends APathEntry implements IIncludeEntry {
- IPath resourcePath;
IPath includePath;
boolean isSystemInclude;
- public IncludeEntry(IPath resourcePath, IPath includePath, boolean isSystemInclude, boolean isRecursive,
+ public IncludeEntry(IPath path, IPath includePath, boolean isSystemInclude, boolean isRecursive,
IPath[] exclusionPatterns) {
- super(IIncludeEntry.CDT_INCLUDE, isRecursive, exclusionPatterns, resourcePath == null);
- this.resourcePath = resourcePath;
+ super(IIncludeEntry.CDT_INCLUDE, path, isRecursive, exclusionPatterns, path == null);
this.includePath = includePath;
this.isSystemInclude = isSystemInclude;
}
- /**
- * Returns the affected resource by the include.
- *
- * @return IPath
- */
- public IPath getResourcePath() {
- return resourcePath;
- }
-
/**
* Returns the include path
*
@@ -62,12 +51,12 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
if (!super.equals(otherEntry)) {
return false;
}
- if (resourcePath == null) {
- if (otherEntry.getResourcePath() != null) {
+ if (path == null) {
+ if (otherEntry.getPath() != null) {
return false;
}
} else {
- if (!resourcePath.toString().equals(otherEntry.getResourcePath().toString())) {
+ if (!path.toString().equals(otherEntry.getPath().toString())) {
return false;
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java
index 13487b77f10..6b93aa2610d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java
@@ -22,23 +22,14 @@ public class LibraryEntry extends PathEntry implements ILibraryEntry {
IPath sourceAttachmentRootPath;
IPath sourceAttachmentPrefixMapping;
- public LibraryEntry(IPath libraryPath, IPath sourceAttachmentPath,
+ public LibraryEntry(IPath path, IPath sourceAttachmentPath,
IPath sourceAttachmentRootPath, IPath sourceAttachmentPrefixMapping, boolean isExported) {
- super(ILibraryEntry.CDT_LIBRARY, isExported);
- this.libraryPath = libraryPath;
+ super(ILibraryEntry.CDT_LIBRARY, path, isExported);
this.sourceAttachmentPath = sourceAttachmentPath;
this.sourceAttachmentRootPath = sourceAttachmentRootPath;
this.sourceAttachmentPrefixMapping = sourceAttachmentPrefixMapping;
}
- /**
- * Returns the absolute path of the library
- * @return String
- */
- public IPath getLibraryPath() {
- return libraryPath;
- }
-
/**
* Returns the path to the source archive or folder associated with this
* C path entry, or null
if this C path entry has no
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReference.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReference.java
index ee985a84d6a..4da3b8a8889 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReference.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReference.java
@@ -20,7 +20,7 @@ public class LibraryReference extends Parent implements ILibraryReference {
ILibraryEntry entry;
public LibraryReference(ICElement parent, ILibraryEntry e) {
- super(parent, e.getLibraryPath().lastSegment(), ICElement.C_VCONTAINER);
+ super(parent, e.getPath().lastSegment(), ICElement.C_VCONTAINER);
entry = e;
}
@@ -42,7 +42,7 @@ public class LibraryReference extends Parent implements ILibraryReference {
* @see org.eclipse.cdt.core.model.ICElement#getPath()
*/
public IPath getPath() {
- return entry.getLibraryPath();
+ return entry.getPath();
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceArchive.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceArchive.java
index a44014a6fd2..eee120400b0 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceArchive.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceArchive.java
@@ -21,7 +21,7 @@ public class LibraryReferenceArchive extends Archive implements ILibraryReferenc
ILibraryEntry entry;
public LibraryReferenceArchive(ICElement parent, ILibraryEntry e, IBinaryArchive ar) {
- super(parent, e.getLibraryPath(), ar);
+ super(parent, e.getPath(), ar);
setElementType(ICElement.C_VCONTAINER);
entry = e;
}
@@ -38,7 +38,7 @@ public class LibraryReferenceArchive extends Archive implements ILibraryReferenc
* @see org.eclipse.cdt.core.model.ICElement#getPath()
*/
public IPath getPath() {
- return entry.getLibraryPath();
+ return entry.getPath();
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceShared.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceShared.java
index ffa37133e05..7c5411a8660 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceShared.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryReferenceShared.java
@@ -21,7 +21,7 @@ public class LibraryReferenceShared extends Binary implements ILibraryReference
ILibraryEntry entry;
public LibraryReferenceShared(ICElement parent, ILibraryEntry e, IBinaryFile bin) {
- super(parent, e.getLibraryPath(), bin);
+ super(parent, e.getPath(), bin);
setElementType(ICElement.C_VCONTAINER);
entry = e;
}
@@ -44,7 +44,7 @@ public class LibraryReferenceShared extends Binary implements ILibraryReference
* @see org.eclipse.cdt.core.model.ICElement#getPath()
*/
public IPath getPath() {
- return entry.getLibraryPath();
+ return entry.getPath();
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java
index b7599bf4ec3..1d1fc433e7e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java
@@ -17,27 +17,16 @@ import org.eclipse.core.runtime.IPath;
public class MacroEntry extends APathEntry implements IMacroEntry {
- IPath resourcePath;
String macroName;
String macroValue;
- public MacroEntry (IPath resourcePath, String macroName, String macroValue,
+ public MacroEntry (IPath path, String macroName, String macroValue,
boolean isRecursive, IPath[] exclusionPatterns, boolean isExported) {
- super(IMacroEntry.CDT_MACRO, isRecursive, exclusionPatterns, isExported);
- this.resourcePath = resourcePath;
+ super(IMacroEntry.CDT_MACRO, path, isRecursive, exclusionPatterns, isExported);
this.macroName = macroName;
this.macroValue = macroValue;
}
- /**
- * Returns the absolute path from the worskspace root or
- * relative path of the affected resource.
- * @return String
- */
- public IPath getResourcePath() {
- return resourcePath;
- }
-
/**
* Returns the macro name.
* @return String
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java
index bbf09550279..e61ccf26893 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java
@@ -13,18 +13,27 @@
package org.eclipse.cdt.internal.core.model;
import org.eclipse.cdt.core.model.IPathEntry;
+import org.eclipse.core.runtime.IPath;
public class PathEntry implements IPathEntry {
public int entryKind;
public boolean isExported;
+ public IPath path;
- public PathEntry(int entryKind, boolean isExported) {
-
+ public PathEntry(int entryKind, IPath path, boolean isExported) {
+ this.path = path;
this.entryKind = entryKind;
this.isExported = isExported;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
+ */
+ public IPath getPath() {
+ return path;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
*/
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
index e2d9b54bc7e..60ed965763c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
@@ -369,7 +369,7 @@ public class PathEntryManager {
for (int i = 0, length = entries.length; i < length; i++) {
if (entries[i].getEntryKind() == IPathEntry.CDT_PROJECT) {
IProjectEntry entry = (IProjectEntry)entries[i];
- prerequisites.add(entry.getProjectPath().lastSegment());
+ prerequisites.add(entry.getPath().lastSegment());
}
}
int size = prerequisites.size();
@@ -468,7 +468,7 @@ public class PathEntryManager {
int flag = 0;
if (kind == IPathEntry.CDT_SOURCE) {
ISourceEntry source = (ISourceEntry) entry;
- IPath path = source.getSourcePath();
+ IPath path = source.getPath();
celement = CoreModel.getDefault().create(path);
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_SOURCE : ICElementDelta.F_ADDED_PATHENTRY_SOURCE;
} else if (kind == IPathEntry.CDT_LIBRARY) {
@@ -483,12 +483,12 @@ public class PathEntryManager {
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_PROJECT : ICElementDelta.F_ADDED_PATHENTRY_PROJECT;
} else if (kind == IPathEntry.CDT_INCLUDE) {
IIncludeEntry include = (IIncludeEntry) entry;
- IPath path = include.getResourcePath();
+ IPath path = include.getPath();
celement = CoreModel.getDefault().create(path);
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_INCLUDE : ICElementDelta.F_ADDED_PATHENTRY_INCLUDE;
} else if (kind == IPathEntry.CDT_MACRO) {
IMacroEntry macro = (IMacroEntry) entry;
- IPath path = macro.getResourcePath();
+ IPath path = macro.getPath();
celement = CoreModel.getDefault().create(path);
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_MACRO : ICElementDelta.F_ADDED_PATHENTRY_MACRO;
} else if (kind == IPathEntry.CDT_CONTAINER) {
@@ -673,7 +673,7 @@ public class PathEntryManager {
if (kind == IPathEntry.CDT_SOURCE) {
ISourceEntry source = (ISourceEntry) entries[i];
- IPath path = source.getSourcePath();
+ IPath path = source.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString());
IPath output = source.getOutputLocation();
if (output != null && output.isEmpty()) {
@@ -681,7 +681,7 @@ public class PathEntryManager {
}
} else if (kind == IPathEntry.CDT_LIBRARY) {
ILibraryEntry lib = (ILibraryEntry) entries[i];
- IPath path = lib.getLibraryPath();
+ IPath path = lib.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString());
if (lib.getSourceAttachmentPath() != null) {
element.setAttribute(ATTRIBUTE_SOURCEPATH, lib.getSourceAttachmentPath().toString());
@@ -694,11 +694,11 @@ public class PathEntryManager {
}
} else if (kind == IPathEntry.CDT_PROJECT) {
IProjectEntry pentry = (IProjectEntry) entries[i];
- IPath path = pentry.getProjectPath();
+ IPath path = pentry.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString());
} else if (kind == IPathEntry.CDT_INCLUDE) {
IIncludeEntry include = (IIncludeEntry) entries[i];
- IPath path = include.getResourcePath();
+ IPath path = include.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString());
IPath includePath = include.getIncludePath();
element.setAttribute(ATTRIBUTE_INCLUDE, includePath.toString());
@@ -707,7 +707,7 @@ public class PathEntryManager {
}
} else if (kind == IPathEntry.CDT_MACRO) {
IMacroEntry macro = (IMacroEntry) entries[i];
- IPath path = macro.getResourcePath();
+ IPath path = macro.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString());
element.setAttribute(ATTRIBUTE_NAME, macro.getMacroName());
element.setAttribute(ATTRIBUTE_VALUE, macro.getMacroValue());
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ProjectEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ProjectEntry.java
index 7ab83ba117e..a4085cf5b52 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ProjectEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ProjectEntry.java
@@ -18,19 +18,8 @@ import org.eclipse.core.runtime.IPath;
public class ProjectEntry extends PathEntry implements IProjectEntry {
- IPath projectPath;
-
- public ProjectEntry(IPath projectPath, boolean isExported) {
- super(IProjectEntry.CDT_PROJECT, isExported);
- this.projectPath = projectPath;
- }
-
- /**
- * Returns the absolute path relative to the workspace root.
- * @return IPath
- */
- public IPath getProjectPath() {
- return projectPath;
+ public ProjectEntry(IPath path, boolean isExported) {
+ super(IProjectEntry.CDT_PROJECT, path, isExported);
}
public boolean equals(Object obj) {
@@ -39,12 +28,12 @@ public class ProjectEntry extends PathEntry implements IProjectEntry {
if (!super.equals(otherEntry)) {
return false;
}
- if (projectPath == null) {
- if (otherEntry.getProjectPath() != null) {
+ if (path == null) {
+ if (otherEntry.getPath() != null) {
return false;
}
} else {
- if (!projectPath.toString().equals(otherEntry.getProjectPath().toString())) {
+ if (!path.toString().equals(otherEntry.getPath().toString())) {
return false;
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceEntry.java
index 05797e006d1..6b12d7cf86e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceEntry.java
@@ -17,24 +17,13 @@ import org.eclipse.core.runtime.IPath;
public class SourceEntry extends APathEntry implements ISourceEntry {
- IPath sourcePath;
IPath outputLocation;
- public SourceEntry(IPath sourcePath, IPath outputLocation, boolean isRecursive, IPath[] exclusionPatterns) {
- super(ISourceEntry.CDT_SOURCE, isRecursive, exclusionPatterns, false);
- this.sourcePath = sourcePath;
+ public SourceEntry(IPath path, IPath outputLocation, boolean isRecursive, IPath[] exclusionPatterns) {
+ super(ISourceEntry.CDT_SOURCE, path, isRecursive, exclusionPatterns, false);
this.outputLocation = outputLocation;
}
- /**
- * Returns the absolute path from the worskspace root or
- * relative path of the source folder.
- * @return String
- */
- public IPath getSourcePath() {
- return sourcePath;
- }
-
/**
* Binary output location for this source folder.
* @return IPath, null
means to use the
@@ -50,12 +39,12 @@ public class SourceEntry extends APathEntry implements ISourceEntry {
if (!super.equals(otherEntry)) {
return false;
}
- if (sourcePath == null) {
- if (otherEntry.getSourcePath() != null) {
+ if (path == null) {
+ if (otherEntry.getPath() != null) {
return false;
}
} else {
- if (!sourcePath.toString().equals(otherEntry.getSourcePath().toString())) {
+ if (!path.toString().equals(otherEntry.getPath().toString())) {
return false;
}
}