blob: b072d9d5f71e3c5e220e02182286d40295cb7d23 (
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
44
45
46
47
48
49
50
51
52
53
54
|
/*****************************************************************************
* Copyright (c) 2013 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:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.services.navigation.service;
import org.eclipse.papyrus.infra.core.services.IService;
import org.eclipse.papyrus.infra.widgets.editors.SelectionMenu;
import org.eclipse.swt.widgets.Control;
/**
* A Service to navigate from an element.
* The navigation is based on external contributions.
*
* Examples:
* - Navigate from a TypedElement to its Type declaration in the ModelExplorer
* - ...
*
* @author Camille Letavernier
*
* @see NavigationContributor
*/
public interface NavigationService extends IService, NavigationContributor {
/**
* Creates a Selection Menu to display all the NavigableElement which can be reached from an element
*
* @param fromElement
* @param parent
* @return
*/
public SelectionMenu createNavigationList(Object fromElement, Control parent);
/**
* Navigate to the target of the given NavigableElement (e.g. To the type of a TypedElement)
*
* @param navigableElement
*/
public void navigate(NavigableElement navigableElement);
/**
* Navigate directly to the given element (e.g. a UML Element)
*
* @param element
*/
public void navigate(Object element);
}
|