Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IScriptFolder


        try {

            ScriptFolder bundleFolder = findBundleFolder(bundle, project);
            IPath relative = new Path("Resources/views/" + controller.replace("Controller", ""));
            IPath path = bundleFolder.getPath().append(relative);
            IScriptFolder sfolder = project.findScriptFolder(path);

            if (sfolder != null && sfolder.exists() && sfolder.hasChildren()) {
                return sfolder.getChildren();
            }

        } catch (Exception e) {
            Logger.logException(e);
        }
View Full Code Here


    public IModelElement[] findRootTemplates(IScriptProject scriptProject) {

        try {

            IPath path = scriptProject.getPath().append(new Path("app/Resources/views"));
            IScriptFolder sfolder = scriptProject.findScriptFolder(path);

            if (sfolder != null && sfolder.exists() && sfolder.hasChildren()) {
                return sfolder.getChildren();
            }

        } catch (Exception e) {
            Logger.logException(e);
        }
View Full Code Here

        try {

            ScriptFolder bundleFolder = findBundleFolder(bundle, project);
            IPath path = new Path("Resources/views/");
            IPath viewPath = bundleFolder.getPath().append(path);
            IScriptFolder sfolder = project.findScriptFolder(viewPath);

            if (sfolder != null && sfolder.exists() && sfolder.hasChildren()) {
                return sfolder.getChildren();
            }

        } catch (Exception e) {
            Logger.logException(e);
        }
View Full Code Here


            if (viewPath.isRoot()) {

                IPath path = project.getPath().append(new Path("app/Resources/views"));
                IScriptFolder sfolder = project.findScriptFolder(path);

                if (sfolder != null) {
                    return sfolder.getSourceModule(template);
                }
            } else if (viewPath.isBundleBasePath()) {

                ScriptFolder bundleFolder = findBundleFolder(bundle, project);

                if (bundleFolder == null)
                    return null;

                IScriptFolder viewFolder = project.findScriptFolder(bundleFolder.getPath().append(new Path("Resources/views")));

                if (viewFolder != null) {
                    return viewFolder.getSourceModule(template);
                }

            } else {

                if (bundle == null || controller == null)
                    return null;

                ScriptFolder bundleFolder = findBundleFolder(bundle, project);
                IPath path = new Path("Resources/views/" + controller.replace("Controller", ""));
                IPath iPath = bundleFolder.getPath().append(path);
                IScriptFolder sfolder = project.findScriptFolder(iPath);

                if (sfolder != null) {
                    return sfolder.getSourceModule(template);
                }
            }


        } catch (Exception e) {
View Full Code Here

        String bundle = string.replace("@", "");
        // split at camelcase
        //        String[] parts = bundle.split("(?<!^)(?=[A-Z])");

        IScriptFolder folder = findBundleFolder(bundle, project);


        if (folder != null)
            return folder.getPath();

        return null;

    }
View Full Code Here

            if (obj instanceof IScriptFolder) {

                Logger.debugMSG("Selection is scriptfolder");

                IScriptFolder folder = (IScriptFolder) obj;
                try {
                    String fullPath = folder.getUnderlyingResource().getFullPath().toString();
                    Logger.debugMSG("Setting container text to " + fullPath);
                    containerText.setText(fullPath);
                } catch (ModelException e) {
                    Logger.logException(e);
                }
            } else if (obj instanceof ProjectFragment) {

                IProjectFragment fragment = (IProjectFragment) obj;
                Logger.debugMSG("Selection is projectfragment");

                try {
                    String fullPath = fragment.getUnderlyingResource().getFullPath().toString();
                    Logger.debugMSG("Setting container text to " + fullPath);
                    containerText.setText(fullPath);
                } catch (ModelException e) {
                    Logger.logException(e);
                }

            } else if (obj instanceof IScriptProject) {
                IScriptProject proj = (IScriptProject) obj;
                Logger.debugMSG("Selection is scriptproject");
                containerText.setText(proj.getPath().toString());

            } else if (obj instanceof IFolder) {
                IFolder folder = (IFolder) obj;
                Logger.debugMSG("Selection is folder");
                containerText.setText(folder.getFullPath().toString());
            } else {
                Logger.debugMSG("Could not determine selection type");
                if (obj != null) {
                    Logger.debugMSG("type was " + obj.getClass());
                } else {
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.IScriptFolder

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.