01: /*******************************************************************************
02: * Copyright (c) 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.cheatsheets.composite.parser;
11:
12: import org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask;
13: import org.w3c.dom.Node;
14:
15: /**
16: * Interface which encapsulates the parsing logic specific to different
17: * task kinds.
18: */
19:
20: public interface ITaskParseStrategy {
21:
22: /**
23: * Called before parsing a new set of children
24: */
25: public void init();
26:
27: /**
28: * Parse a child node of this task
29: * @param childNode The child node
30: * @param parentNode The task node
31: * @param parentTask The task object
32: * @param status Used to add error messages.
33: * @return True if this element is a valid child
34: */
35: public boolean parseElementNode(Node childNode, Node parentNode,
36: AbstractTask parentTask, IStatusContainer status);
37:
38: /**
39: * Called afer all the children have been parsed to check for missing children
40: */
41: public void parsingComplete(AbstractTask parentTask,
42: IStatusContainer status);
43:
44: }
|