Package org.locationtech.udig.project.internal

Examples of org.locationtech.udig.project.internal.Project.eResource()


                    ProjectPackage.PROJECT_REGISTRY__PROJECTS);
        }

        for (Iterator<Project> iter = projects.iterator(); iter.hasNext();) {
            Project project = iter.next();
            if (project.eResource() == null) {
                iter.remove(); // delete this one its resource is missing
            }
        }
        return projects;
    }
View Full Code Here


                public void run( IProgressMonitor monitor ) throws InvocationTargetException,
                        InterruptedException {
                    Project p = page.getProjectInternal();
                    try {
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }
                            saveAndUnload();
                        } else {
                            saveAndUnload();
View Full Code Here

                public void run( IProgressMonitor monitor ) throws InvocationTargetException,
                        InterruptedException {
                    Project p = page.getProjectInternal();
                    try {
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }
                            saveAndUnload();
                        } else {
                            saveAndUnload();
View Full Code Here

                        InterruptedException {
                    Project p = page.getProjectInternal();
                    try {
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }
                            saveAndUnload();
                        } else {
                            saveAndUnload();
                        }
View Full Code Here

                    public void run() throws Exception {

                        removeTemporaryLayers(store);
                        Project p = getMap().getProjectInternal();
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }

                            final Resource resource = getMap().eResource();
                            resource.save(ProjectPlugin.getPlugin().saveOptions);
View Full Code Here

                    public void run() throws Exception {

                        removeTemporaryLayers(store);
                        Project p = getMap().getProjectInternal();
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }

                            final Resource resource = getMap().eResource();
                            resource.save(ProjectPlugin.getPlugin().saveOptions);
View Full Code Here

                        removeTemporaryLayers(store);
                        Project p = getMap().getProjectInternal();
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }

                            final Resource resource = getMap().eResource();
                            resource.save(ProjectPlugin.getPlugin().saveOptions);
View Full Code Here

            projectPath = projectPath.substring(0, projectPath.length() - 2);
        }
        Project project = ProjectPlugin.getPlugin().getProjectRegistry()
                .getProject(projectPath + File.separator + projectName + ".udig"); //$NON-NLS-1$ //$NON-NLS-2$
        project.setName(projectName);
        Resource projectResource = project.eResource();
        try {
            projectResource.save(Collections.EMPTY_MAP);
        } catch (IOException e) {
            ProjectUIPlugin.log(
                    "Error during saving the project file of an anew created project", e); //$NON-NLS-1$
View Full Code Here

        MapReference ref = null;
        if (!mapReferences.containsKey(map.getID())) {
            // TODO fix this when IProject has a getID() method
            Project project = (Project) map.getProject();
            if (project != null) {
                URI projectURI = project.eResource().getURI();
                ref = new MapReference(map.getID(), projectURI, map.getName());
                mapReferences.put(map.getID(), ref);
            }
        } else {
            ref = mapReferences.get(map.getID());
View Full Code Here

                    public void run() throws Exception {

                        removeTemporaryLayers(store);
                        Project p = getMap().getProjectInternal();
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }
                           
                            /*
                             * when closing a map the platform wants to save the map resource,
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.