blob: e39b2dc2fddcacfe2b06f7f1b56acf76ea3c7880 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2017 Obeo.
* 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:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.ui;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.LaunchConfiguration;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ILightweightLabelDecorator;
/**
* Decorator for {@link ILaunchConfiguration} prototypes.
*
* @since 3.13
*
*/
public class PrototypeDecorator implements ILightweightLabelDecorator {
@Override
public void addListener(ILabelProviderListener listener) {
}
@Override
public void dispose() {
}
@Override
public boolean isLabelProperty(Object element, String property) {
return false;
}
@Override
public void removeListener(ILabelProviderListener listener) {
}
@Override
public void decorate(Object element, IDecoration decoration) {
if (element instanceof LaunchConfiguration) {
if (((LaunchConfiguration) element).isPrototype()) {
decoration.addOverlay(DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_OVR_PROTOTYPE));
}
}
}
}