站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

Java SE Projects - NetBeans Architecture Questions - NetBeans API Javadoc (Current Development Version)

NetBeans Architecture Answers for Java SE Projects module

WARNING: answering questions version 1.24 rather than the current 1.29.

Interfaces table

Group of dtd interfaces
Interface NameIn/OutStabilitySpecified in What Document?
j2se-project.xsdExportedOfficial ...//www.netbeans.org/ns/j2se-project/1.xsd

Definition of j2seproject-specific portions of project.xml (1st revision).

j2se-project-2.xsdExportedOfficial ...//www.netbeans.org/ns/j2se-project/2.xsd

Definition of j2seproject-specific portions of project.xml (2nd revision).

Group of java.io.File interfaces
Interface NameIn/OutStabilitySpecified in What Document?
project.propertiesExportedUnder Development

Definition of recognized keys in project.properties and/or private.properties. XXX not yet formally specified.

build-impl.xmlExportedUnder Development

Definition of targets in build-impl.xml which may be called or overridden in build.xml. XXX not yet formally specified.

Group of java interfaces
Interface NameIn/OutStabilitySpecified in What Document?
AntModuleAPIImportedUnder Development

Used for running actions and for the AntLogger SPI.

JavaSupportAPIsImportedOfficial

Definition of classpaths and various queries implemented by the project type.

JavaPlatformAPIImportedUnder Development

Used to select J2SE platforms (type j2se) to use as the target for a project.

JavaProjectAPIImportedUnder Development

Various purposes, such as multiplexing queries, and creating the package view.

AntProjectAPIImportedUnder Development

Used to implement core project type functionality.

ProjectAPIImportedUnder Development

Used for many reasons.

ProjectLibrariesAPIImportedUnder Development

Used to add class libraries (type j2se) to the project classpath.

ProjectUIAPIImportedUnder Development

Used to define UI of the project type.

GeneralQueriesAPIImportedUnder Development

For various purposes both the API and SPI are used.

JavaHierarchyAPIImportedDeprecated

Used to find potential main classes for the project.

DatasystemsImportedOfficial

Used for miscellaneous internal purposes.

FilesystemsImportedOfficial

Many uses.

NodesImportedOfficial

Used for logical view and perhaps in some dialogs and wizards.

WizardsImportedOfficial

Used for project creation wizard and for customizer dialog.

OptionsAPIImportedOfficial

Miscellaneous internal purposes (not exposed in the GUI).

J2SEPropertyEvaluatorExportedFriend

Module provides public package org.netbeans.modules.java.j2seproject.api with interface for resolving values of project properties defined in project.properties and private.properties files.

Group of org.apache.tools.ant.Task interfaces
Interface NameIn/OutStabilitySpecified in What Document?
nbbrowseImportedUnder Development

Used to browse generated Javadoc.

nbjpdastartImportedUnder Development

Used to debug the project.

nbjpdareloadImportedUnder Development

Used to implement JPDA “Hot Fix” functionality.

junitImportedUnder Development

Requires junit.jar to be in Ant’s classpath so <junit> can be used to run unit tests.

Group of property interfaces
Interface NameIn/OutStabilitySpecified in What Document?
j2seproject.transparentUpdateExportedPrivate

If the property is set to true the project updates metadata of project.xml from the namespace http://www.netbeans.org/ns/j2se-project/1 to http://www.netbeans.org/ns/j2se-project/2 without explicit user confirmation.

Group of layer interfaces
Interface NameIn/OutStabilitySpecified in What Document?
J2SEProjectCustomizerExportedOfficial

"Projects/org-netbeans-modules-java-j2seproject/Customizer" folder's content is used to construct the project's customizer. It's content is expected to be ProjectCustomizer.CompositeCategoryProvider instances. The lookup passed to the panels contains an instance of Project and org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties Please note that the latter is not part of any public APIs and you need implementation dependency to make use of it.

J2SELogicalViewProviderExportedOfficial

"Projects/org-netbeans-modules-java-j2seproject/Nodes" folder's content is used to construct the project's child nodes. It's content is expected to be NodeFactory instances.

