<!-- <questionid="arch-overall"when="init"> Describetheoverallarchitecture. <hint> WhatwillbeAPIfor <ahref="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"> clientsandwhatsupportAPI</a>? Whatpartswillbepluggable? Howwillplug-insberegistered?Pleaseuse<code><apitype="export"/></code> todescribeyourgeneralAPIs. Ifpossiblepleaseprovide simplediagrams. </hint> </question>
-->
<answer id="arch-overall">
<api name="MultiView" group="java"type="export" category="stable" url="@TOP@/overview-summary.html">
Provides support for creation of editors composed from
multiple (independent) elements. One can either specify
the <a href="@TOP@/org/netbeans/core/spi/multiview/MultiViewFactory.html">
elements directly</a>
or read them from a
<a href="@TOP@/org/netbeans/core/api/multiview/MultiViews.html">
declarative registration</a> for a particular mime type.
</api>
</answer>
<!-- <questionid="arch-quality"when="init"> Howwillthe<ahref="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a> ofyourcodebetestedand howarefutureregressionsgoingtobeprevented? <hint> Whatkindoftestingdo youwanttouse?Howmuchfunctionality,inwhichareas, shouldbecoveredbythetests? </hint> </question>
-->
<answer id="arch-quality">
We are going to use standard unit tests. Unit tests should include tests of
MultiViewElement implementation method calls sequence, number of calls. Further
way tests of whole MultiViewTopComponent loading/storing, tests of proper config xml reading.
</answer>
<!-- <questionid="arch-time"when="init"> Whatarethetimeestimatesofthework? <hint> Pleaseexpressyourestimatesofhowlongthedesign,implementation, stabilizationarelikelytolast.Howmanypeoplewillbeneededto implementthisandwhatistheexpectedmilestonebywhichtheworkshouldbe ready? </hint> </question>
-->
<answer id="arch-time">
Total time estimate is 4 months. First two months is design and implementation phase,
other two months are reserved for stabilization phase. One developers will work
on the project. Final milestones are aligned with milestones of cdp promotion D
product.
</answer>
<!-- <questionid="arch-usecases"when="init"> Describethemain<ahref="http://openide.netbeans.org/tutorial/api-design.html#usecase"> usecases</a>ofthenewAPI.Whowilluseitunder whatcircumstances?Whatkindofcodewouldtypicallyneedtobewritten tousethemodule? </question>
-->
<answer id="arch-usecases">
There is an introduction to MultiView and its usage in its
<a href="@TOP@/overview-summary.html">javadoc</a>. It covers the major part
of available usecases.
Here is just
a list of frequently asked or interesting questions slowly expanding as
people ask them:
<h3>MultiView faq:</h3>
<usecase id="serialization" name="How does serialization work?" >
<em><b>Q:</b>
How does serialization of multiviews work and what needs to be serializable?
</em>
<p>
First of all, you don't need to worry about serialization if all your <code>MultiViewDescription</code> instances
contained in the multiview state to be non serializable.
Meaning they all return <code>TopComponent.PERSISTENCE_NEVER</code> in <code>MultiViewDescription.getPersistenceType()</code>.
</p>
<p>
If at least one of the views requires serialization, you have no choice but to make all
<code>MultiViewDescription</code> implementors serializable.
You also can persist the MultiViewElement instances that the multiview contains. The algorithm here is a bit complicated for
performance reasons. Only those Elements are stored that were created during the session and which are Serializable.
So if the user never switches to the 4rd tab, and it's corresponding element and visual component never get created, then
it won't be stored. (We would have to create it just for the sake of persistance).
So if your visual component needs some inital context for creation, you should store it in the description instance, and if the visual component
wants to store it's state (location of cursor, selected field, something else that makes sense for the opened component) you should store it in the MultiViewElement.
So basically if you are always able create the Element from Description without any persisted data, you don't need to persist anything.
</p>
<p>
If you define your own <code>CloseOperationHandler</code> implementation for the multiview component, then you also ought to define it
Serializable. Otherwise it will be silently replaced by the default handler on restoration of the multiview component.
</p>
</usecase>
<usecase id="displayName" name="How to set the display name?" >
<em><b>Q:</b>
How do I set the display name for the multiview component?
</em>
<p>
Each <code>MultiViewDescription</code> defines display name and icon. While the icon
is meant for the whole document/view tab, the display name is just for the inner switching button.
So how does one set the name for the whole MultiView component? It can be done when creating the component.
</p>
<pre>
TopComponent mvtc = MultiViewFactory.createMultiView(myDescriptions);
mvtc.setDisplayName("My static mvtc displayName");
</pre>
<p>
Later in the lifecycle of the component, it can be also influenced from within the individual
multiview visual elements using the <code>MultiViewElementCallback.updateTitle()</code> method.
</p>
</usecase>
</answer>
<!-- <questionid="arch-what"when="init"> Whatisthisprojectgoodfor? <hint> Pleaseprovidehereafewlinesdescribingtheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
Multi views are general mechanism for displaying several perspectives, or views of data,
which will be used consistently across whole IDE window system. Using multi views
will enable modules to visually represent data document or object in unified manner
at one specific place in the system, yet still allowing for different perspectives
of data viewing.
</answer>
<!-- <questionid="compat-i18n"when="impl"> Isyourmodulecorrectlyinternationalized? <hint> Correctinternationalizationmeansthatitobeysinstructions at<ahref="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html"> NetBeansI18Npages</a>. </hint> </question>
-->
<answer id="compat-i18n">
The module itself doesn't expose anything brandable (at least to my knowledge.)
</answer>
<!-- <questionid="dep-jre"when="final"> WhichversionofJREdoyouneed(1.2,1.3,1.4,etc.)? <hint> Itisexpectedthatifyourmodulerunson1.xthatitwillrun on1.x+1ifno,statethatplease.Alsodescribeherecaseswhere yourundifferentcodeondifferentversionsofJREandwhy. </hint> </question>
-->
<answer id="dep-jre">
XXX no answer for dep-jre
</answer>
<!-- <questionid="dep-jrejdk"when="final"> DoyourequiretheJDKoristheJREenough? </question>
-->
<answer id="dep-jrejdk">
XXX no answer for dep-jrejdk
</answer>
<!-- <questionid="dep-nb"when="init"> WhatotherNetBeansprojectsandmodulesdoesthisonedependon? <hint> Ifyouwant,describesuchprojectsasimportedAPIsusing the<code><apiname="identification"type="importorexport"category="stable"url="whereisthedescription"/></code> </hint> </question>
-->
<answer id="dep-nb">
MultiViews project depends on Window System API, namely org.openide.windows.TopComponent
API.
It also depends on some new APIs in openide, namely NbDocument.CustomToolbar and CloneableEditorSupport.Pane
</answer>
<!-- <questionid="dep-non-nb"when="init"> WhatotherprojectsoutsideNetBeansdoesthisonedependon? <hint> Somenon-NetBeansprojectsarepackagedasNetBeansmodules (see<ahref="http://libs.netbeans.org/">libraries</a>)and itispreferredtousethisapproachwhenmoremodulesmay dependonsuchthird-partylibrary. </hint> </question>
-->
<answer id="dep-non-nb">
This project doesn't depend on any outside Netbeans projects.
</answer>
<!-- <questionid="dep-platform"when="init"> Onwhichplatformsdoesyourmodulerun?Doesitruninthesame wayoneach? <hint> IfyourmoduleisusingJNIordealswithspecialdifferencesof OSeslikefilesystems,etc.pleasedescribeherewhattheyare. </hint> </question>
-->
<answer id="dep-platform">
Module MultiViews should run on all platforms IDE is able to run, no restrictions
are planned. It runs the same on all platforms expect LF code. It's expected that
look and feel code will have to be slightly different for supported OS. Chnages
are expected to be as small as possible, touching only drawing, not behaviour.
</answer>
<!-- <questionid="exec-introspection"when="impl"> Doesyourmoduleuseanykindofruntimetypeinformation(<code>instanceof</code>, workwith<code>java.lang.Class</code>,etc.)? <hint> CheckforcaseswhenyouhaveanobjectoftypeAandyoualso expectitto(possibly)beoftypeBanddosomespecialaction.That shouldbedocumented.Thesameappliesonoperationsinmeta-level (Class.isInstance(...),Class.isAssignableFrom(...),etc.). </hint> </question>
-->
<answer id="exec-introspection">
Action.getClass() is called in MultiViewTopComponent on actions from the element to check for Window system
related actions, if these are found, the element itself is a topcomponent and we need to replace it's actions with the MultiViewTopComponent ones.
Otherwise the action will not be trigger on the whole MVTC.
</answer>
<!-- <questionid="exec-property"when="impl"> Isexecutionofyourcodeinfluencedbyanyenvironmentor Javasystem(<code>System.getProperty</code>)property? <hint> Ifthereisapropertythatcanchangethebehaviorofyour code,somebodywilllikelyuseit.Youshoulddescribewhatitdoes andthe<ahref="http://openide.netbeans.org/tutorial/api-design.html#life">stabilitycategory</a> ofthisAPI.Youmayuse <pre> <apitype="export"group="property"name="id"category="private"url="http://..."> descriptionoftheproperty,whereitisused,whatitinfluence,etc. </api> </pre> </hint> </question>
-->
<answer id="exec-property">
<api name="multiview.toolbarVisible" category="devel" group="preferences"type="export">
<p>
The visibility of
<a href="@TOP@/org/netbeans/core/spi/multiview/MultiViewElement.html#getToolbarRepresentation()">toolbar</a>
is controlled by a preference shared with editor module.
The multiview implementation listens and uses following property:
</p>
<pre>
MimeLookup.getLookup(MimePath.EMPTY).lookup(Preferences.class).getBoolean("toolbarVisible", true);
</pre>
<p>
to find out whether all toolbars in all multiviews should be visible or not. Also,
since 1.25, the toolbar is hidden completely. There is a tab switching action
in multi view component popup menu to compensate this.
</p>
</api>
</answer>
<!-- <questionid="perf-limit"when="init"> Arethereanyhard-codedorpracticallimitsinthenumberorsizeof elementsyourcodecanhandle? </question>
-->
<answer id="perf-limit">
Yes, there are practical limits enforced in visual design. Number of different
view elements for one tab (MultiViewTopComponent) must not exceed 7 or 8,
according to the HIE.<br></br>
Data model underneath will not have such limit, will use standard java collections.
</answer>
<!-- <questionid="perf-mem"when="final"> Howmuchmemorydoesyourcomponentconsume?Estimate witharelationtothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
XXX no answer for perf-mem
</answer>
<!-- <questionid="perf-menus"when="final"> Doesyourmoduleusedynamicallyupdatedcontextmenus,or context-sensitiveactionswithcomplicatedenablementlogic? </question>
-->
<answer id="perf-menus">
XXX no answer for perf-menus
</answer>
<!-- <questionid="perf-scale"when="init"> Whichexternalcriteriainfluencetheperformanceofyour program(sizeoffileineditor,numberoffilesinmenu, insourcedirectory,etc.)andhowwellyourcodescales? <hint> Pleaseincludesomeestimates,thereareothermoredetailed questionstoanswerinlaterphasesofimplementation. </hint> </question>
-->
<answer id="perf-scale">
Perfomance of MultiViewTopComponent is influenced by performance of components
that will act as individual MultiViewElements. From what we know today that means
performance of Editor, Form Editor, Component Palette, Property Sheet, VCS Outputs,
To Do list. Also number of view elements affect performance of MultiViewTopComponent.
<br/>
The separation of MultiViewElement and MultiViewDescription interfaces is meant to allow lazy creation of not
visible components and providing them on demand. This should influence first usage performance.
</answer>
<!-- <questionid="perf-spi"when="init"> Howtheperformanceofthepluggedincodewillbeenforced? <hint> Ifyouallowforeigncodetobepluggedintoyourownmodule,how doyouenforcethatitwillbehavecorrectlyandquicklyandwillnot negativelyinfluencetheperformanceofyourownmodule? </hint> </question>
-->
<answer id="perf-spi">
MultiViewTopComponent probably should load just active MultiViewElement completely,
loading inactive view elements lazily.
Javadoc comments in MultiViewElement interface will notify developers to keep
perf-important methods fast executed.
</answer>
<!-- <questionid="perf-startup"when="final"> Doesyourmodulerunanycodeonstartup? </question>
-->
<answer id="perf-startup">
No. Except for deserialization of opened components.
</answer>
<!-- <questionid="resources-read"when="final"> Doesyourmodulereadanyresourcesfromlayers?Forwhatpurpose? <hint> Asthisissomekindofintermoduledependency,itisakindofAPI. Pleasedescribeitandclassifyaccordingto <ahref="http://openide.netbeans.org/tutorial/api-design.html#categories"> commonstabilitycategories</a>. </hint> </question>
-->
<answer id="resources-read">
<p>
<api category="devel" group="branding" name="org.netbeans.core.multiview.MultiViewElement.Spliting.Enabled"type="export">
By default a MultiViewElement allows the containing TopComponent to split it.
Some systems may however find this not of any use. Then they should brand the
<code>MultiViewElement.Spliting.Enabled</code> to <code>false</code>. NetBeans IDE
by default does allow spliting.
</api>
</p>
</answer>
<!-- Copy this above the </api-answers> tag! -->
<!-- <questionid="security-grant"when="final"> Doesyourcodegrantadditionrightstosomecode? <hint>Avoidusingaclassloderthataddssomeextra permissionstoloadedcodeunlessrealynecessary. AlsonotethatyourAPIimplementation canalsoexposeunneededpermissionstoenemycodeby AccessController.doPrilileged()calls.</hint> </question>
-->
<answer id="security-grant">
XXX no answer for security-grant
</answer>
<!-- <questionid="security-policy"when="final"> Doesyourfunctionalityrequirestandardpolicyfilemodification? <hint>Yourcodemaypasscontroltothirdpartycodenot comingfromtrusteddomain.Itcoverscodedownloadedover networkorcodecomingfromlibrariesthatarenotbundled withNetBeans.Whichpermissionsitneedstogranttowhichdomain?</hint> </question>
-->
<answer id="security-policy">
XXX no answer for security-policy
</answer>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.