mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-03 05:33:33 +02:00
Cosmetics.
This commit is contained in:
parent
3374ec550e
commit
b84541a5e7
1 changed files with 53 additions and 56 deletions
|
@ -8,7 +8,6 @@
|
|||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.core.model;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -50,7 +49,6 @@ import org.eclipse.core.runtime.IPath;
|
|||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
public class PathEntryUtil {
|
||||
|
||||
static PathEntryManager manager = PathEntryManager.getDefault();
|
||||
static final IMarker[] NO_MARKERS = new IMarker[0];
|
||||
|
||||
|
@ -73,9 +71,9 @@ public class PathEntryUtil {
|
|||
ICProject refCProject = CoreModel.getDefault().create(project);
|
||||
if (refCProject != null) {
|
||||
IPathEntry[] entries = manager.getResolvedPathEntries(refCProject);
|
||||
for (IPathEntry entrie : entries) {
|
||||
if (entrie.getEntryKind() == IPathEntry.CDT_INCLUDE) {
|
||||
IIncludeEntry refEntry = (IIncludeEntry)entrie;
|
||||
for (IPathEntry pathEntry : entries) {
|
||||
if (pathEntry.getEntryKind() == IPathEntry.CDT_INCLUDE) {
|
||||
IIncludeEntry refEntry = (IIncludeEntry) pathEntry;
|
||||
if (refEntry.getIncludePath().equals(includePath)) {
|
||||
IPath newBasePath = refEntry.getBasePath();
|
||||
// If the includePath is
|
||||
|
@ -109,9 +107,9 @@ public class PathEntryUtil {
|
|||
IPathEntryContainer container = manager.getPathEntryContainer(refPath, cproject);
|
||||
if (container != null) {
|
||||
IPathEntry[] entries = container.getPathEntries();
|
||||
for (IPathEntry entrie : entries) {
|
||||
if (entrie.getEntryKind() == IPathEntry.CDT_INCLUDE) {
|
||||
IIncludeEntry refEntry = (IIncludeEntry)entrie;
|
||||
for (IPathEntry pathEntry : entries) {
|
||||
if (pathEntry.getEntryKind() == IPathEntry.CDT_INCLUDE) {
|
||||
IIncludeEntry refEntry = (IIncludeEntry) pathEntry;
|
||||
if (refEntry.getIncludePath().equals(includePath)) {
|
||||
IPath newBasePath = refEntry.getBasePath();
|
||||
return CoreModel.newIncludeEntry(includeEntry.getPath(), newBasePath, includePath);
|
||||
|
@ -137,9 +135,9 @@ public class PathEntryUtil {
|
|||
ICProject refCProject = CoreModel.getDefault().create(project);
|
||||
if (refCProject != null) {
|
||||
IPathEntry[] entries = manager.getResolvedPathEntries(refCProject);
|
||||
for (IPathEntry entrie : entries) {
|
||||
if (entrie.getEntryKind() == IPathEntry.CDT_MACRO) {
|
||||
IMacroEntry refEntry = (IMacroEntry)entrie;
|
||||
for (IPathEntry pathEntry : entries) {
|
||||
if (pathEntry.getEntryKind() == IPathEntry.CDT_MACRO) {
|
||||
IMacroEntry refEntry = (IMacroEntry) pathEntry;
|
||||
if (refEntry.getMacroName().equals(name)) {
|
||||
String value = refEntry.getMacroValue();
|
||||
return CoreModel.newMacroEntry(macroEntry.getPath(), name, value);
|
||||
|
@ -153,9 +151,9 @@ public class PathEntryUtil {
|
|||
IPathEntryContainer container = manager.getPathEntryContainer(refPath, cproject);
|
||||
if (container != null) {
|
||||
IPathEntry[] entries = container.getPathEntries();
|
||||
for (IPathEntry entrie : entries) {
|
||||
if (entrie.getEntryKind() == IPathEntry.CDT_MACRO) {
|
||||
IMacroEntry refEntry = (IMacroEntry)entrie;
|
||||
for (IPathEntry pathEntry : entries) {
|
||||
if (pathEntry.getEntryKind() == IPathEntry.CDT_MACRO) {
|
||||
IMacroEntry refEntry = (IMacroEntry) pathEntry;
|
||||
if (refEntry.getMacroName().equals(name)) {
|
||||
String value = refEntry.getMacroValue();
|
||||
return CoreModel.newMacroEntry(macroEntry.getPath(), name, value);
|
||||
|
@ -181,9 +179,9 @@ public class PathEntryUtil {
|
|||
ICProject refCProject = CoreModel.getDefault().create(project);
|
||||
if (refCProject != null) {
|
||||
IPathEntry[] entries = manager.getResolvedPathEntries(refCProject);
|
||||
for (IPathEntry entrie : entries) {
|
||||
if (entrie.getEntryKind() == IPathEntry.CDT_LIBRARY) {
|
||||
ILibraryEntry refEntry = (ILibraryEntry)entrie;
|
||||
for (IPathEntry pathEntry : entries) {
|
||||
if (pathEntry.getEntryKind() == IPathEntry.CDT_LIBRARY) {
|
||||
ILibraryEntry refEntry = (ILibraryEntry) pathEntry;
|
||||
if (refEntry.getLibraryPath().equals(libraryPath)) {
|
||||
IPath newBasePath = refEntry.getBasePath();
|
||||
// If the libraryPath is
|
||||
|
@ -221,9 +219,9 @@ public class PathEntryUtil {
|
|||
IPathEntryContainer container = manager.getPathEntryContainer(refPath, cproject);
|
||||
if (container != null) {
|
||||
IPathEntry[] entries = container.getPathEntries();
|
||||
for (IPathEntry entrie : entries) {
|
||||
if (entrie.getEntryKind() == IPathEntry.CDT_LIBRARY) {
|
||||
ILibraryEntry refEntry = (ILibraryEntry)entrie;
|
||||
for (IPathEntry pathEntry : entries) {
|
||||
if (pathEntry.getEntryKind() == IPathEntry.CDT_LIBRARY) {
|
||||
ILibraryEntry refEntry = (ILibraryEntry) pathEntry;
|
||||
if (refEntry.getPath().equals(libraryPath)) {
|
||||
return CoreModel.newLibraryEntry(entry.getPath(), refEntry.getBasePath(),
|
||||
refEntry.getLibraryPath(), refEntry.getSourceAttachmentPath(),
|
||||
|
@ -648,5 +646,4 @@ public class PathEntryUtil {
|
|||
|
||||
return severity;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue