APISonar


org.netbeans.core.windows.Debug.log

> org > netbeans > core > windows > Debug > log
org APIs netbeans APIs core APIs windows APIs Debug APIs log APIs

Example 1
void log (String s) {
        if (DEBUG) {
            Debug.log(WindowManagerParser.class, s);
        }
    }
Example 2
private void copySettingsFile (FileObject fo) throws IOException {
        if (DEBUG) Debug.log(PersistenceManager.class, "copySettingsFile fo:" + fo);
        FileObject destFolder = getComponentsLocalFolder();
        try {
            fo.copy(destFolder,fo.getName(),fo.getExt());
        } catch (IOException exc) {
            String annotation = NbBundle.getMessage(PersistenceManager.class,
                "EXC_CopyFails", destFolder);
            Exceptions.attachLocalizedMessage(exc, annotation);
            LOG.log(Level.INFO, null, exc);
        }
    }
Example 3
private void removeGroup (final String groupName) {
        if (DEBUG) Debug.log(ModuleChangeHandler.class, "removeGroup group:" + groupName);
        WindowManagerParser wmParser = PersistenceManager.getDefault().getWindowManagerParser();
        wmParser.removeGroup(groupName);
        // #37529 WindowsAPI to be called from AWT thread only.
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                WindowManagerImpl.getInstance().getPersistenceObserver().groupConfigRemoved(groupName);
            }
        });
    }
Example 4
private void deleteLocalTCGroup (String tcGroupName) {
        if (DEBUG) Debug.log(GroupParser.class, "deleteLocalTCGroup" + " group:" + tcGroupName);
        if (localParentFolder == null) {
            return;
        }
        FileObject localGroupFolder = localParentFolder.getFileObject(groupName);
        if (localGroupFolder == null) {
            return;
        }
        FileObject tcGroupFO = localGroupFolder.getFileObject(tcGroupName, PersistenceManager.TCGROUP_EXT);
        if (tcGroupFO != null) {
            PersistenceManager.deleteOneFO(tcGroupFO);
        }
    }
Example 5
private void removeTCRef (final String tcRefName) {
        if (DEBUG) Debug.log(ModuleChangeHandler.class, "removeTCRef tcRefName:" + tcRefName);
        WindowManagerParser wmParser = PersistenceManager.getDefault().getWindowManagerParser();
        if (wmParser.removeTCRef(tcRefName)) {
            // #37529 WindowsAPI to be called from AWT thread only.
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    WindowManagerImpl.getInstance().getPersistenceObserver().topComponentRefConfigRemoved(tcRefName);
                }
            });
        }
    }
Example 6
private void deleteLocalTCRef (String tcRefName) {
        if (DEBUG) Debug.log(ModeParser.class, "deleteLocalTCRef" + " tcRefName:" + tcRefName);
        if (localParentFolder == null) {
            return;
        }
        FileObject localModeFolder = localParentFolder.getFileObject(modeName);
        if (localModeFolder == null) {
            return;
        }
        FileObject tcRefFO = localModeFolder.getFileObject(tcRefName, PersistenceManager.TCREF_EXT);
        if (tcRefFO != null) {
            PersistenceManager.deleteOneFO(tcRefFO);
        }
    }
Example 7
private void addMode (String modeName) {
        if (DEBUG) Debug.log(ModuleChangeHandler.class, "addMode" + " mo:" + modeName);
        WindowManagerParser wmParser = PersistenceManager.getDefault().getWindowManagerParser();
        final ModeConfig modeConfig = wmParser.addMode(modeName);
        if (modeConfig != null) {
            // #37529 WindowsAPI to be called from AWT thread only.
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    WindowManagerImpl.getInstance().getPersistenceObserver().modeConfigAdded(modeConfig);
                }
            });
        }
    }
