1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Move the getPath() method in the IPathEntry base class.

This commit is contained in:
Alain Magloire 2004-02-24 22:21:11 +00:00
parent b4309ac47a
commit 6904bc4b71
22 changed files with 74 additions and 150 deletions

View file

@ -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 2004-02-23 Alain Magloire
Support for IPathEntry deltas in the ICElementDelta Support for IPathEntry deltas in the ICElementDelta

View file

@ -12,14 +12,7 @@
***********************************************************************/ ***********************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
import org.eclipse.core.runtime.IPath;
public interface IContainerEntry extends IPathEntry { public interface IContainerEntry extends IPathEntry {
/**
* Returns the id identifying this container.
* @return IPath
*/
IPath getPath();
} }

View file

@ -16,12 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface IIncludeEntry extends IPathEntry { public interface IIncludeEntry extends IPathEntry {
/**
* Returns the affected resource by the include.
* @return IPath
*/
IPath getResourcePath();
/** /**
* Returns the include path * Returns the include path
* @return IPath * @return IPath

View file

@ -16,12 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface ILibraryEntry extends IPathEntry { 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 * Returns the path to the source archive or folder associated with this
* C path entry, or <code>null</code> if this C path entry has no * C path entry, or <code>null</code> if this C path entry has no

View file

@ -16,13 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface IMacroEntry extends IPathEntry { 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. * Returns the macro name.
* @return String * @return String

View file

@ -12,6 +12,8 @@
***********************************************************************/ ***********************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
import org.eclipse.core.runtime.IPath;
public interface IPathEntry { public interface IPathEntry {
@ -71,8 +73,7 @@ public interface IPathEntry {
* *
* @return one of: * @return one of:
* <ul> * <ul>
* <li><code>CDT_SOURCE</code> - this entry describes a source root in * <li><code>CDT_SOURCE</code> - this entry describes a source root in its project
its project
* <li><code>CDT_LIBRARY</code> - this entry describes a library * <li><code>CDT_LIBRARY</code> - this entry describes a library
* <li><code>CDT_PROJECT</code> - this entry describes another project * <li><code>CDT_PROJECT</code> - this entry describes another project
* <li><code>CDT_INCLUDE</code> - this entry describes a include path * <li><code>CDT_INCLUDE</code> - this entry describes a include path
@ -83,12 +84,12 @@ public interface IPathEntry {
int getEntryKind(); int getEntryKind();
/** /**
* Returns whether this entry is exported to dependent projects. * Returns the affected IPath
* Always returns <code>false</code> for source entries (kind
* <code>CPE_SOURCE</code>), which cannot be exported.
* *
* @return <code>true</code> if exported, and <code>false</code> otherwise * @return IPath
*/ */
boolean isExported(); boolean isExported();
IPath getPath();
} }

View file

@ -12,15 +12,8 @@
***********************************************************************/ ***********************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
import org.eclipse.core.runtime.IPath;
public interface IProjectEntry extends IPathEntry { public interface IProjectEntry extends IPathEntry {
/**
* Returns the absolute path relative to the workspace root.
* @return IPath
*/
IPath getProjectPath();
} }

View file

@ -16,13 +16,6 @@ import org.eclipse.core.runtime.IPath;
public interface ISourceEntry extends IPathEntry { 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. * Whether or not to look recursively in the folder.
* @return boolean * @return boolean

View file

@ -20,8 +20,8 @@ public abstract class APathEntry extends PathEntry {
IPath[] exclusionPatterns; IPath[] exclusionPatterns;
boolean isRecursive; boolean isRecursive;
public APathEntry (int kind, boolean isRecursive, IPath[] exclusionPatterns, boolean isExported) { public APathEntry (int kind, IPath path, boolean isRecursive, IPath[] exclusionPatterns, boolean isExported) {
super(kind, isExported); super(kind, path, isExported);
this.exclusionPatterns = exclusionPatterns; this.exclusionPatterns = exclusionPatterns;
this.isRecursive = isRecursive; this.isRecursive = isRecursive;
} }

View file

@ -28,6 +28,9 @@ public class BinaryRunner {
runner = new Thread(new Runnable() { runner = new Thread(new Runnable() {
public void run() { public void run() {
ICProject cproject = CModelManager.getDefault().create(project); ICProject cproject = CModelManager.getDefault().create(project);
if (cproject == null || Thread.currentThread().isInterrupted()) {
return;
}
ArchiveContainer clib; ArchiveContainer clib;
BinaryContainer cbin; BinaryContainer cbin;
cbin = (BinaryContainer)cproject.getBinaryContainer(); cbin = (BinaryContainer)cproject.getBinaryContainer();

View file

@ -105,7 +105,7 @@ public class CProject extends CContainer implements ICProject {
if (binParser != null) { if (binParser != null) {
IBinaryFile bin; IBinaryFile bin;
try { try {
bin = binParser.getBinary(entry.getLibraryPath()); bin = binParser.getBinary(entry.getPath());
if (bin.getType() == IBinaryFile.ARCHIVE) { if (bin.getType() == IBinaryFile.ARCHIVE) {
lib = new LibraryReferenceArchive(this, entry, (IBinaryArchive)bin); lib = new LibraryReferenceArchive(this, entry, (IBinaryArchive)bin);
} else { } else {

View file

@ -17,19 +17,8 @@ import org.eclipse.core.runtime.IPath;
public class ContainerEntry extends PathEntry implements IContainerEntry { public class ContainerEntry extends PathEntry implements IContainerEntry {
IPath path;
public ContainerEntry(IPath path, boolean isExported) { public ContainerEntry(IPath path, boolean isExported) {
super(IContainerEntry.CDT_CONTAINER, isExported); super(IContainerEntry.CDT_CONTAINER, path, isExported);
this.path = path;
}
/**
* Returns the id identifying this container.
* @return IPath
*/
public IPath getPath() {
return path;
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {

View file

@ -17,27 +17,16 @@ import org.eclipse.core.runtime.IPath;
public class IncludeEntry extends APathEntry implements IIncludeEntry { public class IncludeEntry extends APathEntry implements IIncludeEntry {
IPath resourcePath;
IPath includePath; IPath includePath;
boolean isSystemInclude; boolean isSystemInclude;
public IncludeEntry(IPath resourcePath, IPath includePath, boolean isSystemInclude, boolean isRecursive, public IncludeEntry(IPath path, IPath includePath, boolean isSystemInclude, boolean isRecursive,
IPath[] exclusionPatterns) { IPath[] exclusionPatterns) {
super(IIncludeEntry.CDT_INCLUDE, isRecursive, exclusionPatterns, resourcePath == null); super(IIncludeEntry.CDT_INCLUDE, path, isRecursive, exclusionPatterns, path == null);
this.resourcePath = resourcePath;
this.includePath = includePath; this.includePath = includePath;
this.isSystemInclude = isSystemInclude; this.isSystemInclude = isSystemInclude;
} }
/**
* Returns the affected resource by the include.
*
* @return IPath
*/
public IPath getResourcePath() {
return resourcePath;
}
/** /**
* Returns the include path * Returns the include path
* *
@ -62,12 +51,12 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
if (!super.equals(otherEntry)) { if (!super.equals(otherEntry)) {
return false; return false;
} }
if (resourcePath == null) { if (path == null) {
if (otherEntry.getResourcePath() != null) { if (otherEntry.getPath() != null) {
return false; return false;
} }
} else { } else {
if (!resourcePath.toString().equals(otherEntry.getResourcePath().toString())) { if (!path.toString().equals(otherEntry.getPath().toString())) {
return false; return false;
} }
} }

View file

@ -22,23 +22,14 @@ public class LibraryEntry extends PathEntry implements ILibraryEntry {
IPath sourceAttachmentRootPath; IPath sourceAttachmentRootPath;
IPath sourceAttachmentPrefixMapping; IPath sourceAttachmentPrefixMapping;
public LibraryEntry(IPath libraryPath, IPath sourceAttachmentPath, public LibraryEntry(IPath path, IPath sourceAttachmentPath,
IPath sourceAttachmentRootPath, IPath sourceAttachmentPrefixMapping, boolean isExported) { IPath sourceAttachmentRootPath, IPath sourceAttachmentPrefixMapping, boolean isExported) {
super(ILibraryEntry.CDT_LIBRARY, isExported); super(ILibraryEntry.CDT_LIBRARY, path, isExported);
this.libraryPath = libraryPath;
this.sourceAttachmentPath = sourceAttachmentPath; this.sourceAttachmentPath = sourceAttachmentPath;
this.sourceAttachmentRootPath = sourceAttachmentRootPath; this.sourceAttachmentRootPath = sourceAttachmentRootPath;
this.sourceAttachmentPrefixMapping = sourceAttachmentPrefixMapping; 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 * Returns the path to the source archive or folder associated with this
* C path entry, or <code>null</code> if this C path entry has no * C path entry, or <code>null</code> if this C path entry has no

View file

@ -20,7 +20,7 @@ public class LibraryReference extends Parent implements ILibraryReference {
ILibraryEntry entry; ILibraryEntry entry;
public LibraryReference(ICElement parent, ILibraryEntry e) { public LibraryReference(ICElement parent, ILibraryEntry e) {
super(parent, e.getLibraryPath().lastSegment(), ICElement.C_VCONTAINER); super(parent, e.getPath().lastSegment(), ICElement.C_VCONTAINER);
entry = e; entry = e;
} }
@ -42,7 +42,7 @@ public class LibraryReference extends Parent implements ILibraryReference {
* @see org.eclipse.cdt.core.model.ICElement#getPath() * @see org.eclipse.cdt.core.model.ICElement#getPath()
*/ */
public IPath getPath() { public IPath getPath() {
return entry.getLibraryPath(); return entry.getPath();
} }
} }

View file

@ -21,7 +21,7 @@ public class LibraryReferenceArchive extends Archive implements ILibraryReferenc
ILibraryEntry entry; ILibraryEntry entry;
public LibraryReferenceArchive(ICElement parent, ILibraryEntry e, IBinaryArchive ar) { public LibraryReferenceArchive(ICElement parent, ILibraryEntry e, IBinaryArchive ar) {
super(parent, e.getLibraryPath(), ar); super(parent, e.getPath(), ar);
setElementType(ICElement.C_VCONTAINER); setElementType(ICElement.C_VCONTAINER);
entry = e; entry = e;
} }
@ -38,7 +38,7 @@ public class LibraryReferenceArchive extends Archive implements ILibraryReferenc
* @see org.eclipse.cdt.core.model.ICElement#getPath() * @see org.eclipse.cdt.core.model.ICElement#getPath()
*/ */
public IPath getPath() { public IPath getPath() {
return entry.getLibraryPath(); return entry.getPath();
} }
} }

View file

@ -21,7 +21,7 @@ public class LibraryReferenceShared extends Binary implements ILibraryReference
ILibraryEntry entry; ILibraryEntry entry;
public LibraryReferenceShared(ICElement parent, ILibraryEntry e, IBinaryFile bin) { public LibraryReferenceShared(ICElement parent, ILibraryEntry e, IBinaryFile bin) {
super(parent, e.getLibraryPath(), bin); super(parent, e.getPath(), bin);
setElementType(ICElement.C_VCONTAINER); setElementType(ICElement.C_VCONTAINER);
entry = e; entry = e;
} }
@ -44,7 +44,7 @@ public class LibraryReferenceShared extends Binary implements ILibraryReference
* @see org.eclipse.cdt.core.model.ICElement#getPath() * @see org.eclipse.cdt.core.model.ICElement#getPath()
*/ */
public IPath getPath() { public IPath getPath() {
return entry.getLibraryPath(); return entry.getPath();
} }
} }

View file

@ -17,27 +17,16 @@ import org.eclipse.core.runtime.IPath;
public class MacroEntry extends APathEntry implements IMacroEntry { public class MacroEntry extends APathEntry implements IMacroEntry {
IPath resourcePath;
String macroName; String macroName;
String macroValue; String macroValue;
public MacroEntry (IPath resourcePath, String macroName, String macroValue, public MacroEntry (IPath path, String macroName, String macroValue,
boolean isRecursive, IPath[] exclusionPatterns, boolean isExported) { boolean isRecursive, IPath[] exclusionPatterns, boolean isExported) {
super(IMacroEntry.CDT_MACRO, isRecursive, exclusionPatterns, isExported); super(IMacroEntry.CDT_MACRO, path, isRecursive, exclusionPatterns, isExported);
this.resourcePath = resourcePath;
this.macroName = macroName; this.macroName = macroName;
this.macroValue = macroValue; 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. * Returns the macro name.
* @return String * @return String

View file

@ -13,18 +13,27 @@
package org.eclipse.cdt.internal.core.model; package org.eclipse.cdt.internal.core.model;
import org.eclipse.cdt.core.model.IPathEntry; import org.eclipse.cdt.core.model.IPathEntry;
import org.eclipse.core.runtime.IPath;
public class PathEntry implements IPathEntry { public class PathEntry implements IPathEntry {
public int entryKind; public int entryKind;
public boolean isExported; 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.entryKind = entryKind;
this.isExported = isExported; this.isExported = isExported;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
*/
public IPath getPath() {
return path;
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.IPathEntry#getEntryKind() * @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
*/ */

View file

@ -369,7 +369,7 @@ public class PathEntryManager {
for (int i = 0, length = entries.length; i < length; i++) { for (int i = 0, length = entries.length; i < length; i++) {
if (entries[i].getEntryKind() == IPathEntry.CDT_PROJECT) { if (entries[i].getEntryKind() == IPathEntry.CDT_PROJECT) {
IProjectEntry entry = (IProjectEntry)entries[i]; IProjectEntry entry = (IProjectEntry)entries[i];
prerequisites.add(entry.getProjectPath().lastSegment()); prerequisites.add(entry.getPath().lastSegment());
} }
} }
int size = prerequisites.size(); int size = prerequisites.size();
@ -468,7 +468,7 @@ public class PathEntryManager {
int flag = 0; int flag = 0;
if (kind == IPathEntry.CDT_SOURCE) { if (kind == IPathEntry.CDT_SOURCE) {
ISourceEntry source = (ISourceEntry) entry; ISourceEntry source = (ISourceEntry) entry;
IPath path = source.getSourcePath(); IPath path = source.getPath();
celement = CoreModel.getDefault().create(path); celement = CoreModel.getDefault().create(path);
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_SOURCE : ICElementDelta.F_ADDED_PATHENTRY_SOURCE; flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_SOURCE : ICElementDelta.F_ADDED_PATHENTRY_SOURCE;
} else if (kind == IPathEntry.CDT_LIBRARY) { } 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; flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_PROJECT : ICElementDelta.F_ADDED_PATHENTRY_PROJECT;
} else if (kind == IPathEntry.CDT_INCLUDE) { } else if (kind == IPathEntry.CDT_INCLUDE) {
IIncludeEntry include = (IIncludeEntry) entry; IIncludeEntry include = (IIncludeEntry) entry;
IPath path = include.getResourcePath(); IPath path = include.getPath();
celement = CoreModel.getDefault().create(path); celement = CoreModel.getDefault().create(path);
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_INCLUDE : ICElementDelta.F_ADDED_PATHENTRY_INCLUDE; flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_INCLUDE : ICElementDelta.F_ADDED_PATHENTRY_INCLUDE;
} else if (kind == IPathEntry.CDT_MACRO) { } else if (kind == IPathEntry.CDT_MACRO) {
IMacroEntry macro = (IMacroEntry) entry; IMacroEntry macro = (IMacroEntry) entry;
IPath path = macro.getResourcePath(); IPath path = macro.getPath();
celement = CoreModel.getDefault().create(path); celement = CoreModel.getDefault().create(path);
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_MACRO : ICElementDelta.F_ADDED_PATHENTRY_MACRO; flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_MACRO : ICElementDelta.F_ADDED_PATHENTRY_MACRO;
} else if (kind == IPathEntry.CDT_CONTAINER) { } else if (kind == IPathEntry.CDT_CONTAINER) {
@ -673,7 +673,7 @@ public class PathEntryManager {
if (kind == IPathEntry.CDT_SOURCE) { if (kind == IPathEntry.CDT_SOURCE) {
ISourceEntry source = (ISourceEntry) entries[i]; ISourceEntry source = (ISourceEntry) entries[i];
IPath path = source.getSourcePath(); IPath path = source.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString()); element.setAttribute(ATTRIBUTE_PATH, path.toString());
IPath output = source.getOutputLocation(); IPath output = source.getOutputLocation();
if (output != null && output.isEmpty()) { if (output != null && output.isEmpty()) {
@ -681,7 +681,7 @@ public class PathEntryManager {
} }
} else if (kind == IPathEntry.CDT_LIBRARY) { } else if (kind == IPathEntry.CDT_LIBRARY) {
ILibraryEntry lib = (ILibraryEntry) entries[i]; ILibraryEntry lib = (ILibraryEntry) entries[i];
IPath path = lib.getLibraryPath(); IPath path = lib.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString()); element.setAttribute(ATTRIBUTE_PATH, path.toString());
if (lib.getSourceAttachmentPath() != null) { if (lib.getSourceAttachmentPath() != null) {
element.setAttribute(ATTRIBUTE_SOURCEPATH, lib.getSourceAttachmentPath().toString()); element.setAttribute(ATTRIBUTE_SOURCEPATH, lib.getSourceAttachmentPath().toString());
@ -694,11 +694,11 @@ public class PathEntryManager {
} }
} else if (kind == IPathEntry.CDT_PROJECT) { } else if (kind == IPathEntry.CDT_PROJECT) {
IProjectEntry pentry = (IProjectEntry) entries[i]; IProjectEntry pentry = (IProjectEntry) entries[i];
IPath path = pentry.getProjectPath(); IPath path = pentry.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString()); element.setAttribute(ATTRIBUTE_PATH, path.toString());
} else if (kind == IPathEntry.CDT_INCLUDE) { } else if (kind == IPathEntry.CDT_INCLUDE) {
IIncludeEntry include = (IIncludeEntry) entries[i]; IIncludeEntry include = (IIncludeEntry) entries[i];
IPath path = include.getResourcePath(); IPath path = include.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString()); element.setAttribute(ATTRIBUTE_PATH, path.toString());
IPath includePath = include.getIncludePath(); IPath includePath = include.getIncludePath();
element.setAttribute(ATTRIBUTE_INCLUDE, includePath.toString()); element.setAttribute(ATTRIBUTE_INCLUDE, includePath.toString());
@ -707,7 +707,7 @@ public class PathEntryManager {
} }
} else if (kind == IPathEntry.CDT_MACRO) { } else if (kind == IPathEntry.CDT_MACRO) {
IMacroEntry macro = (IMacroEntry) entries[i]; IMacroEntry macro = (IMacroEntry) entries[i];
IPath path = macro.getResourcePath(); IPath path = macro.getPath();
element.setAttribute(ATTRIBUTE_PATH, path.toString()); element.setAttribute(ATTRIBUTE_PATH, path.toString());
element.setAttribute(ATTRIBUTE_NAME, macro.getMacroName()); element.setAttribute(ATTRIBUTE_NAME, macro.getMacroName());
element.setAttribute(ATTRIBUTE_VALUE, macro.getMacroValue()); element.setAttribute(ATTRIBUTE_VALUE, macro.getMacroValue());

View file

@ -18,19 +18,8 @@ import org.eclipse.core.runtime.IPath;
public class ProjectEntry extends PathEntry implements IProjectEntry { public class ProjectEntry extends PathEntry implements IProjectEntry {
IPath projectPath; public ProjectEntry(IPath path, boolean isExported) {
super(IProjectEntry.CDT_PROJECT, path, isExported);
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 boolean equals(Object obj) { public boolean equals(Object obj) {
@ -39,12 +28,12 @@ public class ProjectEntry extends PathEntry implements IProjectEntry {
if (!super.equals(otherEntry)) { if (!super.equals(otherEntry)) {
return false; return false;
} }
if (projectPath == null) { if (path == null) {
if (otherEntry.getProjectPath() != null) { if (otherEntry.getPath() != null) {
return false; return false;
} }
} else { } else {
if (!projectPath.toString().equals(otherEntry.getProjectPath().toString())) { if (!path.toString().equals(otherEntry.getPath().toString())) {
return false; return false;
} }
} }

View file

@ -17,24 +17,13 @@ import org.eclipse.core.runtime.IPath;
public class SourceEntry extends APathEntry implements ISourceEntry { public class SourceEntry extends APathEntry implements ISourceEntry {
IPath sourcePath;
IPath outputLocation; IPath outputLocation;
public SourceEntry(IPath sourcePath, IPath outputLocation, boolean isRecursive, IPath[] exclusionPatterns) { public SourceEntry(IPath path, IPath outputLocation, boolean isRecursive, IPath[] exclusionPatterns) {
super(ISourceEntry.CDT_SOURCE, isRecursive, exclusionPatterns, false); super(ISourceEntry.CDT_SOURCE, path, isRecursive, exclusionPatterns, false);
this.sourcePath = sourcePath;
this.outputLocation = outputLocation; 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. * Binary output location for this source folder.
* @return IPath, <code>null</code> means to use the * @return IPath, <code>null</code> means to use the
@ -50,12 +39,12 @@ public class SourceEntry extends APathEntry implements ISourceEntry {
if (!super.equals(otherEntry)) { if (!super.equals(otherEntry)) {
return false; return false;
} }
if (sourcePath == null) { if (path == null) {
if (otherEntry.getSourcePath() != null) { if (otherEntry.getPath() != null) {
return false; return false;
} }
} else { } else {
if (!sourcePath.toString().equals(otherEntry.getSourcePath().toString())) { if (!path.toString().equals(otherEntry.getPath().toString())) {
return false; return false;
} }
} }