diff options
Diffstat (limited to 'archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/parser/IMessageHandler.java')
-rw-r--r-- | archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/parser/IMessageHandler.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/parser/IMessageHandler.java b/archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/parser/IMessageHandler.java new file mode 100644 index 000000000..c0fa5808a --- /dev/null +++ b/archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/parser/IMessageHandler.java @@ -0,0 +1,52 @@ +/******************************************************************************* +* Copyright (c) 2007 IBM Corporation. +* 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: +* Robert Fuhrer (rfuhrer@watson.ibm.com) - initial API and implementation + +*******************************************************************************/ + +package org.eclipse.imp.parser; + +/** + * This interface describes something that can process messages emitted + * by a parser or other language processing front-end. + */ +public interface IMessageHandler { + /** + * Clear all previously-issued messages. Typically called at the + * beginning of a parsing "session". + */ + void clearMessages(); + + /** + * Issue a single message with the given text and source position. + * @param msg the message text + * @param startOffset 0-based, inclusive + * @param endOffset 0-based, inclusive + * @param startCol 1-based, inclusive + * @param endCol 1-based, inclusive + * @param startLine 1-based, inclusive + * @param endLine 1-based, inclusive + */ + void handleSimpleMessage(String msg, int startOffset, int endOffset, + int startCol, int endCol, + int startLine, int endLine); + + /** + * Begins a group of related messages (e.g. the first describing an error + * relating multiple entities, identifying the position of the first entity, + * followed by individual messages, one per additional entity). + * @param groupName + */ + void startMessageGroup(String groupName); + + /** + * Ends a group of related messages + */ + void endMessageGroup(); +} |