Includes problem

public boolean includes(String s) {
            try {
                logger.info("include:{}",s);
                String[] idData = s.split(",");

I call mergePerspective s == “ccontrol center”,this is not idData.

@Override
    public void forkPerspective(String name) {
        try {
            logger.info("??????:{}...", name);
            CControlPerspective ccp = control.getPerspectives();
            if (ccp != null) {
                CPerspective cp = ccp.getPerspective(name);
                if (cp != null) {
                    XElement xElement = new XElement(name);
                    ccp.writeXML(xElement, cp);
                    XIO.write(xElement, new FileOutputStream(new File(LocalStore.getLoginUserPath() + "/" + name + ".xml")), "UTF-8");
                    logger.info("??????:{}??", name);
                } else {
                    logger.error("CPerspective==null");
                }
            } else {
                logger.error("CControlPerspective==null");
            }
        } catch (Throwable t) {
            logger.error("??????????", t);
        }
    }


@Override
    public void mergePerspective(String name) {
        try {
            logger.info("??????:{}...", name);
            CControlPerspective ccp = control.getPerspectives();
            if (ccp != null) {
                XElement xElement = XIO.read(new FileInputStream(new File(LocalStore.getLoginUserPath() + "/" + name + ".xml")), "UTF-8");
                CPerspective cp = ccp.readXML(xElement);
                ccp.setPerspective(xElement.getName(), cp);
                this.control.load(xElement.getName());
                logger.info("??????:{}??", name);
            } else {
                logger.error("CControlPerspective==null");
            }
        } catch (Throwable t) {
            logger.error("??????????", t);
        }
    }

Sorry, my English is very bad.

Sorry, I have no idea what your question is.

  • What are you doing?
  • What are you calling?
  • What do you expect to happen?
  • What happens?
  • Where is the difference between what happens and what you hopped would happen?

includes callback function

public boolean includes(String s) {
The s is “ccontrol center”,but my view have no this id.
}

when
[ol]
[li]CPerspective cp = ccp.readXML(xElement);[/li][li]ccp.setPerspective(xElement.getName(), cp);[/li][li]this.control.load(xElement.getName());[/li][/ol]happen

  1. I call mergePerspective (this is my function,code is above)
  2. includes(String s) ,the s == “ccontrol center”.
  3. the “ccontrol center” is not my view ID. but includes(String s) parameter is “ccontrol center”.

I can solve restore the original layout by forkPerspective,mergePerspective.

If there is no independent import and export perspective,
then I can not be Implement forkPerspective and mergePerspective.

Sorry for not responding yesterday.

A perspective consists of the Dockables you registered and the root-CStations that are created by the framework. “ccontrol center” is one of the root stations. It is the one root station that is in the middle of the default CContentArea.

So this is no bug. This is how the framework is supposed to behave.

ok,I will ignore the “ccontrol center”.
Thanks.