|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.java.fastjavac; import java.io.*; import org.openide.compiler.*; import org.openide.execution.*; import org.netbeans.modules.java.*; import org.openide.execution.NbProcessDescriptor; /** * @author Svata Dedic */ public class FastJavacCG extends JExternalCompilerGroup { public void add(org.openide.compiler.Compiler c) { if (c instanceof JavaCompilerType.IndirectCompiler) { super.add(c); } else if (c instanceof FastJavacCompilerType.C) { super.add(((FastJavacCompilerType.C)c).del); } } protected Process createProcess(NbProcessDescriptor desc, String[] files) throws java.io.IOException { JavaExternalCompilerType jext; String encoding; try { java.lang.reflect.Field f = JExternalCompilerGroup.class.getDeclaredField("jext"); f.setAccessible(true); jext = (JavaExternalCompilerType)f.get(this); f = JExternalCompilerGroup.class.getDeclaredField("encoding"); f.setAccessible(true); encoding = (String)f.get(this); } catch (Exception ex) { // should never happen throw new IOException(); } return desc.exec(new FFormat(files, jext, desc, encoding), jext.getEnvironmentVariables(), jext.getWorkingDirectory()); } public static class FFormat extends JFormat { public FFormat (String[] files, JavaExternalCompilerType jext, NbProcessDescriptor descriptor, String encoding) throws IOException { super(files, jext, descriptor, encoding); java.util.Map map = getMap(); String wiredName = FastJavacCompilerType.getWiredName(); String wiredFullName = FastJavacCompilerType.getWiredFullName(); map.put(TAG_FASTJAVAC_BINARY_FULL, wiredFullName); map.put(TAG_FASTJAVAC_BINARY, wiredName); } } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.