mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Cosmetics.
This commit is contained in:
parent
435b10dfdf
commit
05a61b35bf
4 changed files with 19 additions and 35 deletions
|
@ -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 String getFullFileName();
|
||||
public boolean isStandard();
|
||||
|
||||
/**
|
||||
* The inverse of {@link #isStandard()}
|
||||
*/
|
||||
public boolean isLocal();
|
||||
|
||||
public String getFullFileName();
|
||||
|
||||
/**
|
||||
* @return whether this include directive was resolved and followed.
|
||||
*/
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -6,15 +6,17 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Andrew Ferguson (Symbian) - initial API and implementation
|
||||
* Andrew Ferguson (Symbian) - initial API and implementation
|
||||
*******************************************************************************/
|
||||
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.
|
||||
|
@ -26,7 +28,7 @@ public interface IIndexFileLocation {
|
|||
* @return the URI of the indexed file (non-null)
|
||||
*/
|
||||
public URI getURI();
|
||||
|
||||
|
||||
/**
|
||||
* Return the workspace relative path of the indexed file or null if the file
|
||||
* is not in the workspace
|
||||
|
|
|
@ -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,24 +34,18 @@ 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) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof IncludesGrouping) {
|
||||
return tu.equals(((IncludesGrouping)obj).tu) ;
|
||||
return tu.equals(((IncludesGrouping) obj).tu) ;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue