Examples of MCSProjectNature


Examples of com.volantis.mcs.eclipse.core.MCSProjectNature

    }

    // Javadoc inherited
    public String getPolicyName() {
        IFile file = (IFile) context.getResource();
        MCSProjectNature nature = MCSProjectNature.getMCSProjectNature(getProject());
        IPath policySourcePath = nature.getPolicySourcePath();
        IFolder policySourceFolder = getProject().getFolder(policySourcePath);
        IPath policyRoot = policySourceFolder.getProjectRelativePath();
        IPath policyPath = file.getProjectRelativePath();
        String policyName = null;
        if (policyRoot.isPrefixOf(policyPath)) {
View Full Code Here

Examples of com.volantis.mcs.eclipse.core.MCSProjectNature

     * @param resource The IResource.
     */
    private boolean inPolicySource(IResource resource) {
        boolean result = false;
        try {
            MCSProjectNature mcsNature = (MCSProjectNature)
                    getProject().getNature(MCSProjectNature.NATURE_ID);
            IPath policySource = mcsNature.getPolicySourcePath();
            IPath resourcePath = resource.getFullPath();

            // Prepend the policySource with the path of the project so that
            // we get the right device and prefix that we expect the
            // resourcePath to have.
            IPath projectPath = mcsNature.getProject().getFullPath();
            IPath fullPolicySource = projectPath.append(policySource);
            result = fullPolicySource.isPrefixOf(resourcePath);
        } catch (CoreException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        } catch (IllegalStateException e) {
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.