blob: d89f2412893717b78aef45380857d00c320855f0 (
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*******************************************************************************
* Copyright (c) 2007, 2009 THALES GLOBAL SERVICES.
* 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.sirius.diagram.graphical.edit.policies;
import org.eclipse.emf.common.command.Command;
import org.eclipse.gef.Request;
import org.eclipse.sirius.DDiagram;
import org.eclipse.sirius.diagram.tools.api.requests.RequestConstants;
import org.eclipse.sirius.tools.api.command.IDiagramCommandFactory;
/**
* Returns a command to reveal all diagram elements. (set the visible property
* to <code>true</code>).
*
* @author ymortier
*/
public class RevealElementsEditPolicy extends AbstractRevealElementEditPolicy {
/**
* {@inheritDoc}
*/
@Override
protected String getCurrentType() {
return RequestConstants.REQ_REVEAL_ALLS;
}
/**
* {@inheritDoc}
*/
@Override
protected Command buildCommand(final Request request, final DDiagram diagram, final IDiagramCommandFactory emfCommandFactory) {
return emfCommandFactory.buildRevealElementsCommand(diagram);
}
}
|