Example 8
private void readProperties (WindowManagerConfig wmc) throws IOException {
        if (DEBUG) Debug.log(WindowManagerParser.class, "readProperties ENTER");
        PropertyHandler propertyHandler = new PropertyHandler();
        internalConfig = new InternalConfig();
        propertyHandler.readData(wmc, internalConfig);
        if (DEBUG) Debug.log(WindowManagerParser.class, "readProperties LEAVE");
    }
Example 9
private boolean isInGroupsFolder (FileObject fo) {
        FileObject parent = fo.getParent();
        if (parent == null) {
            return false;
        }
        //Change of group config file or group folder
        if (parent.getPath().equals(groupsModuleFolder.getPath())) {
            if (DEBUG) Debug.log(ModuleChangeHandler.class, "++ GROUP ++");
            return true;
        }
        return false;
    }
Example 10
void save (TCGroupConfig tcGroupCfg) throws IOException {
        if (DEBUG) Debug.log(TCGroupParser.class, "save ENTER" + " tcGrp:" + tc_id);
        
        PropertyHandler propertyHandler = new PropertyHandler();
        InternalConfig internalCfg = getInternalConfig();
        propertyHandler.writeData(tcGroupCfg, internalCfg);
        if (DEBUG) Debug.log(TCGroupParser.class, "save LEAVE" + " tcGrp:" + tc_id);
    }
Example 11
void removeMode (String modeName) {
        synchronized (SAVING_LOCK) {
            if (DEBUG) Debug.log(WindowManagerParser.class, "removeMode" + " mo:" + modeName);
            ModeParser modeParser = (ModeParser) modeParserMap.get(modeName);
            if (modeParser != null) {
                modeParser.setInModuleFolder(false);
            }
            //deleteLocalMode(modeName);
        }
    }
Example 12
TCRefConfig load () throws IOException {
        if (DEBUG) Debug.log(TCRefParser.class, "load ENTER" + " tcRef:" + tc_id);
        TCRefConfig tcRefCfg = new TCRefConfig();
        PropertyHandler propertyHandler = new PropertyHandler();
        InternalConfig internalCfg = getInternalConfig();
        internalCfg.clear();
        propertyHandler.readData(tcRefCfg, internalCfg);
        if (DEBUG) Debug.log(TCRefParser.class, "load LEAVE" + " tcRef:" + tc_id);
        return tcRefCfg;
    }
Example 13
private void writeProperties (GroupConfig sc) throws IOException {
        if (DEBUG) Debug.log(GroupParser.class, "writeProperties ENTER" + " group:" + getName());
        PropertyHandler propertyHandler = new PropertyHandler();
        InternalConfig internalCfg = getInternalConfig();
        propertyHandler.writeData(sc, internalCfg);
        if (DEBUG) Debug.log(GroupParser.class, "writeProperties LEAVE" + " group:" + getName());
    }
Example 14
ModeParser findModeParser (String tcRefName) {
        if (DEBUG) Debug.log(WindowManagerParser.class, "findModeParser ENTER" + " tcRef:" + tcRefName);
        for (Iterator it = modeParserMap.keySet().iterator(); it.hasNext(); ) {
            ModeParser modeParser = (ModeParser) modeParserMap.get(it.next());
            TCRefParser tcRefParser = modeParser.findTCRefParser(tcRefName);
            if (tcRefParser != null) {
                return modeParser;
            }
        }
        return null;
    }
Example 15
private void removeMode (final String modeName) {
        if (DEBUG) Debug.log(ModuleChangeHandler.class, "removeMode mo:" + modeName);
        WindowManagerParser wmParser = PersistenceManager.getDefault().getWindowManagerParser();
        wmParser.removeMode(modeName);
        //Mode is not removed from model because it can already contain TCs added
        //by user using GUI eg.D&D.
        // #37529 WindowsAPI to be called from AWT thread only.
        //SwingUtilities.invokeLater(new Runnable() {
        //    public void run() {
        //      WindowManagerImpl.getInstance().getPersistenceObserver().modeConfigRemoved(modeName);
        //    }
        //});
    }