Skip to main content
summaryrefslogtreecommitdiffstats
blob: 394889942a707df235f8fdaa625f7ad91b124f00 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package org.eclipse.emf.refactor.metrics.papyrus.ui;

import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;

public class PapyrusDecoratorProvider extends AbstractProvider implements IDecoratorProvider {
	
	public static final String PAPYRUS_DECORATOR_KEY = "papyrus_decorator";

	@Override
	public boolean provides(IOperation operation) {
		return (operation instanceof CreateDecoratorsOperation);
	}

	@Override
	public void createDecorators(IDecoratorTarget decoratorTarget) {
		decoratorTarget.installDecorator(PAPYRUS_DECORATOR_KEY, new PapyrusDecorator(decoratorTarget));
	}

}

Back to the top