|
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.editor.java; /** * Tool for external creation of code completion DB. * * The main method starts the IDE in nonGUI mode. Classpath should be limited * and contain libs and modules needed for source parsing: * boot.jar, core-execution.jar, core-ide.jar, core.jar, core-windows.jar, * core-ui.jar, core-compiler.jar, openide.jar, crimson.jar, classfile.jar, * javahelp-api.jar, clazz.jar, java.jar, java-api.jar, editor-lib.jar, editor.jar * * @author Martin Roskanin * @since 08.2002 */ public class StandaloneJCDBCreator { /* private static void appendSource(SourceCookie sc, Map cache){ SourceElement se = sc.getSource(); ClassElement ce[] = se.getAllClasses(); if (ce == null) return; for (int i = 0; i < ce.length; i++) { if (JavaCompletion.getLevel(ce[i].getModifiers()) >= classLevel){ JCClass classToAppend = JCExtension.parseClassElement(ce[i], classLevel, fieldLevel, methodLevel, cache, false); if (classToAppend != null) { fp.append(new JavaCompletion.SingleProvider(classToAppend)); classToAppend = null; } } } } */ /* * [TODO] - StandaloneJCDBCreator could be adapted to create ParserDB files from MDR * */ /* private static void createDB(DataObject dob, String fileName){ if (!(dob instanceof DataFolder) ){ System.out.println(); return; } File skels = new File(fileName + "." + JCFileProvider.SKEL_FILE_EXT); //NOI18N File bodies = new File(fileName + "." + JCFileProvider.BODY_FILE_EXT); //NOI18N System.out.println("Creating DB files: " + skels + " " + bodies); // NOI18N fp = new DAFileProvider((DataAccessor) new FileAccessor(skels), (DataAccessor) new FileAccessor(bodies)); fp.reset(); // Sets initializer to JavaCompletion. JavaCompletion.setFinderInitializer(new JavaCompletion.JCFinderInitializer(){ public void initJCFinder() { // don't need to load code completion database files into memory } }); System.out.println("Parsing..."); // NOI18N // parse filesystem parseFolder((DataFolder)dob); } */ /** * Arguments: * 0. source directories or archive paths separated by ; or : * 1. file names of created database files separeted by ; or : * 2. class level * 3. field level * 4. method level * * Storage levels: 0=all, 1=not private 2=public and protected, 3=public only * * Example of args: e:\java\jdk140\src;e:\nb\openide.jar e:\databases\jdk140;e:\databases\netbeans\openide 2 2 2 */ public static void main(String[] args) { System.out.println("StandaloneJCDBCreator not supported since NB 4.0..."); // NOI18N /* if (args.length != 5) { argsMessage(); throw new IllegalArgumentException(); } // start IDE in NonGUI mode Lookup.getDefault().lookup(org.openide.modules.ModuleInfo.class); parseArguments(args); for (int i=0; i |
... 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.