diff options
Diffstat (limited to 'json/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/format/JSONDocumentFormatter.java')
-rw-r--r-- | json/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/format/JSONDocumentFormatter.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/json/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/format/JSONDocumentFormatter.java b/json/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/format/JSONDocumentFormatter.java new file mode 100644 index 0000000000..ab0e140242 --- /dev/null +++ b/json/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/format/JSONDocumentFormatter.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2004, 2016 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + * Angelo Zerr <angelo.zerr@gmail.com> - copied from org.eclipse.wst.css.core.internal.formatter.StyleSheetFormatter + * modified in order to process JSON Objects. + *******************************************************************************/ +package org.eclipse.wst.json.core.internal.format; + +import org.eclipse.jface.text.IRegion; +import org.eclipse.wst.json.core.document.IJSONNode; + +public class JSONDocumentFormatter extends AbstractJSONSourceFormatter { + + private static JSONDocumentFormatter instance; + + JSONDocumentFormatter() { + super(); + } + + public synchronized static JSONDocumentFormatter getInstance() { + if (instance == null) + instance = new JSONDocumentFormatter(); + return instance; + } + + + @Override + protected void formatPost(IJSONNode node, StringBuilder source) { + } + + + @Override + protected void formatPost(IJSONNode node, IRegion region, StringBuilder source) { + } + + + @Override + protected void formatPre(IJSONNode node, StringBuilder source) { + } + + + @Override + protected void formatPre(IJSONNode node, IRegion region, StringBuilder source) { + } + +} |