예제 #1
0
    def _finished_fired(self):
        """ This will just create a file at the location specified in the
            wizard pages.  Override this method in a subclass for other
            resource types.
        """
        container_page = self.pages[0]
        resource_page = self.pages[1]

        resource = File(resource_page.abs_path)
        resource.create_file()

        self._open_resource(file)
        # FIXME: Refresh the parent folder not the whole tree
        workspace = self.window.application.get_service(IWorkspace)
        self._refresh_container(workspace)
예제 #2
0
    def _finished_fired(self):
        """ Performs the file resource creation if the wizard is
        finished successfully.

        """

        csp = self.pages[0]
        fwp = self.pages[1]

        file = File(fwp.abs_path)
        file.create_file()

        # Refresh the workspace tree view
        view = self.window.get_view_by_id(RESOURCE_VIEW)
        if view is not None:
            # FIXME: Refresh the parent folder, not the whole tree.
            workspace = self.window.application.get_service(IWorkspace)
            wtv = view.tree_viewer.refresh(workspace)