def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating if not isinstance(context.application.cache.node, ConscanResults): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating if len(context.application.cache.children) == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating if len(context.application.cache.nodes) == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating if context.application.main is None: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False if len(context.application.cache.nodes) == 0: return False if context.application.cache.some_nodes_without_children_fixed: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) own tests if len(context.application.cache.nodes) == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating # C) passed all tests: return True
def analyze_selection(): if not Immediate.analyze_selection(): return False cache = context.application.cache if len(cache.nodes) < 2: return False Frame = context.application.plugins.get_node("Frame") for cls in cache.classes: if not issubclass(cls, Frame): return False return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating redo_stack = context.application.action_manager.redo_stack if len(redo_stack) == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating for Class in context.application.cache.classes: if not issubclass(Class, SavedSelection): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating undo_stack = context.application.action_manager.undo_stack if len(undo_stack) == 0: return False # C) passed all tests: return True
def analyze_selection(parameters=None): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating universe = context.application.model.universe if sum(universe.cell.active) == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if cache.some_nodes_fixed: return False if not isinstance(cache.parent, ContainerMixin): return False # D) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating last_action = context.application.action_manager.last_action if last_action is None: return False if not last_action.want_repeat(): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestors if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if cache.some_nodes_fixed: return False if len(cache.transformed_nodes) == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating parents = context.application.cache.parents if len(parents) == 0: return False if len(parents) == 1 and parents[0] is None: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating if not isinstance(context.application.cache.node, GLContainerMixin): return False if len(context.application.cache.node.children) == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if not isinstance(cache.node, ContainerMixin): return False clipboard = gtk.clipboard_get() if not clipboard.wait_is_target_available("ZML"): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache for cls in cache.classes: if not issubclass(cls, Spring): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestors if not Immediate.analyze_selection(): return False # B) validating node = context.application.cache.node Universe = context.application.plugins.get_node("Universe") if not isinstance(node, Universe): return False if node.cell.active.sum() == 0: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if len(cache.nodes) != 2: return False if len(cache.translations) != 2: return False if cache.common_parent is None: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if len(cache.nodes) == 0: return False for cls in cache.classes: if issubclass(cls, Reference): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if len(cache.nodes) < 3: return False if len(cache.translations) < 3: return False if cache.common_parent is None: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestors if not Immediate.analyze_selection(): return False # B) validating node = context.application.cache.node Universe = context.application.plugins.get_node("Universe") if not isinstance(node, Universe): return False if node.cell_active.sum() == 0: return False # C) passed all tests: return True
def analyze_selection(AddModelObject): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating # first check wether the nodes parameter is ok: # only one node and it should accept the an AddModelObject node = context.application.cache.node if not isinstance(node, ContainerMixin): return False if not node.check_add(AddModelObject): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if len(cache.nodes) < 1: return False if len(cache.nodes) + sum(context.application.model.universe.cell.active) > 3: return False for Class in cache.classes: if not issubclass(Class, Vector): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache transformed_nodes = cache.transformed_nodes translated_nodes = cache.translated_nodes if len(transformed_nodes) == 0: return False if (len(translated_nodes) == 1) and (len(cache.rotated_nodes) == 0): return False if some_fixed(transformed_nodes): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating & initializing node = context.application.cache.node Frame = context.application.plugins.get_node("Frame") if not Frame.check_add(node.__class__): return False if node.get_fixed(): return False if not isinstance(node, GLTransformationMixin): return False if not node.parent.check_add(Frame): return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if len(cache.nodes) < 1: return False if len(cache.nodes) + sum( context.application.model.universe.cell.active) > 3: return False for Class in cache.classes: if not issubclass(Class, Vector): return False # C) passed all tests: return True
def analyze_selection(NewParentClass): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache old_parent = cache.parent if old_parent is None: return False if not isinstance(old_parent, ContainerMixin): return False if not old_parent.check_add(NewParentClass): return False if cache.some_nodes_fixed: return False for Class in cache.classes: if not NewParentClass.check_add(Class): return False # C) Passed all tests return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache if cache.node is None: return False contains_atoms = False for cls in cache.child_classes: if issubclass(cls, Atom): contains_atoms = True break if not contains_atoms: return False # C) passed all tests return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache old_parent = cache.parent if old_parent is None: return False new_parent = old_parent.parent if new_parent is None: return False if cache.some_nodes_fixed: return False for Class in cache.classes: if not new_parent.check_add(Class): return False # C) passed all tests return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache new_parent = cache.parent if new_parent is None: return False for Class in cache.classes: if not issubclass(Class, ContainerMixin): return False if cache.some_children_fixed: return False for Class in cache.child_classes: if not new_parent.check_add(Class): return False # C) passed all tests return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating and initialising cache = context.application.cache if len(cache.nodes) == 0: return False if len(cache.translations) == 0: return False parent = cache.common_parent if parent == None: return False while not parent.check_add(Point): parent = parent.parent if parent == None: return False # C) passed all tests: return True
def analyze_selection(): # A) calling ancestor if not Immediate.analyze_selection(): return False # B) validating cache = context.application.cache Atom = context.application.plugins.get_node("Atom") if not isinstance(cache.node, GLContainerMixin): return False some_atoms = False for cls in cache.child_classes: if issubclass(cls, Atom): some_atoms = True break if not some_atoms: return False # C) passed all tests: return True
def analyze_selection(): if not Immediate.analyze_selection(): return False if len(context.application.cache.nodes) == 0: return False return True
def analyze_selection(): if not Immediate.analyze_selection(): return False if not isinstance(context.application.cache.node, ContainerMixin): return False return True