Package org.apache.tools.ant.gui.xml

Examples of org.apache.tools.ant.gui.xml.DOMDocument


        ACSProjectElement project = null;
        try {
            DOMNodeManager manager =
                new DOMNodeManager(_elementMap);
           
            DOMDocument doc = manager.parse(stream);
            project = (ACSProjectElement) doc.getDocumentElement();
           
        } catch (SAXException se) {
            se.printStackTrace();
            throw new IOException(se.getMessage());
        } catch (ParserConfigurationException pce) {
View Full Code Here


     * Remove the given project from the set of active projects.
     *
     * @param project Project to close.
     */
    public boolean close(ACSProjectElement project) throws IOException {
        DOMDocument doc = project.getOwnerDocument();

        // Check to see is the project has been modified and
        // ask the user if they would like to save it before
        // closing.
        int select = JOptionPane.NO_OPTION;
        if (doc.isModified()) {
            select = JOptionPane.showConfirmDialog(null,
                    project.getDisplayName() +
                    " has been modified.\n\nWould you like to save it?\n\n",
                    "Save Modified Project",
                    JOptionPane.YES_NO_CANCEL_OPTION);
        }
       
        if (select == JOptionPane.YES_OPTION) {
           
            // Try to save the project
            SaveCmd cmd = new SaveCmd(_context);
            cmd.run();
           
            // If it is still modified, then the save was canceled.
            if (doc.isModified()) {
                select = JOptionPane.CANCEL_OPTION;
            }
        }
       
        if (select != JOptionPane.CANCEL_OPTION) {
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.gui.xml.DOMDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.