blob: e1ab90c5910e50bf0c89ddb06575c9acc993eaad (
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
|
/*******************************************************************************
* Copyright (c) 2006, 2007 Oracle. 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:
* Oracle - initial API and implementation
******************************************************************************/
package org.eclipse.jpt.ui.internal.selection;
import org.eclipse.ui.IWorkbenchPart;
public interface JpaSelectionManager
{
/**
* Return the current selection.
* This will never be null, but it may be empty.
*/
public JpaSelection getCurrentSelection();
/**
* Not to be called lightly, this will affect the selection for all interested
* objects in a window.
* @param newSelection The new selection for the current window.
* @param source The selection participant (if any) that is causing the
* selection. May be null.
*/
public void select(JpaSelection newSelection, JpaSelectionParticipant source);
/**
* Not to be called lightly, this will affect the selection for all interested
* objects in a window.
* @param oldSelection The oldSelection will be deselected, iff it matches
* the current selection. If so, the new selection will be an empty JpaSelection.
* @param source The selection participant (if any) that is causing the
* selection. May be null.
*/
public void deselect(JpaSelection oldSelection, JpaSelectionParticipant source);
/**
* This may be used to register a part with the selection manager if the part
* is known to need access to the selection manager before it is ever activated
* or in the case it may be activated prior to the selection manager being
* created.
*
* It should not be necessary to deregister a part, as that happens when the
* part is closed.
*/
public void register(IWorkbenchPart part);
}
|