def workspace(self):
     # Attempt to acquire the current workspace
     if IWorkspaceFolder.providedBy(self.context):
         return self.context
     for parent in aq_chain(self.context):
         if IWorkspaceFolder.providedBy(parent):
             return parent
Example #2
0
def parent_workspace(context):
    """ Return containing workspace
        Returns None if not found.
    """
    if IWorkspaceFolder.providedBy(context):
        return context
    for parent in aq_chain(context):
        if IWorkspaceFolder.providedBy(parent):
            return parent
Example #3
0
def parent_workspace(context):
    """ Return containing workspace
        Returns None if not found.
    """
    if IWorkspaceFolder.providedBy(context):
        return context
    for parent in aq_chain(context):
        if IWorkspaceFolder.providedBy(parent):
            return parent
Example #4
0
def in_workspace(context):
    return IWorkspaceFolder.providedBy(parent_workspace(context))
Example #5
0
def in_workspace(context):
    return IWorkspaceFolder.providedBy(parent_workspace(context))