J2SELookupExportedOfficial

"Projects/org-netbeans-modules-java-j2seproject/Lookup" folder's content is used to construct the project's additional lookup. It's content is expected to be LookupProvider instances. J2SE project provides LookupMergers for Sources, PrivilegedTemplates and RecommendedTemplates. Implementations added by 3rd parties will be merged into a single instance in the project's lookup.


General Information

    Question (arch-what): What is this project good for?

    Answer:

    Provides a project type for plain Java projects. J2SE projects can be created from scratch, or you can import existing Java source trees. Creates an Ant script letting you build the project (and subprojects), run it, debug it, run JUnit-format tests, and build Javadoc. GUI customizer permits easy customization of the most commonly needed project parameters. Provides code completion and other services for editing Java sources. Classpaths can include other projects, raw JARs, or configured libraries. Specific J2SE platforms may be configured.

    Question (arch-overall): Describe the overall architecture.

    Answer:

    Uses various project APIs to implement the project type. Build system design document

    1. j2se-project.xsd -

      Definition of j2seproject-specific portions of project.xml (1st revision).

    2. j2se-project-2.xsd -

      Definition of j2seproject-specific portions of project.xml (2nd revision).

    3. project.properties -

      Definition of recognized keys in project.properties and/or private.properties. XXX not yet formally specified.

    4. build-impl.xml -

      Definition of targets in build-impl.xml which may be called or overridden in build.xml. XXX not yet formally specified.

    Question (arch-usecases): Describe the main use cases of the new API. Who will use it under what circumstances? What kind of code would typically need to be written to use the module?

    Answer:

    Covered by UI specification and design document.

    Question (arch-time): What are the time estimates of the work?

    Answer:

    Done.

    Question (arch-quality): How will the quality of your code be tested and how are future regressions going to be prevented?

    Answer:

    There are some unit tests (not enough). IDE-wide functional testing covers much of the module’s functionality.

    Question (arch-where): Where one can find sources for your module?

    Answer:

    The sources for the module are in NetBeans CVS in java/j2seproject directory.


Project and platform dependencies

    Question (dep-nb): What other NetBeans projects and modules does this one depend on?

    Answer:
    • AntModuleAPI -

      Used for running actions and for the AntLogger SPI.

    • JavaSupportAPIs -

      Definition of classpaths and various queries implemented by the project type.

    • nbbrowse -

      Used to browse generated Javadoc.

    • nbjpdastart -

      Used to debug the project.

    • nbjpdareload -

      Used to implement JPDA “Hot Fix” functionality.

    • JavaPlatformAPI -

      Used to select J2SE platforms (type j2se) to use as the target for a project.

    • JavaProjectAPI -

      Various purposes, such as multiplexing queries, and creating the package view.

    • junit -

      Requires junit.jar to be in Ant’s classpath so <junit> can be used to run unit tests.

    • AntProjectAPI -

      Used to implement core project type functionality.

    • ProjectAPI -

      Used for many reasons.

    • ProjectLibrariesAPI -

      Used to add class libraries (type j2se) to the project classpath.

    • ProjectUIAPI -

      Used to define UI of the project type.

    • GeneralQueriesAPI -

      For various purposes both the API and SPI are used.

    • JavaHierarchyAPI -

      Used to find potential main classes for the project.

    • Datasystems -

      Used for miscellaneous internal purposes.

    • Filesystems -

      Many uses.

    • Nodes -

      Used for logical view and perhaps in some dialogs and wizards.

    • Wizards -

      Used for project creation wizard and for customizer dialog.

    • OptionsAPI -

      Miscellaneous internal purposes (not exposed in the GUI).

    Question (dep-non-nb): What other projects outside NetBeans does this one depend on?

    Answer:

    Indirectly, Apache Ant and JUnit.

    Question (dep-platform): On which platforms does your module run? Does it run in the same way on each?

    Answer:

    Any.

    Question (dep-jre): Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?

    Answer:

    1.4.

    Question (dep-jrejdk): Do you require the JDK or is the JRE enough?

    Answer:

    The JDK is needed for critical functionality such as compiling sources.


