Methods Summary |
---|
public void | addListener(org.eclipse.jface.viewers.ILabelProviderListener listener)
// No state change will affect the rendering.
|
public void | decorate(java.lang.Object element, org.eclipse.jface.viewers.IDecoration decoration)
if (element instanceof IFolder) {
IFolder folder = (IFolder)element;
// get the project and make sure this is an android project
IProject project = folder.getProject();
try {
if (project.hasNature(AndroidConstants.NATURE)) {
// check the folder is directly under the project.
if (folder.getParent().getType() == IResource.PROJECT) {
String name = folder.getName();
if (name.equals(SdkConstants.FD_ASSETS)) {
doDecoration(decoration, null);
} else if (name.equals(SdkConstants.FD_RESOURCES)) {
doDecoration(decoration, null);
} else if (name.equals(SdkConstants.FD_GEN_SOURCES)) {
doDecoration(decoration, " [Generated Java Files]");
} else if (name.equals(SdkConstants.FD_NATIVE_LIBS)) {
doDecoration(decoration, null);
}
}
}
} catch (CoreException e) {
// log the error
AdtPlugin.log(e, "Unable to get nature of project '%s'.", project.getName());
}
}
|
public void | dispose()
// nothing to dispose
|
public void | doDecoration(org.eclipse.jface.viewers.IDecoration decoration, java.lang.String suffix)
decoration.addOverlay(mDescriptor, IDecoration.TOP_LEFT);
if (suffix != null) {
decoration.addSuffix(suffix);
// this is broken as it changes the color of the whole text, not only of the decoration.
// TODO: figure out how to change the color of the decoration only.
// ITheme theme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
// ColorRegistry registry = theme.getColorRegistry();
// decoration.setForegroundColor(
// registry.get("org.eclipse.jdt.ui.ColoredLabels.decorations")); //$NON-NLS-1$
}
|
public boolean | isLabelProperty(java.lang.Object element, java.lang.String property)
// Property change do not affect the label
return false;
|
public void | removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener)
// No state change will affect the rendering.
|