Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 91e674901c7898ab12ebef65894f9ccee45175ce (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*****************************************************************************
 * Copyright (c) 2009 CEA LIST & LIFL
 *
 *
 * 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:
 *  Cedric Dumoulin  Cedric.dumoulin@lifl.fr - Initial API and implementation
 *
 *****************************************************************************/

package org.eclipse.papyrus.infra.core.sasheditor.contentprovider;

import java.util.List;

import org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer;


/**
 * Interface providing method to manage pages in the Sash Windows system.
 * This interface can be provided by ContentProvider whishing to provide a standard
 * way to manage pages. This interface is not mandatory for the Sasheditor.
 * This interface provide basic access to the Sash Windows system.
 * It is intended to be used from the application in order to interact with the ContentProvider. Then,
 * the {@link SashWindowsContainer} will refresh its views.
 *
 *
 * @author dumoulin
 *
 * @deprecated Use IPageManager instead
 */
@Deprecated
public interface IPageMngr {

	/**
	 * Add a Page identifier to the list of pages, do not open it.
	 *
	 * @param page
	 *            The object identifying the page to add. This object will be passed to the {@link IPageModelFactory#createIPageModel(EObject)}. This
	 *            identifier is stored in the sash model.
	 *            It should be a reference on a EMF object identifying the page.
	 * @deprecated The pages are now computed dynamically
	 */
	@Deprecated
	public void addPage(Object pageIdentifier);

	/**
	 * Remove the page from the SashWindows system and from the list of page.
	 * The page will not be available anymore.
	 *
	 * @param pageIdentifier
	 *            The object identifying the page
	 *
	 * @deprecated The pages are now computed dynamically. Use {@link IPageManager#closeAllOpenedPages(Object)} instead
	 */
	@Deprecated
	public void removePage(Object pageIdentifier);

	/**
	 * Close the page corresponding to the identifier.
	 * The identifier is removed from the Sash Windows, but not from the list of pages.
	 *
	 * @param pageIdentifier
	 *            The object identifying the page
	 */
	public void closePage(Object pageIdentifier);


	/**
	 * Close all opened pages.
	 *
	 */
	public void closeAllOpenedPages();

	/**
	 * Close all opened pages except the one provided as parameter.
	 *
	 * @param pageIdentifier
	 */
	public void closeOtherPages(Object pageIdentifier);

	/**
	 * Open a Page corresponding to the identifier. If the page is not in the list of pages, add it.
	 * The identifier is first added to the current folder model. Then the Sash Windows should react and
	 * ask the {@link IPageModelFactory} to create the IPageModel. This later is then used to create the
	 * SWT page.
	 * If
	 *
	 * @param page
	 *            The object identifying the page to add. This object will be passed to the {@link IPageModelFactory#createIPageModel(EObject)}. This
	 *            identifier is stored in the sash model.
	 *            It should be a reference on a EMF object identifying the page.
	 */
	public void openPage(Object pageIdentifier);

	/**
	 * Return all available page identifiers (open and closed pages).
	 *
	 * @return List of registered page identifiers.
	 */
	public List<Object> allPages();

	/**
	 * Return true if a page is open for the specified pageIdentifier.
	 *
	 * @param diagram
	 * @return
	 */
	public boolean isOpen(Object pageIdentifier);

}

Back to the top