Deployment

    Question (deploy-jar): Do you deploy just module JAR file(s) or other files as well?

    Answer:

    Just a JAR.

    Question (deploy-nbm): Can you deploy an NBM via the Update Center?

    Answer:

    Yes.

    Question (deploy-shared): Do you need to be installed in the shared location only, or in the user directory only, or can your module be installed anywhere?

    Answer:

    Anywhere.

    Question (deploy-packages): Are packages of your module made inaccessible by not declaring them public?

    Answer: J2SEPropertyEvaluator -

    Module provides public package org.netbeans.modules.java.j2seproject.api with interface for resolving values of project properties defined in project.properties and private.properties files.

    Question (deploy-dependencies): What do other modules need to do to declare a dependency on this one, in addition to or instead of the normal module dependency declaration (e.g. tokens to require)?

    Answer:

    N/A


Compatibility with environment

    Question (compat-i18n): Is your module correctly internationalized?

    Answer:

    Yes, although the project type does not yet internationalize messages coming from its (unedited) build scripts. This is possible but not yet implemented.

    Question (compat-standards): Does the module implement or define any standards? Is the implementation exact or does it deviate somehow?

    Answer:

    No.

    Question (compat-version): Can your module coexist with earlier and future versions of itself? Can you correctly read all old settings? Will future versions be able to read your current settings? Can you read or politely ignore settings stored by a future version?

    Answer:

    The project.xml schema is versioned. There is a simple system option.

    Question (compat-deprecation): How the introduction of your project influences functionality provided by previous version of the product?

    Answer:

    XXX no answer for compat-deprecation


Access to resources

    Question (resources-file): Does your module use java.io.File directly?

    Answer:

    Only where necessary according to other components.

    Question (resources-layer): Does your module provide own layer? Does it create any files or folders in it? What it is trying to communicate by that and with which components?

    Answer:

    The new project wizard is registered in the layer.

    Question (resources-read): Does your module read any resources from layers? For what purpose?

    Answer: J2SEProjectCustomizer -

    "Projects/org-netbeans-modules-java-j2seproject/Customizer" folder's content is used to construct the project's customizer. It's content is expected to be ProjectCustomizer.CompositeCategoryProvider instances. The lookup passed to the panels contains an instance of Project and org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties Please note that the latter is not part of any public APIs and you need implementation dependency to make use of it.

    J2SELogicalViewProvider -

    "Projects/org-netbeans-modules-java-j2seproject/Nodes" folder's content is used to construct the project's child nodes. It's content is expected to be NodeFactory instances.

    J2SELookup -

    "Projects/org-netbeans-modules-java-j2seproject/Lookup" folder's content is used to construct the project's additional lookup. It's content is expected to be LookupProvider instances. J2SE project provides LookupMergers for Sources, PrivilegedTemplates and RecommendedTemplates. Implementations added by 3rd parties will be merged into a single instance in the project's lookup.

    Question (resources-mask): Does your module mask/hide/override any resources provided by other modules in their layers?

    Answer:

    No.

    Question (resources-preferences): Does your module uses preferences via Preferences API? Does your module use NbPreferences or or regular JDK Preferences ? Does it read, write or both ? Does it share preferences with other modules ? If so, then why ?

    Answer:

    XXX no answer for resources-preferences


Lookup of components

    Question (lookup-lookup): Does your module use org.openide.util.Lookup or any similar technology to find any components to communicate with? Which ones?

    Answer:

    Nothing special.

    Question (lookup-register): Do you register anything into lookup for other code to find?

    Answer:

    Project type and various query implementations are registered. An AntLogger is registered which currently just tweaks the appearance of compiler errors.

    Question (lookup-remove): Do you remove entries of other modules from lookup?

    Answer:

    No.


