[platform-dev] Re: Hiding source and history views in MultiView editor

  • From: "Mark J. Koch" < >
  • To:
  • Subject: [platform-dev] Re: Hiding source and history views in MultiView editor
  • Date: Mon, 29 Oct 2012 12:24:31 -0700

Thanks Benno! Looking at the generated layer xml definitely helped me get a new perspective on this.

I managed to replace the "Source" view function with my visual editor by adding this createEditor method in my DataObject class:

    @MIMEResolver.Registration(displayName="#CTL_ProjectFile",
            resource="/com/foo/bar/ProjectResolver.xml",
            position=1000
            )

    @MultiViewElement.Registration(displayName = "#LBL_Project_EDITOR",
    iconBase = "com/foo/bar/project/icons/display-node.png",
    mimeType = "application/vnd.foo.bar+xml",
    persistenceType = TopComponent.PERSISTENCE_NEVER,
    preferredID = "Project",
    position = 2000)
@Messages({"LBL_Project_EDITOR=Page Editor","CTL_ProjectFile=ProjectFile"})

    public static MultiViewElement createEditor(Lookup lkp) {

        return new ProjectVisualElement(lkp);
    }


But the generated layer/xml has no references to the History button registration. I will hunt through the NB source to see where the History button gets added in.


Mark




On 10/29/12 12:00 PM, Benno Markiewicz wrote:
Only a idea (i have not tried it yet):  Find out the xml-code in the
layer.xml which registers the specific multiviews. Then copy the
registering xml-code into a own layer.xml and add "_hidden" to their name.
See http://wiki.netbeans.org/DevFaqSwitchingMenusByContext

Greetings markiewb

Am 29.10.2012 19:35, schrieb Mark J. Koch:
I have an editor that is graphical but backed up by actual XML code in
the DataObject.  But in our app we don't want the user to see the XML
source editor nor the history viewer either.  However, I am using
other features in the MultiView editor like toolbar and cookies. I may
also add more graphical views in the future.

The source and history views seem to be present by default.

Is there a way to completely hide the 'source' and 'history' views in
a MultiView editor?


Mark




[platform-dev] Hiding source and history views in MultiView editor

Mark J. Koch 10/29/2012

[platform-dev] Re: Hiding source and history views in MultiView editor

Benno Markiewicz 10/29/2012

[platform-dev] Re: Hiding source and history views in MultiView editor

Mark J. Koch 10/29/2012

Project Features

Project Links

About this Project

Platform was started in November 2009, is owned by Antonin Nebuzelsky, and has 138 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close