/******************************************************************************* * Copyright © 2011, 2013 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 * *******************************************************************************/ package org.eclipse.edt.compiler.core.dev.tools; import java.util.Date; import org.eclipse.edt.compiler.core.EGLKeywordHandler; /** * @author jshavor * * output to the console IEGLConstants declarations for the EGL keywords * copy and paste the results to IEGLConstants */ public class EGLKeywordTool { public static void main(String[] args) { StringBuffer stringBuffer = new StringBuffer(); System.out.println(); System.out.println(" //EGL keywords"); //$NON-NLS-1$ System.out.print(" //Generated : "); //$NON-NLS-1$ System.out.println(new Date().toString()); System.out.println(" //These keywords should be generated by org.eclipse.edt.compiler.core.dev.tools.EGLKeywordTool"); //$NON-NLS-1$ String keywords[] = EGLKeywordHandler.getKeywordNames(); for (int i = 0; i < keywords.length; i++) { String keyword = keywords[i]; stringBuffer.setLength(0); stringBuffer.append(" public static final String "); //$NON-NLS-1$ stringBuffer.append("KEYWORD_"); //$NON-NLS-1$ stringBuffer.append(keyword.toUpperCase()); stringBuffer.append(" = \""); //$NON-NLS-1$ stringBuffer.append(keyword); stringBuffer.append("\"; //$NON-NLS-1$"); //$NON-NLS-1$ System.out.println(stringBuffer); } } }