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
|
/*****************************************************************************
* Copyright (c) 2013 Cedric Dumoulin.
*
*
* 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.pagesmodel;
/**
* Visitor used to visit pagemodel structure.
*
* @author cedric dumoulin
*
* @param M Type of the models provided to visit() and walk(). This is the common
* ancestor of all types of the walked model.
*
*/
public interface IPagesModelVisitor <M>{
/**
* If true, parent are visited before children.
* If false, parent are visited after children.
* @return
*/
public boolean isVisitingParentFirst();
/**
* Walk the node and its children. Call visit visit method appropiatly.
* This method encapsulate the navigation between nodes.
*
* @param windowTerm The term to navigate
* @param windowModel the model that maybe correspond to the term.
* @throws PagesModelException
*
*/
public void walk( SashPagesModel windowTerm, M windowModel ) throws PagesModelException;
public void walk( WindowTerm windowTerm, M windowModel ) throws PagesModelException;
public void walk( Folder folder, M folderModel ) throws PagesModelException;
public void walk(HSash sash, M sashModel) throws PagesModelException;
public void walk(VSash sash, M sashModel) throws PagesModelException;
public void walk(Page page, M pageModel) throws PagesModelException;
/**
* Visit the corresponding term.
* @param windowTerm The term to visit
* @param windowModel The corresponding model found while walking the expr.
*/
// public void visit( SashPagesModel windowTerm, M windowModel ) throws PagesModelException;
// public void visit( WindowTerm windowTerm, M windowModel ) throws PagesModelException;
// public void visit( Folder folder, M folderModel ) throws PagesModelException;
//
// public void visit(HSash sash, M sashModel) throws PagesModelException;
// public void visit(VSash sash, M sashModel) throws PagesModelException;
//
// public void visit(Page page, M pageModel) throws PagesModelException;
}
|