Re: Use MultiView APIs

geertjan wielenga <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Organization Oracle Corporation
Message-ID <[email protected]>
Is the source code on GitHub or somewhere like that? Would be happy to 
help you, but need more context than the below, i.e., ideally the full 
source code.

Gj

On 14-7-2016 19:30, Nuwan Sameera wrote:
> Hi all,
>
> I am developing netbeans plugin for apache syncope. I need to open 
> editors in different tabs in same instance like SOURCE and HISTORY. I 
> am tried to using following code.
>
> MultiViewDescription[] descriptionArray = new MultiViewDescription[0];
> descriptionArray[0] = new MultiViewDescription() {
>             @Override
>             public int getPersistenceType() {
>                 return 0;
>             }
>
>             @Override
>             public String getDisplayName() {
>                 return "Test 1";
>             }
>
>             @Override
>             public Image getIcon() {
>                 return null;
>             }
>
>             @Override
>             public HelpCtx getHelpCtx() {
>                 return null;
>             }
>
>             @Override
>             public String preferredID() {
>                 return "A";
>             }
>
>             @Override
>             public MultiViewElement createElement() {
>                 return new MultiViewEditorElement(Lookup.EMPTY); 
> *//GIVEN RUNTIME ERROR
> *
>             }
> };
>
> TopComponent ctc = MultiViewFactory.createMultiView(descriptionArray, 
> descriptionArray[0]);
> ctc.open();
> ctc.requestActive();
>
> *//GIVEN RUNTIME ERROR Line give *|IllegalArgumentException 
> <http://download.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true> 
> saying |||CloneableEditorSupport| 
> <http://bits.netbeans.org/8.0/javadoc/org-openide-text/org/openide/text/CloneableEditorSupport.html?is-external=true> 
> is not present in provided |Lookup| 
> <http://bits.netbeans.org/8.0/javadoc/org-openide-util/org/openide/util/Lookup.html?is-external=true>.
>
> |
> |I search method to create Lookup object with ClonableEditorSupport. I 
> don't found suitable solution.
>
> |
> |Please help me.
>
> |
> |Thanks and Regards. |
> -- 
> Nuwan Sameera.
> Undergraduate,
> Electronic and Telecommunication Engineering,
> University of Moratuwa.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.