Fixed typos on adapters folder and some on diagram
This commit is contained in:
parent
e867d1c57a
commit
cba94f83f4
@ -30,7 +30,7 @@ Example: ElementFactory
|
||||
A nice example is the ElementFactory. Currently it is tightly bound to the
|
||||
gaphor.UML module. A default factory is created in __init__.py.
|
||||
|
||||
It depends on the undo_manager. However, on important events events are emited.
|
||||
It depends on the undo_manager. However, on important events, events are emitted.
|
||||
(That is when an element is created/destroyed).
|
||||
|
||||
What you want to do is create an event handler for ElementFactory that stores
|
||||
|
@ -73,7 +73,7 @@ def main():
|
||||
includes a Gaphor model to load.
|
||||
|
||||
The application is then initialized, passing along the option parser. This
|
||||
provides and plugins and services with access to the command line options
|
||||
provides plugins and services with access to the command line options
|
||||
and may add their own."""
|
||||
|
||||
parser = OptionParser()
|
||||
|
@ -153,7 +153,7 @@ def build_action_group(obj, name=None):
|
||||
for attrname in dir(obj):
|
||||
try:
|
||||
# Fetch the methods from the object's type instead of the object
|
||||
# itself. This prevents some desciptors (mainly gaphor.core.inject)
|
||||
# itself. This prevents some descriptors (mainly gaphor.core.inject)
|
||||
# from executing.
|
||||
# Otherwise stuff like dependency resolving (=inject) may kick in
|
||||
# too early.
|
||||
|
@ -129,7 +129,7 @@ class FlowForkDecisionNodeConnect(FlowConnect):
|
||||
|
||||
def combine_nodes(self):
|
||||
"""
|
||||
Combine join/fork or decision/methe nodes into one diagram item.
|
||||
Combine join/fork or decision/merge nodes into one diagram item.
|
||||
"""
|
||||
fork_node_cls = self.fork_node_cls
|
||||
join_node_cls = self.join_node_cls
|
||||
@ -194,7 +194,7 @@ class FlowForkDecisionNodeConnect(FlowConnect):
|
||||
"""
|
||||
In addition to a subject connect, the subject of the element may
|
||||
be changed.
|
||||
For readability, parameters are named afther the classes used by
|
||||
For readability, parameters are named after the classes used by
|
||||
Join/Fork nodes.
|
||||
"""
|
||||
super(FlowForkDecisionNodeConnect, self).connect_subject(handle)
|
||||
|
@ -111,7 +111,7 @@ LINES = (items.ImplementationItem,
|
||||
class FoldedInterfaceMultipleLinesTestCase(TestCase):
|
||||
"""
|
||||
Test connection of additional diagram lines to folded interface,
|
||||
which has already usage depenendency or implementation connected.
|
||||
which has already usage dependency or implementation connected.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(FoldedInterfaceMultipleLinesTestCase, self).setUp()
|
||||
|
@ -278,7 +278,7 @@ class AssemblyConnectorTestCase(TestCase):
|
||||
"""
|
||||
def create_interfaces(self, *args):
|
||||
"""
|
||||
Generate interfaces with names sepecified by arguments.
|
||||
Generate interfaces with names specified by arguments.
|
||||
|
||||
:Paramters:
|
||||
args
|
||||
|
@ -168,7 +168,7 @@ class CommentLineElementConnect(AbstractConnect):
|
||||
if connected_to and not glue_ok:
|
||||
return None
|
||||
|
||||
# Do not allow to links between the comment and the element
|
||||
# Do not allow links between the comment and the element
|
||||
if connected_to and element and \
|
||||
((isinstance(connected_to.subject, uml2.Comment) and \
|
||||
self.element.subject in connected_to.subject.annotatedElement) or \
|
||||
@ -289,7 +289,7 @@ class UnaryRelationshipConnect(AbstractConnect):
|
||||
"""
|
||||
Find an existing relationship in the model that meets the
|
||||
required type and is connected to the same model element the head
|
||||
and tail of the line are conncted to.
|
||||
and tail of the line are connected to.
|
||||
|
||||
type - the type of relationship we're looking for
|
||||
head - tuple (association name on line, association name on element)
|
||||
@ -332,7 +332,7 @@ class UnaryRelationshipConnect(AbstractConnect):
|
||||
|
||||
def relationship_or_new(self, type, head, tail):
|
||||
"""
|
||||
Like relation(), but create a new instance of none was found.
|
||||
Like relation(), but create a new instance if none was found.
|
||||
"""
|
||||
relation = self.relationship(type, head, tail)
|
||||
if not relation:
|
||||
@ -470,7 +470,7 @@ class RelationshipConnect(UnaryRelationshipConnect):
|
||||
element = self.element
|
||||
connected_to = self.get_connected(opposite)
|
||||
|
||||
# Element can not be a parent for itself.
|
||||
# Element can not be a parent of itself.
|
||||
if connected_to is element:
|
||||
return None
|
||||
|
||||
|
@ -148,7 +148,7 @@ class StereotypeAttributes(gtk.TreeStore):
|
||||
|
||||
def create_stereotype_tree_view(model):
|
||||
"""
|
||||
Create a tree view for a editable tree model.
|
||||
Create a tree view for an editable tree model.
|
||||
|
||||
:Parameters:
|
||||
model
|
||||
|
@ -459,7 +459,7 @@ def create_hbox_label(adapter, page, label):
|
||||
|
||||
def create_tree_view(model, names, tip='', ro_cols=None):
|
||||
"""
|
||||
Create a tree view for a editable tree model.
|
||||
Create a tree view for an editable tree model.
|
||||
|
||||
:Parameters:
|
||||
model
|
||||
|
@ -152,7 +152,7 @@ class Compartment(list):
|
||||
def get_size(self):
|
||||
"""
|
||||
Get width, height of the compartment. pre_update should have
|
||||
been called so widthand height have been calculated.
|
||||
been called so width and height have been calculated.
|
||||
"""
|
||||
if self.visible:
|
||||
return self.width, self.height
|
||||
@ -243,7 +243,7 @@ class CompartmentItem(NamedItem):
|
||||
Compartment item has three drawing styles (changed with
|
||||
`ClassifierItem.drawing_style` property)
|
||||
|
||||
- the comparttment view - often used by classes
|
||||
- the compartment view - often used by classes
|
||||
- a compartment view, but with a little stereotype icon in the right corner
|
||||
- an icon - used by actor and interface items
|
||||
|
||||
@ -469,7 +469,7 @@ class CompartmentItem(NamedItem):
|
||||
"""
|
||||
Update state for box-style presentation.
|
||||
|
||||
Calculate minimal size, which is based on header and comparments
|
||||
Calculate minimal size, which is based on header and compartment
|
||||
sizes.
|
||||
"""
|
||||
super(CompartmentItem, self).pre_update(context)
|
||||
|
@ -31,7 +31,7 @@ Assembly Connector
|
||||
To connect two components with assembly connector connect folded interface
|
||||
and component items using connector item.
|
||||
|
||||
If component is provides or requires connected interface, then assembly
|
||||
If component provides or requires connected interface, then assembly
|
||||
connection in UML data model will be created and connector item will
|
||||
display name of the interface. Otherwise, UML data model is not updated
|
||||
and connector item does not display interface name.
|
||||
@ -85,7 +85,7 @@ draw assembly connector icon in the middle of a line. The solution is very
|
||||
simple in implementation and consistent with the rest of the application
|
||||
until multiple components have to be connected with one assembly connector.
|
||||
|
||||
UML Specificatiom Issues
|
||||
UML Specification Issues
|
||||
========================
|
||||
UML specification is not clear about interfaces as connectable elements
|
||||
and connector's `kind` attribute.
|
||||
|
@ -82,7 +82,7 @@ class IActionProvider(interface.Interface):
|
||||
|
||||
class IActionExecutedEvent(interface.Interface):
|
||||
"""
|
||||
An event emited when an action has been performed.
|
||||
An event emitted when an action has been performed.
|
||||
"""
|
||||
name = interface.Attribute("Name of the action performed, if any")
|
||||
|
||||
|
@ -65,7 +65,7 @@ class TransactionError(Exception):
|
||||
|
||||
class Transaction(object):
|
||||
"""
|
||||
The transaction. On start and end of a transaction an event is emited.
|
||||
The transaction. On start and end of a transaction an event is emitted.
|
||||
|
||||
Transactions can be nested. If the outermost transaction is committed or
|
||||
rolled back, an event is emitted.
|
||||
@ -94,7 +94,7 @@ class Transaction(object):
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the transaction. If this is the first transaction in
|
||||
the stack, a TransactionBegin event is emited."""
|
||||
the stack, a TransactionBegin event is emitted."""
|
||||
|
||||
self._need_rollback = False
|
||||
if not self._stack:
|
||||
@ -103,8 +103,8 @@ class Transaction(object):
|
||||
|
||||
def commit(self):
|
||||
"""Commit the transaction. First, the transaction is closed.
|
||||
If it needs to be rolled-back, a TransactionRollback event is emited.
|
||||
Otherwise, a TransactionCommit event is emited."""
|
||||
If it needs to be rolled-back, a TransactionRollback event is emitted.
|
||||
Otherwise, a TransactionCommit event is emitted."""
|
||||
|
||||
self._close()
|
||||
if not self._stack:
|
||||
@ -116,7 +116,7 @@ class Transaction(object):
|
||||
def rollback(self):
|
||||
"""Roll-back the transaction. First, the transaction is closed.
|
||||
Every transaction on the stack is then marked for roll-back. If
|
||||
the stack is empty, a TransactionRollback event is emited."""
|
||||
the stack is empty, a TransactionRollback event is emitted."""
|
||||
|
||||
self._close()
|
||||
for tx in self._stack:
|
||||
@ -142,7 +142,7 @@ class Transaction(object):
|
||||
try:
|
||||
component_registry = self.component_registry
|
||||
except (application.NotInitializedError, component.ComponentLookupError):
|
||||
logger.warning('Could not lookup component_registry. Not emiting events.')
|
||||
logger.warning('Could not lookup component_registry. Not emitting events.')
|
||||
else:
|
||||
component_registry.handle(event)
|
||||
|
||||
@ -151,7 +151,7 @@ class Transaction(object):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type=None, exc_val=None, exc_tb=None):
|
||||
"""Provide with-statement transaction support. If an error occured,
|
||||
"""Provide with-statement transaction support. If an error occurred,
|
||||
the transaction is rolled back. Otherwise, it is committed."""
|
||||
|
||||
if exc_type:
|
||||
|
Loading…
x
Reference in New Issue
Block a user