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 { public interface IInclude extends ICElement, ISourceReference, ISourceManipulation {
/** /**
* Returns the name that of the included file. * Returns the name that of the included file.
* For example, for the statement <code>"#include <stdio.h></code>, * For example, for the statement {@code #include <stdio.h>},
* this returns <code>"stdio.h"</code>. * this returns {@code "stdio.h"}.
*/ */
String getIncludeName(); public String getIncludeName();
/** /**
* Returns whether the included was search on "standard places" like /usr/include first . * Returns whether the included was search on "standard places" like /usr/include first .
* An include is standard if it starts with <code>"\<"</code>. * An include is standard if it starts with {@code '<'}.
* For example, <code>"#include \<stdio.h\>"</code> returns true and * For example, {@code #include <stdio.h>} returns {@code true} and
* <code>"#include "foobar.h"</code> returns false. * {@code #include "foobar.h"} returns {@code false}.
*/ */
boolean isStandard(); public boolean isStandard();
public String getFullFileName();
/**
* The inverse of {@link #isStandard()}
*/
public boolean isLocal(); public boolean isLocal();
public String getFullFileName();
/** /**
* @return whether this include directive was resolved and followed. * @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; import org.eclipse.cdt.core.model.IInclude;
public class Include extends SourceManipulation implements IInclude { public class Include extends SourceManipulation implements IInclude {
private String fullPath; private String fullPath;
private final boolean standard; private final boolean standard;
private boolean fIsResolved= true; private boolean fIsResolved= true;
@ -44,9 +43,6 @@ public class Include extends SourceManipulation implements IInclude {
return fullPath; return fullPath;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.model.IInclude#isLocal()
*/
@Override @Override
public boolean isLocal() { public boolean isLocal() {
return !isStandard(); return !isStandard();
@ -64,17 +60,11 @@ public class Include extends SourceManipulation implements IInclude {
fIsResolved= resolved; fIsResolved= resolved;
} }
/*
* @see org.eclipse.cdt.core.model.IInclude#isResolved()
*/
@Override @Override
public boolean isResolved() { public boolean isResolved() {
return fIsResolved; return fIsResolved;
} }
/*
* @see org.eclipse.cdt.internal.core.model.CElement#equals(java.lang.Object)
*/
@Override @Override
public boolean equals(Object other) { public boolean equals(Object other) {
if (other instanceof IInclude && equals(this, (IInclude) other)) { if (other instanceof IInclude && equals(this, (IInclude) other)) {

View file

@ -6,15 +6,17 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Andrew Ferguson (Symbian) - initial API and implementation * Andrew Ferguson (Symbian) - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.index; package org.eclipse.cdt.core.index;
import java.net.URI; import java.net.URI;
/** /**
* Files in the index are (conceptually) partitioned into workspace and non-workspace (external) files. * Files in the index are (conceptually) partitioned into workspace and non-workspace (external)
* Clients can obtain instances of IIndexFileLocation implementations from {@link IndexLocationFactory} * 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. * @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented 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) * @return the URI of the indexed file (non-null)
*/ */
public URI getURI(); public URI getURI();
/** /**
* Return the workspace relative path of the indexed file or null if the file * Return the workspace relative path of the indexed file or null if the file
* is not in the workspace * is not in the workspace

View file

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