|
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.openfile; import java.io.File; import org.netbeans.modules.openfile.cli.Callback; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; import org.openide.filesystems.FileObject; import org.openide.util.Lookup; import org.openide.util.NbBundle; /** * Opens files when requested. Main functionality. * @author Jaroslav Tulach, Jesse Glick * @author Marian Petras */ public final class OpenFile { /** do not instantiate */ private OpenFile() {} private static OpenFileImpl getImpl() { return (OpenFileImpl)Lookup.getDefault().lookup(OpenFileImpl.class); } /** * Opens the specified file. * * @param fileName name of file to open * @usecase API */ public static void open(String fileName) { openFile(new File(fileName), -1, null); } /** * Open a file (object) at the beginning. * @param fileObject the file to open * @usecase API */ public static void open(FileObject fileObject) { getImpl().open(fileObject, -1, null); } /** * Opens a file. * * @param file file to open (must exist) * @param line line number to try to open to (starting at zero), * or |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.