mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Further fix to 36837
* src/org/eclipse/cdt/internal/ui/util/ResourceToItemsMapper.java Fix for 82516 * src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java
This commit is contained in:
parent
c796aad342
commit
70a3403e0b
3 changed files with 21 additions and 5 deletions
|
@ -1,3 +1,15 @@
|
|||
2005-01-11 David Inglis
|
||||
Further fix to 36837
|
||||
|
||||
* src/org/eclipse/cdt/internal/ui/util/ResourceToItemsMapper.java
|
||||
|
||||
2005-01-11 David Inglis
|
||||
|
||||
Fix for 82516
|
||||
|
||||
* src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java
|
||||
|
||||
|
||||
2005-01-07 Alain Magloire
|
||||
Part of Fix 82323.
|
||||
The "New" action was not shown when workspace was empty
|
||||
|
|
|
@ -184,7 +184,7 @@ public class ResourceToItemsMapper {
|
|||
private static IResource getCorrespondingResource(Object element) {
|
||||
if (element instanceof ICElement) {
|
||||
ICElement elem= (ICElement) element;
|
||||
if (elem.exists() && !elem.isReadOnly()) { // only modifieable elements can get error ticks
|
||||
if (elem.exists()) {
|
||||
IResource res= elem.getResource();
|
||||
if (res == null) {
|
||||
ITranslationUnit cu= (ITranslationUnit) elem.getAncestor(ICElement.C_UNIT);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
package org.eclipse.cdt.internal.ui.viewsupport;
|
||||
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.IBinary;
|
||||
import org.eclipse.cdt.core.model.ICContainer;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.IMethod;
|
||||
|
@ -314,6 +315,12 @@ public class CElementLabels {
|
|||
buf.append(CONCAT_STRING);
|
||||
getSourceRootLabel(root, ROOT_QUALIFIED, buf);
|
||||
}
|
||||
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
buf.append(" - [" + bin.getCPU() + (bin.isLittleEndian() ? "le" : "be") + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void getMethodLabel( IMethod method, int flags, StringBuffer buf ) {
|
||||
|
@ -419,10 +426,7 @@ public class CElementLabels {
|
|||
if (rootQualified) {
|
||||
buf.append(container.getPath().makeRelative().toString());
|
||||
} else {
|
||||
// if (resource != null)
|
||||
// buf.append(resource.getProjectRelativePath().toString());
|
||||
// else
|
||||
buf.append(container.getElementName());
|
||||
buf.append(container.getElementName());
|
||||
if (referencedQualified) {
|
||||
buf.append(CONCAT_STRING);
|
||||
buf.append(resource.getProject().getName());
|
||||
|
|
Loading…
Add table
Reference in a new issue