]> git.uio.no Git - ifi-stolz-refaktor.git/blame - case-study/jdt-before/ui/org/eclipse/jdt/internal/ui/javaeditor/breadcrumb/IBreadcrumb.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-before / ui / org / eclipse / jdt / internal / ui / javaeditor / breadcrumb / IBreadcrumb.java
CommitLineData
1b2798f6
EK
1/*******************************************************************************
2 * Copyright (c) 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.jdt.internal.ui.javaeditor.breadcrumb;
12
13import org.eclipse.swt.widgets.Composite;
14import org.eclipse.swt.widgets.Control;
15
16import org.eclipse.jface.viewers.ISelectionProvider;
17
18
19/**
20 * Implementors can provide a breadcrumb inside an editor.
21 *
22 * <p>Clients should not implement this interface. They should
23 * subclass {@link EditorBreadcrumb} instead if possible</p>
24 *
25 * @since 3.4
26 */
27public interface IBreadcrumb {
28
29 /**
30 * Create breadcrumb content.
31 *
32 * @param parent the parent of the content
33 * @return the control containing the created content
34 */
35 public Control createContent(Composite parent);
36
37 /**
38 * Returns the selection provider for this breadcrumb.
39 *
40 * @return the selection provider for this breadcrumb
41 */
42 public ISelectionProvider getSelectionProvider();
43
44 /**
45 * Activates the breadcrumb. This sets the keyboard focus
46 * inside this breadcrumb and retargets the editor
47 * actions.
48 */
49 public void activate();
50
51 /**
52 * A breadcrumb is active if it either has the focus or another workbench part has the focus and
53 * the breadcrumb had the focus before the other workbench part was made active.
54 *
55 * @return <code>true</code> if this breadcrumb is active
56 */
57 public boolean isActive();
58
59 /**
60 * Set the input of the breadcrumb to the given element
61 *
62 * @param element the input element can be <code>null</code>
63 */
64 public void setInput(Object element);
65
66 /**
67 * Dispose all resources hold by this breadcrumb.
68 */
69 public void dispose();
70
71}