Package org.netbeans.modules.php.wordpress.modules

Examples of org.netbeans.modules.php.wordpress.modules.WordPressModule


        WordPressVersion version = VERSIONS.get(phpModule);
        if (version != null) {
            return version;
        }

        WordPressModule wpModule = WordPressModule.Factory.forPhpModule(phpModule);
        FileObject versionFile = wpModule.getVersionFile();
        if (versionFile == null) {
            return null;
        }

        String versionNumber = WPUtils.getVersion(versionFile);
View Full Code Here


     * @param command command name
     * @return result
     */
    private List<String> getStatus(String command, PhpModule phpModule) {
        HelpLineProcessor lineProcessor = new HelpLineProcessor();
        WordPressModule wpModule = WordPressModule.Factory.forPhpModule(phpModule);
        FileObject root = wpModule.getWordPressRootDirecotry();
        if (root == null) {
            lineProcessor.asLines();
        }

        Future<Integer> result = createExecutable()
View Full Code Here

     *
     * @param phpModule
     * @return PhpExecutable
     */
    private PhpExecutable getExecutable(PhpModule phpModule) {
        WordPressModule wpModule = WordPressModule.Factory.forPhpModule(phpModule);
        FileObject wordPressRootDirectory = wpModule.getWordPressRootDirecotry();
        if (wordPressRootDirectory == null) {
            return null;
        }
        return createExecutable()
                .workDir(FileUtil.toFile(wordPressRootDirectory));
View Full Code Here

            return;
        }
        themes.clear();

        // get themes directory
        WordPressModule wpModule = WordPressModule.Factory.forPhpModule(phpModule);
        if (wpModule == null) {
            return;
        }
        final FileObject themesDirectory = wpModule.getThemesDirectory();
        if (themesDirectory == null) {
            return;
        }
        for (FileObject child : themesDirectory.getChildren()) {
            if (child.isFolder()) {
View Full Code Here

        String themes = getPanel().getThemesDirectory();
        if (!originalCustomeContentName.equals(themes)) {
            WordPressPreferences.setThemesPath(phpModule, themes);
        }

        WordPressModule wpModule = WordPressModule.Factory.forPhpModule(phpModule);
        wpModule.notifyPropertyChanged(new PropertyChangeEvent(this, WordPressModule.PROPERTY_CHANGE_WP, null, null));
        return EnumSet.of(Change.FRAMEWORK_CHANGE);
    }
View Full Code Here

     * Write config file.
     *
     * @param debugLv true or false
     */
    private void writeConfig(final String debugLv) {
        WordPressModule wpModule = WordPressModule.Factory.forPhpModule(phpModule);
        FileObject config = wpModule.getDirecotry(DIR_TYPE.ROOT, WP_CONFIG_PHP);
        if (config == null) {
            LOGGER.log(Level.WARNING, "Not found wp-config.php");
            return;
        }
        try {
View Full Code Here

    }

    @Override
    public File[] getConfigurationFiles(PhpModule pm) {
        List<File> files = new LinkedList<File>();
        WordPressModule wpModuel = WordPressModule.Factory.forPhpModule(pm);
        FileObject wordPressRoot = wpModuel.getWordPressRootDirecotry();
        if (wordPressRoot != null) {
            FileObject config = wordPressRoot.getFileObject("wp-config.php"); // NOI18N
            if (config != null) {
                files.add(FileUtil.toFile(config));
            }
View Full Code Here

            }

            @Override
            public void actionPerformed(ActionEvent e) {
                WordPressPreferences.setEnabled(phpModule, true);
                WordPressModule module = WordPressModule.Factory.forPhpModule(phpModule);
                module.notifyPropertyChanged(new PropertyChangeEvent(this, WordPressModule.PROPERTY_CHANGE_WP, null, null));
                phpModule.notifyPropertyChanged(new PropertyChangeEvent(this, PhpModule.PROPERTY_FRAMEWORKS, null, null));
                notification.clear();
            }
View Full Code Here

        @Override
        public List<Node> keys() {
            if (WPUtils.isWP(phpModule)) {
                List<Node> list = new ArrayList<Node>();
                WordPressModule module = WordPressModule.Factory.forPhpModule(phpModule);
                // plugins
                FileObject pluginsDirectory = module.getPluginsDirectory();
                if (pluginsDirectory != null) {
                    addNode(list, pluginsDirectory);
                }
                // themes
                FileObject themesDirectory = module.getThemesDirectory();
                if (themesDirectory != null) {
                    addNode(list, themesDirectory);
                }
                return list;
            }
View Full Code Here

            return null;
        }

        @Override
        public void addNotify() {
            WordPressModule wpModule = WordPressModule.Factory.forPhpModule(phpModule);
            wpModule.addPropertyChangeListener(this);
        }
View Full Code Here

TOP

Related Classes of org.netbeans.modules.php.wordpress.modules.WordPressModule

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.