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
示例#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
示例#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
示例#4
0
def in_workspace(context):
    return IWorkspaceFolder.providedBy(parent_workspace(context))
示例#5
0
def in_workspace(context):
    return IWorkspaceFolder.providedBy(parent_workspace(context))