Examples of PhpModule


Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

    @Override
    public RunCommandAction getRunCommandAction() {
        // check whether yiic.php exists
        // if it doesn't exist, doesn't add this action
        PhpModule phpModule = PhpModule.Factory.inferPhpModule();
        YiiModule yiiModule = YiiModuleFactory.create(phpModule);
        FileObject webroot = yiiModule.getWebroot();
        if (webroot == null) {
            return null;
        }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

        this.phpModule = new WeakReference<PhpModule>(phpModule);
    }

    @Override
    protected String getHelpInternal() {
        PhpModule module = phpModule.get();
        if (module == null) {
            return ""; // NOI18N
        }
        try {
            return YiiScript.forPhpModule(module, false).getHelp(module, getCommands());
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

                UiUtils.open(view, DEFAULT_OFFSET);
                return true;
            }

            // create view file automatically
            PhpModule phpModule = PhpModule.Factory.forFileObject(controller);
            if (YiiPreferences.useAutoCreateView(phpModule) && !YiiPreferences.isFallbackToDefaultViews(phpModule)) {
                view = support.createView();
            }

            if (view != null) {
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

    @NbBundle.Messages("LBL_NotFoundViewFileMessage=Doesn't exist a file yet. If you click this link, a new empty view file will be created.")
    @Override
    public String getTooltipText(Document doc, int offset, HyperlinkType type) {
        String viewPath = ""; // NOI18N
        if (view != null) {
            PhpModule phpModule = PhpModule.Factory.forFileObject(view);
            YiiModule yiiModule = YiiModuleFactory.create(phpModule);
            FileObject webrootDirectory = yiiModule.getWebroot();
            if (webrootDirectory != null) {
                viewPath = FileUtil.getRelativePath(webrootDirectory, view);
            } else {
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

    private boolean isYii(Document doc) {
        FileObject fileObject = YiiDocUtils.getFileObject(doc);
        if (fileObject == null) {
            return false;
        }
        PhpModule phpModule = PhpModule.Factory.forFileObject(fileObject);
        return YiiUtils.isYii(phpModule);
    }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

        // set span
        targetStart = ts.offset() + 1;
        targetEnd = targetStart + target.length();

        // create go to items
        PhpModule phpModule = PhpModule.Factory.inferPhpModule();
        goToItems = createGoToItems(phpModule, doc, offset);
        return !goToItems.isEmpty();
    }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

        FileObject fileObject = NbEditorUtilities.getFileObject(doc);
        if (fileObject == null) {
            return null;
        }

        PhpModule phpModule = PhpModule.Factory.forFileObject(fileObject);
        if (!YiiUtils.isYii(phpModule)) {
            return null;
        }
        return createTask(queryType, component, phpModule);
    }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

            });
        } catch (ParseException ex) {
            Exceptions.printStackTrace(ex);
        }

        final PhpModule pm = phpModule;
        runAction(params, pm, controllerId, actionId);

    }
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

    public JMenuItem getPopupPresenter() {
        // get current editor
        JTextComponent editor = EditorRegistry.lastFocusedComponent();
        if (editor != null) {
            FileObject fileObject = YiiDocUtils.getFileObject(editor.getDocument());
            PhpModule phpModule = PhpModule.Factory.forFileObject(fileObject);
            if (YiiUtils.isYii(phpModule)) {
                // set menu
                JMenu menu = new JMenu(Bundle.LBL_Yii());
                menu.add(new JMenuItem(YiiRunActionAction.getInstance()));
                return menu;
View Full Code Here

Examples of org.netbeans.modules.php.api.phpmodule.PhpModule

     * @see
     * http://www.yiiframework.com/doc/api/1.1/CController#resolveViewFile-detail
     * @return file if file exists, otherwise null.
     */
    public static FileObject getAbsoluteViewFile(String targetPath, FileObject currentFile) {
        PhpModule phpModule = PhpModule.Factory.forFileObject(currentFile);
        YiiModule yiiModule = YiiModuleFactory.create(phpModule);
        // get absolute view within the application
        if (targetPath.startsWith(APP_PATH_PREFIX)) { // NOI18N
            targetPath = targetPath.replaceFirst(MODULE_PATH_PREFIX, ""); // NOI18N
            targetPath = String.format(VIEW_PATH_FORMAT, targetPath);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.