diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICContainer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICContainer.java
index bd6709351ef..3e9cce723fd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICContainer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICContainer.java
@@ -17,7 +17,6 @@ package org.eclipse.cdt.core.model;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICContainer extends ICElement, IParent, IOpenable {
-
/**
* Returns an array of non-C resources directly contained in this project.
* It does not transitively answer non-C resources contained in folders;
@@ -97,5 +96,4 @@ public interface ICContainer extends ICElement, IParent, IOpenable {
* @return the container with the given name
*/
ICContainer getCContainer(String name);
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java
index d9d56382733..365d9ffeaa0 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java
@@ -26,7 +26,6 @@ import org.eclipse.core.runtime.IPath;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICElement extends IAdaptable {
-
/**
* IResource from 10-20
*/
@@ -296,17 +295,18 @@ public interface ICElement extends IAdaptable {
/**
* Returns whether this C element exists in the model.
*
- * @return true
if this element exists in the C model
+ * @return {@code true} if this element exists in the C model
*/
boolean exists();
/**
* Returns the first ancestor of this C element that has the given type.
- * Returns null
if no such an ancestor can be found.
+ * Returns {@code null} if no such an ancestor can be found.
* This is a handle-only method.
*
* @param ancestorType the given type
- * @return the first ancestor of this C element that has the given type, null if no such an ancestor can be found
+ * @return the first ancestor of this C element that has the given type, {@code null} if no such
+ * an ancestor can be found
* @since 2.0
*/
ICElement getAncestor(int ancestorType);
@@ -322,9 +322,7 @@ public interface ICElement extends IAdaptable {
* Returns this element's kind encoded as an integer.
* This is a handle-only method.
*
- * @return the kind of element; one of the constants declared in
- * ICElement
- * @see ICElement
+ * @return the kind of element; one of the constants declared in {@link ICElement}
*/
int getElementType();
@@ -336,19 +334,19 @@ public interface ICElement extends IAdaptable {
ICModel getCModel();
/**
- * Returns the C project this element is contained in,
- * or null
if this element is not contained in any C project
+ * Returns the C project this element is contained in, or {@code null} if this element
+ * is not contained in any C project
*
- * @return the containing C project, or null
if this element is
- * not contained in a C project
+ * @return the containing C project, or {@code null} if this element is
+ * not contained in a C project
*/
ICProject getCProject();
/**
* Returns the element directly containing this element,
- * or null
if this element has no parent.
+ * or {@code null} if this element has no parent.
*
- * @return the parent element, or null
if this element has no parent
+ * @return the parent element, or {@code null} if this element has no parent
*/
ICElement getParent();
@@ -360,7 +358,6 @@ public interface ICElement extends IAdaptable {
* If this element is included in an external archive,
* the path returned is the absolute path to the archive in the file system.
* This is a handle-only method.
- *
*/
IPath getPath();
@@ -374,19 +371,19 @@ public interface ICElement extends IAdaptable {
/**
* Returns the underlying resource that contains
- * this element, or null
if this element is not contained
+ * this element, or {@code null} if this element is not contained
* in a resource.
*
- * @return the underlying resource, or null
if none
+ * @return the underlying resource, or {@code null} if none
*/
IResource getUnderlyingResource();
/**
* Returns the Corresponding resource for
- * this element, or null
if this element does not have
+ * this element, or {@code null} if this element does not have
* a corresponding resource.
*
- * @return the corresponding resource, or null
if none
+ * @return the corresponding resource, or {@code null} if none
*/
IResource getResource();
@@ -394,21 +391,20 @@ public interface ICElement extends IAdaptable {
* Returns whether this C element is read-only. An element is read-only
* if its structure cannot be modified by the C model.
*
- * @return true
if this element is read-only
+ * @return {@code true} if this element is read-only
*/
boolean isReadOnly();
/**
* Returns whether the structure of this element is known. For example, for a
- * translation unit that could not be parsed, false
is returned.
+ * translation unit that could not be parsed, {@code false} is returned.
* If the structure of an element is unknown, navigations will return reasonable
- * defaults. For example, getChildren
will return an empty collection.
+ * defaults. For example, {@code getChildren} will return an empty collection.
*
* Note: This does not imply anything about consistency with the * underlying resource/buffer contents. - *
* - * @returntrue
if the structure of this element is known
+ * @return {@code true} if the structure of this element is known
* @exception CModelException if this element does not exist or if an
* exception occurs while accessing its corresponding resource
*/
@@ -422,7 +418,6 @@ public interface ICElement extends IAdaptable {
*/
void accept(ICElementVisitor visitor) throws CoreException;
-
/**
* Returns a string representation of this element handle. The format of the
* string is not specified; however, the identifier is stable across
@@ -430,15 +425,13 @@ public interface ICElement extends IAdaptable {
* CoreModel.create(String)
method.
*
* Some element types, like binaries, do not support handle identifiers and
- * return null
.
+ * return {@code null}.
*
null
if the
- * element type is not supported
+ * @return the string handle identifier, or {@code null} if the element type is not supported
* @see CoreModel#create(java.lang.String)
*
* @since 5.0
*/
String getHandleIdentifier();
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplate.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplate.java
index 8ad362ca102..23e6842f219 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplate.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplate.java
@@ -1,14 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 QnX Software Systems and others.
+ * Copyright (c) 2005, 2009 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Qnx Software Systems - initial API and implementation
+ * QNX Software Systems - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.core.model;
/**
@@ -18,5 +17,4 @@ package org.eclipse.cdt.core.model;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IMethodTemplate extends IMethodTemplateDeclaration, IMethod {
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplateDeclaration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplateDeclaration.java
index 3067e1c7f85..dbf91a405b6 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplateDeclaration.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMethodTemplateDeclaration.java
@@ -1,14 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 QnX Software Systems and others.
+ * Copyright (c) 2005, 2009 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Qnx Software Systems - initial API and implementation
+ * QNX Software Systems - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.core.model;
/**
@@ -18,5 +17,4 @@ package org.eclipse.cdt.core.model;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IMethodTemplateDeclaration extends ITemplate, IMethodDeclaration {
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java
index 876b90aec56..5dd8104108b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java
@@ -12,12 +12,10 @@ package org.eclipse.cdt.core.model;
import java.util.List;
-
/**
* Common protocol for C elements that contain other C elements.
*/
public interface IParent {
-
/**
* Returns the immediate children of this element.
* The children are in no particular order.
@@ -34,8 +32,7 @@ public interface IParent {
/**
* Returns whether this element has one or more immediate children.
* This is a convenience method, and may be more efficient than
- * testing whether getChildren
is an empty array.
+ * testing whether {@link #getChildren()} returns an empty array.
*/
boolean hasChildren();
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java
index f721ca3a58e..0883463c1b7 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java
@@ -21,17 +21,15 @@ package org.eclipse.cdt.core.model;
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
-
public interface ISourceReference {
-
/**
* Returns the source code associated with this element.
* - * For binary files, this returns the source of the entire translation unit + * For binary files, this returns the source of the entire translation unit * associated with the binary file (if there is one). *
* - * @return the source code, ornull
if this element has no
+ * @return the source code, or null
if this element has no
* associated source code
* @exception CModelException if this element does not exist or if an
* exception occurs while accessing its corresponding resource
@@ -41,11 +39,11 @@ public interface ISourceReference {
/**
* Returns the source range associated with this element.
* - * For binary files, this returns the range of the entire translation unit + * For binary files, this returns the range of the entire translation unit * associated with the binary file (if there is one). *
* - * @return the source range, ornull
if if this element has no
+ * @return the source range, or null
if if this element has no
* associated source code
* @exception CModelException if this element does not exist or if an
* exception occurs while accessing its corresponding resource
@@ -57,7 +55,7 @@ public interface ISourceReference {
* if this member is not declared in a translation unit (for example, a binary type).
*/
ITranslationUnit getTranslationUnit();
-
+
/**
* Returns whether this element is in active code. Code is inactive when it is hidden
* by conditional compilation.
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java
index 6f83bf1a5a3..2313be46bfd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java
@@ -12,12 +12,6 @@
*******************************************************************************/
package org.eclipse.cdt.internal.core.model;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICElementVisitor;
@@ -39,6 +33,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.PlatformObject;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+
public abstract class CElement extends PlatformObject implements ICElement {
public static final char CEM_ESCAPE = '\\';
public static final char CEM_CPROJECT = '=';
@@ -61,9 +61,6 @@ public abstract class CElement extends PlatformObject implements ICElement {
fType= type;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
- */
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Object getAdapter(Class adapter) {
@@ -248,7 +245,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
}
@Override
- public abstract IResource getResource() ;
+ public abstract IResource getResource();
protected abstract CElementInfo createElementInfo();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
index e5ccd2517b8..55a3ef1d2f1 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
@@ -117,9 +117,6 @@ public class CModelBuilder2 implements IContributedModelBuilder {
fProgressMonitor= monitor;
}
- /*
- * @see org.eclipse.cdt.core.model.IContributedModelBuilder#parse(boolean)
- */
@Override
public void parse(boolean quickParseMode) throws Exception {
final IIndexManager indexManager= CCorePlugin.getIndexManager();
@@ -865,7 +862,6 @@ public class CModelBuilder2 implements IContributedModelBuilder {
final FunctionInfo info;
if (declarator instanceof ICPPASTFunctionDeclarator) {
-
final ICPPASTFunctionDeclarator cppFunctionDeclarator= (ICPPASTFunctionDeclarator) declarator;
final IASTName simpleAstName;
if (name instanceof ICPPASTQualifiedName) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Method.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Method.java
index aa051b7a96c..e0267dcfd64 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Method.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Method.java
@@ -6,17 +6,16 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Rational Software - Initial API and implementation
+ * Rational Software - Initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.model;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMethod;
public class Method extends MethodDeclaration implements IMethod {
-
- public Method(ICElement parent, String name){
+
+ public Method(ICElement parent, String name) {
this(parent, name, ICElement.C_METHOD);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java
index 30bea0771a7..74481baade4 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java
@@ -6,17 +6,15 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Rational Software - Initial API and implementation
+ * Rational Software - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.model;
-
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMethodTemplate;
public class MethodTemplate extends Method implements IMethodTemplate {
-
protected Template fTemplate;
public MethodTemplate(ICElement parent, String name) {
@@ -55,34 +53,29 @@ public class MethodTemplate extends Method implements IMethodTemplate {
return fTemplate.getNumberOfTemplateParameters();
}
- /**
- * @see org.eclipse.cdt.core.model.ITemplate#getTemplateSignature()
- */
/*
* The signature in the outline view will be:
* The class X followed by its template parameters,
* then the scope resolution, then the function name,
- * followed by its template parameters, folowed by its
+ * followed by its template parameters, followed by its
* normal parameter list, then a colon then the function's
* return type.
*/
-
@Override
public String getTemplateSignature() throws CModelException {
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
sig.append(this.getParameterClause());
- if(isConst())
+ if (isConst())
sig.append(" const"); //$NON-NLS-1$
- if(isVolatile())
+ if (isVolatile())
sig.append(" volatile"); //$NON-NLS-1$
- if((this.getReturnType() != null) && (this.getReturnType().length() > 0)){
+ if ((this.getReturnType() != null) && (this.getReturnType().length() > 0)){
sig.append(" : "); //$NON-NLS-1$
sig.append(this.getReturnType());
}
return sig.toString();
}
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandle.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandle.java
index 5ac310c1370..b6e15a553cc 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandle.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandle.java
@@ -6,15 +6,11 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
- * Anton Leherbauer (Wind River Systems)
+ * Markus Schorn - initial API and implementation
+ * Anton Leherbauer (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.core.model.ext;
-import java.net.URI;
-import java.util.Collections;
-import java.util.List;
-
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IPositionConverter;
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
@@ -39,9 +35,13 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
+import java.net.URI;
+import java.util.Collections;
+import java.util.List;
+
abstract class CElementHandle implements ICElementHandle, ISourceReference {
- protected static final String[] EMPTY_STRING_ARRAY = new String[0];
- private static final ICElement[] NO_CHILDREN = new ICElement[0];
+ protected static final String[] EMPTY_STRING_ARRAY = {};
+ private static final ICElement[] NO_CHILDREN = {};
private ICElement fParent;
private String fName;
@@ -54,15 +54,14 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
public CElementHandle(ICElement parent, int type, String name) {
fParent= parent;
fType= type;
- // anonymous types are assigned a name in the index, we
- // undo this here
- if (name.length() > 0 && name.charAt(0)=='{') {
+ // Anonymous types are assigned a name in the index, we undo this here.
+ if (name.length() > 0 && name.charAt(0) == '{') {
fName= ""; //$NON-NLS-1$
fIndex= name.hashCode();
} else {
fName= name;
}
- fRegion= new Region(0,0);
+ fRegion= new Region(0, 0);
}
@Override
@@ -78,7 +77,6 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
return CElement.hashCode(this);
}
-
@Override
@SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodDeclarationHandle.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodDeclarationHandle.java
index 83c35245dc5..29f126a6bb0 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodDeclarationHandle.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodDeclarationHandle.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.model.ext;
@@ -41,7 +41,6 @@ public class MethodDeclarationHandle extends CElementHandle implements IMethodDe
fIsConstructor= method instanceof ICPPConstructor;
if (!fIsConstructor)
fIsDestructor= method.isDestructor();
-
}
@Override
@@ -91,5 +90,4 @@ public class MethodDeclarationHandle extends CElementHandle implements IMethodDe
public boolean isDestructor() throws CModelException {
return fIsDestructor;
}
-
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodHandle.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodHandle.java
index 53398832492..a64a2ba8f34 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodHandle.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/MethodHandle.java
@@ -6,9 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
- *******************************************************************************/
-
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
package org.eclipse.cdt.internal.core.model.ext;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
@@ -16,7 +15,7 @@ import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMethod;
public class MethodHandle extends MethodDeclarationHandle implements IMethod {
-
+
public MethodHandle(ICElement parent, ICPPMethod method) {
super(parent, ICElement.C_METHOD, method);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/SourceRange.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/SourceRange.java
index 3a2759b387a..731a59b0d58 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/SourceRange.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/SourceRange.java
@@ -6,15 +6,13 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.model.ext;
import org.eclipse.cdt.core.model.ISourceRange;
public class SourceRange implements ISourceRange {
-
private int fOffset;
private int fLength;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CElementSet.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CElementSet.java
index d058116b99b..e7e53af8e61 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CElementSet.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CElementSet.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.ui.callhierarchy;
@@ -56,8 +56,7 @@ public class CElementSet {
if (other.fSet != null) {
return false;
}
- }
- else {
+ } else {
if (fSet.size() != other.fSet.size()) {
return false;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryAction.java
index 1d6c9524dd8..5600b59b51a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryAction.java
@@ -19,20 +19,19 @@ import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider;
import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
-
/**
* Action used for the include browser forward / backward buttons
*/
public class CHHistoryAction extends Action {
final static long LABEL_OPTIONS=
- CElementLabels.M_PARAMETER_TYPES |
- CElementLabels.ALL_FULLY_QUALIFIED |
- CElementLabels.TEMPLATE_ARGUMENTS |
- CElementLabels.MF_POST_FILE_QUALIFIED;
-
+ CElementLabels.M_PARAMETER_TYPES |
+ CElementLabels.ALL_FULLY_QUALIFIED |
+ CElementLabels.TEMPLATE_ARGUMENTS |
+ CElementLabels.MF_POST_FILE_QUALIFIED;
+
private CHViewPart fViewPart;
private ICElement fElement;
-
+
public CHHistoryAction(CHViewPart viewPart, ICElement element) {
super("", AS_RADIO_BUTTON); //$NON-NLS-1$
fViewPart= viewPart;
@@ -42,20 +41,16 @@ public class CHHistoryAction extends Action {
setText(elementName);
setImageDescriptor(getImageDescriptor(element));
}
-
+
private ImageDescriptor getImageDescriptor(ICElement elem) {
CElementImageProvider imageProvider= new CElementImageProvider();
ImageDescriptor desc= imageProvider.getBaseImageDescriptor(elem, 0);
imageProvider.dispose();
return desc;
}
-
- /*
- * @see Action#run()
- */
+
@Override
public void run() {
fViewPart.setInput(fElement);
- }
-
+ }
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryListAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryListAction.java
index c0984126e93..72a86863a80 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryListAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryListAction.java
@@ -17,8 +17,8 @@ import java.util.List;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
@@ -84,9 +84,6 @@ public class CHHistoryListAction extends Action {
fHistoryList.selectElements(sel);
}
- /*
- * @see Dialog#createDialogArea(Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
initializeDialogUnits(parent);
@@ -142,24 +139,17 @@ public class CHHistoryListAction extends Action {
return elems.toArray(new ICElement[elems.size()]);
}
- /*
- * @see org.eclipse.jface.window.Window#configureShell(Shell)
- */
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
// PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, ...);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#create()
- */
@Override
public void create() {
setShellStyle(getShellStyle() | SWT.RESIZE);
super.create();
}
-
}
private CHViewPart fView;
@@ -169,9 +159,6 @@ public class CHHistoryListAction extends Action {
setText(CHMessages.CHHistoryListAction_OpenHistory_label);
}
- /*
- * @see IAction#run()
- */
@Override
public void run() {
ICElement[] historyEntries= CallHierarchyUI.getHistoryEntries();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java
index 663231f1bf9..4d18bea73df 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
- * Patrick Hofer [bug 325799]
+ * Markus Schorn - initial API and implementation
+ * Patrick Hofer [bug 325799]
*******************************************************************************/
package org.eclipse.cdt.internal.ui.callhierarchy;
@@ -24,12 +24,12 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Display;
import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
import org.eclipse.cdt.ui.CElementImageDescriptor;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider;
+import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
import org.eclipse.cdt.internal.ui.viewsupport.CUILabelProvider;
import org.eclipse.cdt.internal.ui.viewsupport.ImageImageDescriptor;
@@ -56,8 +56,7 @@ public class CHLabelProvider extends AppearanceAwareLabelProvider {
if (node.isInitializer()) {
ImageDescriptor desc= CElementImageProvider.getFunctionImageDescriptor();
image= CUIPlugin.getImageDescriptorRegistry().get(desc);
- }
- else {
+ } else {
ICElement decl= node.getOneRepresentedDeclaration();
if (decl != null) {
image= fCLabelProvider.getImage(decl);
@@ -82,8 +81,7 @@ public class CHLabelProvider extends AppearanceAwareLabelProvider {
fCLabelProvider.setTextFlags(LABEL_OPTIONS_SIMPLE);
label= fCLabelProvider.getText(decl);
fCLabelProvider.setTextFlags(options);
- }
- else {
+ } else {
label= fCLabelProvider.getText(decl);
if (node.isInitializer()) {
label= addInitializerDecoration(label);
@@ -111,8 +109,7 @@ public class CHLabelProvider extends AppearanceAwareLabelProvider {
fCLabelProvider.setTextFlags(LABEL_OPTIONS_SIMPLE);
label= fCLabelProvider.getStyledText(decl);
fCLabelProvider.setTextFlags(options);
- }
- else {
+ } else {
label= fCLabelProvider.getStyledText(decl);
if (node.isInitializer()) {
label= addInitializerDecoration(label);
@@ -125,7 +122,6 @@ public class CHLabelProvider extends AppearanceAwareLabelProvider {
label.setStyle(offset, label.length() - offset, StyledString.COUNTER_STYLER);
}
- //return label;
String decorated= decorateText(label.getString(), element);
if (decorated != null) {
return StyledCellLabelProvider.styleDecoratedString(decorated, StyledString.DECORATIONS_STYLER, label);
@@ -174,7 +170,6 @@ public class CHLabelProvider extends AppearanceAwareLabelProvider {
return label2;
}
-
@Override
public void dispose() {
fCLabelProvider.dispose();
@@ -189,16 +184,13 @@ public class CHLabelProvider extends AppearanceAwareLabelProvider {
int flags= 0;
if (node.isRecursive()) {
flags |= CElementImageDescriptor.RECURSIVE_RELATION;
- }
- else if (fContentProvider.hasChildren(node)) {
+ } else if (fContentProvider.hasChildren(node)) {
if (fContentProvider.getComputeReferencedBy()) {
flags |= CElementImageDescriptor.REFERENCED_BY;
- }
- else {
+ } else {
if (node.isMultiDef()) {
flags |= CElementImageDescriptor.RELATES_TO_MULTIPLE;
- }
- else {
+ } else {
flags |= CElementImageDescriptor.RELATES_TO;
}
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMessages.java
index 620ceba59e8..adca3752d8b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMessages.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMessages.java
@@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
- * Sergey Prigogin (Google)
+ * Markus Schorn - initial API and implementation
+ * Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.internal.ui.callhierarchy;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefChildNode.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefChildNode.java
index 1df96be7972..975c938a028 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefChildNode.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefChildNode.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.ui.callhierarchy;
@@ -18,7 +18,8 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
*/
public class CHMultiDefChildNode extends CHNode {
- public CHMultiDefChildNode(CHMultiDefNode parent, ITranslationUnit fileOfReferences, long timestamp, ICElement decl, int linkageID) {
+ public CHMultiDefChildNode(CHMultiDefNode parent, ITranslationUnit fileOfReferences,
+ long timestamp, ICElement decl, int linkageID) {
super(parent, fileOfReferences, timestamp, decl, linkageID);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefNode.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefNode.java
index 868e5a8d219..5358756520b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefNode.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHMultiDefNode.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.ui.callhierarchy;
@@ -16,15 +16,15 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.ui.util.CoreUtility;
public class CHMultiDefNode extends CHNode {
-
private CHNode[] fChildren;
- public CHMultiDefNode(CHNode parent, ITranslationUnit tu, long timestamp, ICElement[] elements, int linkageID) {
+ public CHMultiDefNode(CHNode parent, ITranslationUnit tu, long timestamp, ICElement[] elements,
+ int linkageID) {
super(parent, tu, timestamp, null, linkageID);
if (elements.length == 0) {
throw new IllegalArgumentException();
}
- fHashCode+= elements[0].hashCode();
+ fHashCode += elements[0].hashCode();
fChildren= new CHNode[elements.length];
for (int i = 0; i < elements.length; i++) {
ICElement element = elements[i];
@@ -65,5 +65,4 @@ public class CHMultiDefNode extends CHNode {
final CHMultiDefNode rhs = (CHMultiDefNode) o;
return CoreUtility.safeEquals(getOneRepresentedDeclaration(), rhs.getOneRepresentedDeclaration());
}
-
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHNode.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHNode.java
index 465713bbdfc..4be662972ec 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHNode.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHNode.java
@@ -7,7 +7,7 @@
*
* Contributors:
* Markus Schorn - initial API and implementation
- *******************************************************************************/
+ *******************************************************************************/
package org.eclipse.cdt.internal.ui.callhierarchy;
import java.util.ArrayList;
@@ -27,12 +27,12 @@ import org.eclipse.cdt.internal.ui.util.CoreUtility;
/**
* Represents a node in the include browser
*/
-public class CHNode implements IAdaptable {
+public class CHNode implements IAdaptable {
private CHNode fParent;
private ICElement fRepresentedDecl;
private ITranslationUnit fFileOfReferences;
private List