diff options
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/RestrictedAbstractEditPartProvider.java')
-rw-r--r-- | plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/RestrictedAbstractEditPartProvider.java | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/RestrictedAbstractEditPartProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/RestrictedAbstractEditPartProvider.java index 03643c6bd2d..a04559bd35d 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/RestrictedAbstractEditPartProvider.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/RestrictedAbstractEditPartProvider.java @@ -1,61 +1,61 @@ -/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * 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:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.providers;
-
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-
-/**
- * This abstract edit part provider restricts its contribution to view that are owned by
- * a given type of diagram.
- */
-public abstract class RestrictedAbstractEditPartProvider extends AbstractEditPartProvider {
-
- /** The provides only provides for this diagram type */
- protected String diagramType;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean provides(IOperation operation) {
- if (operation instanceof CreateGraphicEditPartOperation) {
- String currentDiagramType = ((IEditPartOperation) operation).getView().getDiagram().getType();
-
- if ((diagramType == null) || (!diagramType.equals(currentDiagramType))) {
- return false;
- }
- }
-
- return super.provides(operation);
- }
-
-
-
-
-}
+/***************************************************************************** + * Copyright (c) 2014 CEA LIST. + * + * + * 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: + * Patrick Tessier (CEA LIST) - Initial API and implementation + /*****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.common.providers; + +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +import org.eclipse.gmf.runtime.common.core.service.IOperation; +import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider; +import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation; +import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation; + +/** + * This abstract edit part provider restricts its contribution to view that are owned by + * a given type of diagram. + */ +public abstract class RestrictedAbstractEditPartProvider extends AbstractEditPartProvider { + + /** The provides only provides for this diagram type */ + protected String diagramType; + + /** + * {@inheritDoc} + */ + @Override + public boolean provides(IOperation operation) { + if (operation instanceof CreateGraphicEditPartOperation) { + String currentDiagramType = ((IEditPartOperation) operation).getView().getDiagram().getType(); + + if ((diagramType == null) || (!diagramType.equals(currentDiagramType))) { + return false; + } + } + + return super.provides(operation); + } + + + + +} |