1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-09-03 12:40:08 -07:00
parent 435b10dfdf
commit 05a61b35bf
4 changed files with 19 additions and 35 deletions

View file

@ -20,23 +20,26 @@ package org.eclipse.cdt.core.model;
public interface IInclude extends ICElement, ISourceReference, ISourceManipulation {
/**
* Returns the name that of the included file.
* For example, for the statement <code>"#include <stdio.h></code>,
* this returns <code>"stdio.h"</code>.
* For example, for the statement {@code #include <stdio.h>},
* this returns {@code "stdio.h"}.
*/
String getIncludeName();
public String getIncludeName();
/**
* Returns whether the included was search on "standard places" like /usr/include first .
* An include is standard if it starts with <code>"\<"</code>.
* For example, <code>"#include \<stdio.h\>"</code> returns true and
* <code>"#include "foobar.h"</code> returns false.
* An include is standard if it starts with {@code '<'}.
* For example, {@code #include <stdio.h>} returns {@code true} and
* {@code #include "foobar.h"} returns {@code false}.
*/
boolean isStandard();
public boolean isStandard();
/**
* The inverse of {@link #isStandard()}
*/
public boolean isLocal();
public String getFullFileName();
public boolean isLocal();
/**
* @return whether this include directive was resolved and followed.
*/

View file

@ -16,7 +16,6 @@ import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IInclude;
public class Include extends SourceManipulation implements IInclude {
private String fullPath;
private final boolean standard;
private boolean fIsResolved= true;
@ -44,9 +43,6 @@ public class Include extends SourceManipulation implements IInclude {
return fullPath;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.model.IInclude#isLocal()
*/
@Override
public boolean isLocal() {
return !isStandard();
@ -64,17 +60,11 @@ public class Include extends SourceManipulation implements IInclude {
fIsResolved= resolved;
}
/*
* @see org.eclipse.cdt.core.model.IInclude#isResolved()
*/
@Override
public boolean isResolved() {
return fIsResolved;
}
/*
* @see org.eclipse.cdt.internal.core.model.CElement#equals(java.lang.Object)
*/
@Override
public boolean equals(Object other) {
if (other instanceof IInclude && equals(this, (IInclude) other)) {

View file

@ -13,8 +13,10 @@ package org.eclipse.cdt.core.index;
import java.net.URI;
/**
* Files in the index are (conceptually) partitioned into workspace and non-workspace (external) files.
* Clients can obtain instances of IIndexFileLocation implementations from {@link IndexLocationFactory}
* Files in the index are (conceptually) partitioned into workspace and non-workspace (external)
* files. Clients can obtain instances of IIndexFileLocation implementations from
* {@link IndexLocationFactory}. Two index file locations are considered equal if their URIs are
* equal.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.

View file

@ -8,14 +8,12 @@
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ITranslationUnit;
/**
* IncludesGrouping
*/
@ -27,9 +25,6 @@ public class IncludesGrouping extends CElementGrouping {
tu = unit;
}
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
*/
@Override
public Object[] getChildren(Object object) {
try {
@ -39,17 +34,11 @@ public class IncludesGrouping extends CElementGrouping {
return super.getChildren(object);
}
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
*/
@Override
public Object getParent(Object object) {
return tu;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {