| java.lang.Object org.netbeans.modules.apisupport.project.layers.LayerUtils
LayerUtils | public class LayerUtils (Code) | | Misc support for dealing with layers.
author: Jesse Glick |
Inner Class :interface SavableTreeEditorCookie extends TreeEditorCookie | |
Inner Class :final public static class LayerHandle | |
Method Summary | |
static SavableTreeEditorCookie | cookieForFile(FileObject f) | static ClassPath | createLayerClasspath(Set<? extends Project> moduleProjects, Set<File> platformJars) Creates a classpath representing the source roots and platform binary JARs for a project/suite. | static URL[] | currentify(URL u, String suffix, ClassPath cp) Translates nbres: into nbrescurr: for internal use. | public static String | findGeneratedName(FileObject parent, String layerPath) Find the name of the external file that will be generated for a given
layer path if it is created with contents. | public static FileSystem | getEffectiveSystemFilesystem(Project p) Get a filesystem that will look like what this project would "see".
There are four possibilities:
For a standalone module project, the filesystem will include all the XML
layers from all modules in the selected platform, plus this module's XML layer
as the writable layer (use
LayerHandle.save to save changes as needed).
For a module suite project, the filesystem will include all the XML layers
from all modules in the selected platform which are not excluded in the current
suite configuration, plus the XML layers for modules in the suite (currently all
read-only, i.e. | public static Set<File> | getPlatformJarsForStandaloneProject(Project project) Get the platform JARs associated with a standalone module project. | public static Set<File> | getPlatformJarsForSuiteComponentProject(Project project, SuiteProject suite) | public static Set<NbModuleProject> | getProjectsForNetBeansOrgProject(NbModuleProject project) | public static LayerHandle | layerForProject(Project project) Gets a handle for one project's XML layer. |
cookieForFile | static SavableTreeEditorCookie cookieForFile(FileObject f)(Code) | | |
createLayerClasspath | static ClassPath createLayerClasspath(Set<? extends Project> moduleProjects, Set<File> platformJars) throws IOException(Code) | | Creates a classpath representing the source roots and platform binary JARs for a project/suite.
|
currentify | static URL[] currentify(URL u, String suffix, ClassPath cp)(Code) | | Translates nbres: into nbrescurr: for internal use.
Returns an array of one or more URLs.
May just be original URL, but will try to produce URLs corresponding to real files.
If there is a suffix, may produce several, most specific first.
|
findGeneratedName | public static String findGeneratedName(FileObject parent, String layerPath)(Code) | | Find the name of the external file that will be generated for a given
layer path if it is created with contents.
Parameters: parent - parent folder, or null Parameters: layerPath - full path in layer a simple file name |
getEffectiveSystemFilesystem | public static FileSystem getEffectiveSystemFilesystem(Project p) throws IOException(Code) | | Get a filesystem that will look like what this project would "see".
There are four possibilities:
For a standalone module project, the filesystem will include all the XML
layers from all modules in the selected platform, plus this module's XML layer
as the writable layer (use
LayerHandle.save to save changes as needed).
For a module suite project, the filesystem will include all the XML layers
from all modules in the selected platform which are not excluded in the current
suite configuration, plus the XML layers for modules in the suite (currently all
read-only, i.e. the filesystem is read-only).
For a suite component module project, the filesystem will include all XML
layers from non-excluded platform modules, plus the XML layers for modules in the
suite, with this module's layer being writable.
For a netbeans.org module, the filesystem will include all XML layers
from all netbeans.org modules that are not in the extra cluster,
plus the layer from this module (if it is in the extra cluster,
with this module's layer always writable.
Does not currently attempt to cache the result,
though that could be attempted later as needed.
Will try to produce pleasant-looking display names and/or icons for files.
Note that parsing XML layers is not terribly fast so it would be wise to show
a "please wait" label or some other simple progress indication while this
is being called, if blocking the UI.
Parameters: project - a project of one of the three types enumerated above the effective system filesystem seen by that project throws: IOException - if there were problems loading layers, etc. See Also: "#62257" |
getPlatformJarsForStandaloneProject | public static Set<File> getPlatformJarsForStandaloneProject(Project project)(Code) | | Get the platform JARs associated with a standalone module project.
|
getPlatformJarsForSuiteComponentProject | public static Set<File> getPlatformJarsForSuiteComponentProject(Project project, SuiteProject suite)(Code) | | |
layerForProject | public static LayerHandle layerForProject(Project project)(Code) | | Gets a handle for one project's XML layer.
|
|
|