Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/services/ISourceFormatter.java')
-rw-r--r--archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/services/ISourceFormatter.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/services/ISourceFormatter.java b/archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/services/ISourceFormatter.java
new file mode 100644
index 000000000..a2df1ddaa
--- /dev/null
+++ b/archive/org.eclipse.qvt.declarative.editor.imp.runtime/src/org/eclipse/imp/services/ISourceFormatter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+* 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.services;
+
+import org.eclipse.imp.language.ILanguageService;
+import org.eclipse.imp.parser.IParseController;
+
+/**
+ * Essentially the same as IFormattingStrategy, but the format() method
+ * takes an IParseController as an argument, so that the language-specific
+ * formatter has access to an AST to drive formatting decisions.
+ * @author Dr. Robert M. Fuhrer
+ */
+public interface ISourceFormatter extends ILanguageService {
+ void formatterStarts(String initialIndentation);
+
+ String format(IParseController parseController, String content, boolean isLineStart, String indentation, int[] positions);
+
+ void formatterStops();
+}

Back to the top