mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Fix warnings.
This commit is contained in:
parent
677d68715d
commit
b87cd95a0f
1 changed files with 18 additions and 23 deletions
|
@ -362,12 +362,11 @@ public class CElementBaseLabels {
|
||||||
|
|
||||||
String[] types = method.getParameterTypes();
|
String[] types = method.getParameterTypes();
|
||||||
|
|
||||||
for (int i= 0; i < types.length; i++) {
|
if (types != null) {
|
||||||
if (i > 0) {
|
for (int i= 0; i < types.length; i++) {
|
||||||
buf.append( COMMA_STRING );
|
if (i > 0) {
|
||||||
}
|
buf.append( COMMA_STRING );
|
||||||
|
}
|
||||||
if (types != null) {
|
|
||||||
buf.append( types[i] );
|
buf.append( types[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -597,12 +596,11 @@ public class CElementBaseLabels {
|
||||||
|
|
||||||
String[] types = func.getParameterTypes();
|
String[] types = func.getParameterTypes();
|
||||||
|
|
||||||
for (int i= 0; i < types.length; i++) {
|
if (types != null) {
|
||||||
if (i > 0) {
|
for (int i= 0; i < types.length; i++) {
|
||||||
buf.append( COMMA_STRING );
|
if (i > 0) {
|
||||||
}
|
buf.append( COMMA_STRING );
|
||||||
|
}
|
||||||
if (types != null) {
|
|
||||||
buf.append( types[i] );
|
buf.append( types[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -721,19 +719,18 @@ public class CElementBaseLabels {
|
||||||
private static void getFolderLabel(ICContainer container, int flags, StringBuffer buf) {
|
private static void getFolderLabel(ICContainer container, int flags, StringBuffer buf) {
|
||||||
IResource resource= container.getResource();
|
IResource resource= container.getResource();
|
||||||
boolean rootQualified= getFlag(flags, ROOT_QUALIFIED);
|
boolean rootQualified= getFlag(flags, ROOT_QUALIFIED);
|
||||||
boolean referencedQualified= getFlag(flags, PROJECT_POST_QUALIFIED)
|
|
||||||
&& (container instanceof ISourceRoot && isReferenced((ISourceRoot)container))
|
|
||||||
&& resource != null;
|
|
||||||
if (rootQualified) {
|
if (rootQualified) {
|
||||||
buf.append(container.getPath().makeRelative().toString());
|
buf.append(container.getPath().makeRelative().toString());
|
||||||
} else {
|
} else {
|
||||||
buf.append(container.getElementName());
|
buf.append(container.getElementName());
|
||||||
if (referencedQualified) {
|
if (getFlag(flags, ROOT_QUALIFIED)) {
|
||||||
buf.append(CONCAT_STRING);
|
if (resource != null && container instanceof ISourceRoot && isReferenced((ISourceRoot)container)) {
|
||||||
buf.append(resource.getProject().getName());
|
buf.append(CONCAT_STRING);
|
||||||
} else if (getFlag(flags, ROOT_POST_QUALIFIED)) {
|
buf.append(resource.getProject().getName());
|
||||||
buf.append(CONCAT_STRING);
|
} else {
|
||||||
buf.append(container.getParent().getElementName());
|
buf.append(CONCAT_STRING);
|
||||||
|
buf.append(container.getParent().getElementName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -873,7 +870,6 @@ public class CElementBaseLabels {
|
||||||
/**
|
/**
|
||||||
* Returns the source root of <code>ICElement</code>. If the given
|
* Returns the source root of <code>ICElement</code>. If the given
|
||||||
* element is already a source root, the element itself is returned.
|
* element is already a source root, the element itself is returned.
|
||||||
* @see org.eclipse.cdt.internal.corext.util.CModelUtil
|
|
||||||
*/
|
*/
|
||||||
public static ISourceRoot getSourceRoot(ICElement element) {
|
public static ISourceRoot getSourceRoot(ICElement element) {
|
||||||
ICElement root = element;
|
ICElement root = element;
|
||||||
|
@ -893,7 +889,6 @@ public class CElementBaseLabels {
|
||||||
* referenced. This means it is own by a different project but is referenced
|
* referenced. This means it is own by a different project but is referenced
|
||||||
* by the root's parent. Returns <code>false</code> if the given root
|
* by the root's parent. Returns <code>false</code> if the given root
|
||||||
* doesn't have an underlying resource.
|
* doesn't have an underlying resource.
|
||||||
* @see org.eclipse.cdt.internal.corext.util.CModelUtil
|
|
||||||
*/
|
*/
|
||||||
public static boolean isReferenced(ISourceRoot root) {
|
public static boolean isReferenced(ISourceRoot root) {
|
||||||
IResource resource= root.getResource();
|
IResource resource= root.getResource();
|
||||||
|
|
Loading…
Add table
Reference in a new issue