Execution Environment

    Question (exec-property): Is execution of your code influenced by any environment or Java system (System.getProperty) property? On a similar note, is there something interesting that you pass to java.util.logging.Logger? Or do you observe what others log?

    Answer:

    j2seproject.transparentUpdate - If the property is set to true the project updates metadata of project.xml from the namespace http://www.netbeans.org/ns/j2se-project/1 to http://www.netbeans.org/ns/j2se-project/2 without explicit user confirmation.

    Question (exec-component): Is execution of your code influenced by any (string) property of any of your components?

    Answer:

    Uses property platform.ant.name returned by the J2SEPlatformImpl.getProperties() to determine the name of platform used in build scripts.

    Question (exec-ant-tasks): Do you define or register any ant tasks that other can use?

    Answer:

    XXX no answer for exec-ant-tasks

    Question (exec-classloader): Does your code create its own class loader(s)?

    Answer:

    No.

    Question (exec-reflection): Does your code use Java Reflection to execute other code?

    Answer:

    No.

    Question (exec-privateaccess): Are you aware of any other parts of the system calling some of your methods by reflection?

    Answer:

    No.

    Question (exec-process): Do you execute an external process from your module? How do you ensure that the result is the same on different platforms? Do you parse output? Do you depend on result code?

    Answer:

    No.

    Question (exec-introspection): Does your module use any kind of runtime type information (instanceof, work with java.lang.Class, etc.)?

    Answer:

    No.

    Question (exec-threading): What threading models, if any, does your module adhere to? How the project behaves with respect to threading?

    Answer:

    Mixture, according to particular functionality: ProjectManager.mutex(), EQ, etc.

    Question (security-policy): Does your functionality require modifications to the standard policy file?

    Answer:

    No.

    Question (security-grant): Does your code grant additional rights to some other code?

    Answer:

    No.


Format of files and protocols

    Question (format-types): Which protocols and file formats (if any) does your module read or write on disk, or transmit or receive over the network? Do you generate an ant build script? Can it be edited and modified?

    Answer:

    The usual Ant-based project metadata files and build scripts.

    Depends on the structure of built Javadoc. It tries to find the overview-summary.html in the api folder, and the package-summary.html and Javadoc pages for classes in the package structure under the api folder.

    Writes XML-format JUnit results to ${build.test.results.dir} for use by org.netbeans.modules.junit.

    Question (format-dnd): Which protocols (if any) does your code understand during Drag & Drop?

    Answer:

    None.

    Question (format-clipboard): Which data flavors (if any) does your code read from or insert to the clipboard (by access to clipboard on means calling methods on java.awt.datatransfer.Transferable?

    Answer:

    None.


Performance and Scalability

    Question (perf-startup): Does your module run any code on startup?

    Answer:

    No.

    Question (perf-exit): Does your module run any code on exit?

    Answer:

    Not usually, though modified project metadata is saved on close or exit. (Normally all GUI actions autosave immediately anyway.)

    Question (perf-scale): Which external criteria influence the performance of your program (size of file in editor, number of files in menu, in source directory, etc.) and how well your code scales?

    Answer:

    Number of source files in the project will affect the time it takes to scan for a main class.

    Question (perf-limit): Are there any hard-coded or practical limits in the number or size of elements your code can handle?

    Answer:

    None known.

    Question (perf-mem): How much memory does your component consume? Estimate with a relation to the number of windows, etc.

    Answer:

    Unknown. Probably not much.

    Question (perf-wakeup): Does any piece of your code wake up periodically and do something even when the system is otherwise idle (no user interaction)?

    Answer:

    No.

    Question (perf-progress): Does your module execute any long-running tasks?

    Answer:

    No.

    Question (perf-huge_dialogs): Does your module contain any dialogs or wizards with a large number of GUI controls such as combo boxes, lists, trees, or text areas?

    Answer:

    The customizer dialog is fairly large.

    Question (perf-menus): Does your module use dynamically updated context menus, or context-sensitive actions with complicated and slow enablement logic?

    Answer:

    No.

    Question (perf-spi): How the performance of the plugged in code will be enforced?

    Answer:

    N/A


Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.