Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidy the docs folder

Make the docs consistent RST, correct some typos and grammar.
Add a sphinx makefile, remove the epydoc config, ignore a build folder.
Add some autodoc entries.
  • Loading branch information...
commit 341dfdd62d108e90704037ddafe202e984653d24 1 parent aceb0ba
@aejh aejh authored
View
1  doc/.gitignore
@@ -0,0 +1 @@
+_build/
View
130 doc/Makefile
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Gaphor.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Gaphor.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/Gaphor"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Gaphor"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ make -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
View
28 doc/actions.txt
@@ -22,10 +22,11 @@ Where it should lead:
* Actions should behave more like adapters. E.g. when a popup menu is created
for an Association item, the menu actions should present themselves in the
- context of that menu item (with toggles set right)
+ context of that menu item (with toggles set right).
+
- Could be registered as adapters with a name.
- * Each window has it's own action group (every item with a menu?)
+ * Each window has its own action group (every item with a menu?)
* One toplevel UIManager per window or one per application/gui_manager?
* Normal actions can be modeled as functions. If an action is sensitive or
visible depends on the state in the action. Hence we require the update()
@@ -45,7 +46,7 @@ Hence an interface IActionProvider has to be defined::
menu_xml = interface.Attribute("The menu XML")
action_group = interface.Attribute("The accompanying ActionGroup")
-Support for actions can be arranged by decorating actions with an @action
+Support for actions can be arranged by decorating actions with an :ref:`@action <action_doc>`
decorator and let the class create an ActionGroup using some
actionGroup factory function (no inheritance needed here).
@@ -57,11 +58,21 @@ They can register handlers in order to update their state.
Maybe it's nice to configure those through the egg-info system. I suppose
gaphor.service will serve well (as they need to be initialized anyway)
- ==> also inherit IActionProvider from IService?
+
+ * also inherit IActionProvider from IService?
+
+::
[gaphor.services]
xx = gaphor.actions.whatever:SomeActionProviderClass
+----
+
+.. _action_doc:
+
+.. autoclass:: gaphor.action.action
+ :members:
+
Solution for context sensitive menus
------------------------------------
@@ -71,18 +82,19 @@ on and off on demand.
Technically they should be enabled through services/action-providers.
-It becomes even tougher when popup menu's should act on parts of a diagram item
+It becomes even tougher when popup menus should act on parts of a diagram item
(such as association ends). This should be avoided. It may be a good idea to
provide such functionality through a special layer on the canvas, by means of
some easy clickable buttons around the "hot spot" (we already have something
like that for text around association ends).
Scheme:
+
1. User selects an item and presses the rigth mouse button: a popup menu
should be displayed.
-2. find the actual item (this may be a composite item of the element drawn).
+2. Find the actual item (this may be a composite item of the element drawn).
Use an IItemPicker adapter for that (if no such interface is available,
use the item itself).
-2. Find a IActionProvider adapters for the selected (focused) item.
-3. update the popup menu context (actions) for the selected item.
+3. Find a IActionProvider adapters for the selected (focused) item.
+4. Update the popup menu context (actions) for the selected item.
View
217 doc/conf.py
@@ -1,8 +1,213 @@
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo']
-project = 'Gaphor'
-version = '0.15'
-release = version
+# -*- coding: utf-8 -*-
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
source_suffix = '.txt'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
master_doc = 'contents'
-#html_theme = 'traditional'
-#unused_docs = 'constraints.txt index.txt tools.txt comparison.txt'
+
+# General information about the project.
+project = u'Gaphor'
+copyright = u'2012, Gaphor development team'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.17.1'
+# The full version, including alpha/beta/rc tags.
+release = '0.17.1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Gaphordoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('contents', 'Gaphor.tex', u'Gaphor Documentation',
+ u'Gaphor development team', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('contents', 'gaphor', u'Gaphor Documentation',
+ [u'Gaphor development team'], 1)
+]
View
39 doc/connect.txt
@@ -1,10 +1,12 @@
Connection protocol
===================
-In Gaphor, if a connection is made on a diagram between an element and a relationship, the connection is also made at semantic level (the model). From a GUI
-point of view it all starts with a button release event:
+In Gaphor, if a connection is made on a diagram between an element and a
+relationship, the connection is also made at semantic level (the model).
+From a GUI point of view it all starts with a button release event.
-With "item" I refer to objects in a diagram (graphical), with "element" I refer to symantic (model) objects.
+With "item" I refer to objects in a diagram (graphical), with "element" I
+refer to symantic (model) objects.
Is relation with this element allowed?
No:
@@ -13,22 +15,27 @@ Is relation with this element allowed?
Yes:
connect_handle()
Is opposite end connected?
+
No:
Do nothing
Yes:
- Does the item already have a subject element relation?
- Yes:
- Is the previous item the same as the current?
- Yes:
- Do nothing
- No:
- Let subject end point to the new element
- No:
+ Does the item already have a subject element relation?
+ Yes:
+ Is the previous item the same as the current?
+ Yes:
+ Do nothing
+
+ No:
+ Let subject end point to the new element
+
+ No:
Create relation or find existing relation in model
- Search for an existing relation in the model:
- Found:
- Use that relation
- Nothing:
- Create new model elements and connect to item
+
+ Search for an existing relation in the model:
+ Found:
+ Use that relation
+ Nothing:
+
+ Create new model elements and connect to item
The check if a connection is allowed should also check if it is valid to create a relation to/from the same element (like associations, but not generalizations)
View
25 doc/contents.txt
@@ -2,17 +2,16 @@
Documentation contents
######################
-
*The source is the documentation.*
Well, not for us.
-Currently, there's not a lot of documentation though. For those of you interested in Gaphor there's
+Currently, there's not a lot of documentation though. For those of you interested in Gaphor there's:
* A :doc:`manual <manual/index>`. It outlines some of the ideas in and behind Gaphor.
* The :ref:`tech-section` contains some interesting articles about the technology that drives Gaphor and Gaphas, Gaphor's canvas widget.
-If you're into writing plug-ins for Gaphor you should have a look at our fabulous :url:`Hello world <http://github.com/amolenaar/gaphor.plugins.helloworld>` plug-in.
+If you're into writing plug-ins for Gaphor you should have a look at our fabulous `Hello world <http://github.com/amolenaar/gaphor.plugins.helloworld>`_ plug-in.
.. toctree::
:maxdepth: 2
@@ -22,11 +21,12 @@ If you're into writing plug-ins for Gaphor you should have a look at our fabulou
Running Gaphor on different platforms:
.. toctree::
- :maxdepth: 2
+ :maxdepth: 1
- custominstall
linux
win32
+ custominstall
+
.. _tech-section:
@@ -34,24 +34,29 @@ Tech section
------------
.. toctree::
- :maxdepth: 2
+ :maxdepth: 1
- model
framework
- actions
- connect
+ model
+ stereotypes
datamodel
+ connect
+ actions
+ items
services
so
storage
undo
xml-format
-
+
+.. toctree::
+ :maxdepth: 2
External links
^^^^^^^^^^^^^^
* You should definitely check out http://www.agilemodeling.com.
+
* The `UML diagrams <http://www.agilemodeling.com/essays/umlDiagrams.htm>`_ (although Gaphor does not see it that black-and-white).
* http://www.agilemodeling.com/essays/
* The `official UML metamodel specification <http://www.omg.org/technology/documents/modeling_spec_catalog.htm#UML>`_. This ''is'' our data model.
View
104 doc/datamodel.txt
@@ -1,49 +1,81 @@
-= Description of Gaphors data model =
+Description of Gaphors data model
+=================================
-Gaphor is an UML tool. In order to keep as close as possible to the UML specification the data model is based on the UML Metamodel. Since the OMG has an XMI (XML) specification of the metamodel, the easiest way to do that is to generate the code directly from the model. Doing this raises two issues:
+Gaphor is an UML tool. In order to keep as close as possible to the UML
+specification the data model is based on the UML Metamodel. Since the OMG has
+an XMI (XML) specification of the metamodel, the easiest way to do that is to
+generate the code directly from the model. Doing this raises two issues:
1. There are more attributes defined in the data model than we will use.
2. How do we check if the model is consistent?
The first point is not such a problem: attributes we don't use don't consume memory.
-There are no consistency rules in the XML definition, we have to get them from the UML syntax description. It is probably best to create a special consistency module that checks the model and reports errors.
-
-In the UML metamodel all classes are derived from {{{Element}}}. So all we have to do is create a substitute for {{{Element}}} that gives some behaviour to the data objects (see {{{gaphor/UML/element.py}}}).
-
-The data model is described in Python. Since the Python language doesn't make a difference between classes and objects, we can define the possible attributes that an object of a particular kind can have in a dictionary (name-value map) at class level. If a value is set, the object checks if an attribute exists in the class' dictionary (and the parents dictionary). If it does, the value is assigned, if it doesn't an exception is raised.
-
-== Bidirectional references ==
-
-But how, you might wonder, do you handle bidirectional references (object one references object two and visa versa)? Well, this is basically the same as the uni-directional reference. Only now we need to add some extra information to the dictionary at class level. We just define and extra field that gives us the name of the opposite reference and viola, we can create bi-directional references. You should check out the code in {{{gaphor/UML/element.py}}} for more details.
-
-== Implementation ==
-
-This will allow the user to assign a value to an instance of {{{Element}}} with name '{{{name}}}'. If no value is assigned before the value is requested, it returns and empty string ''.
-
-{{{
-m = Class()
-print m.name # Returns ''
-m.name = 'MyName'
-print m.name # Returns 'MyName'
-}}}
+There are no consistency rules in the XML definition, we have to get them from
+the UML syntax description. It is probably best to create a special consistency
+module that checks the model and reports errors.
+
+In the UML metamodel all classes are derived from :ref:`Element <uml_element>`. So all we have
+to do is create a substitute for :ref:`Element <uml_element>` that gives some behaviour to the
+data objects.
+
+The data model is described in Python. Since the Python language doesn't make
+a difference between classes and objects, we can define the possible
+attributes that an object of a particular kind can have in a dictionary
+(name-value map) at class level. If a value is set, the object checks if an
+attribute exists in the class' dictionary (and the parents dictionary). If it
+does, the value is assigned, if it doesn't an exception is raised.
+
+Bidirectional references
+------------------------
+
+But how, you might wonder, do you handle bidirectional references (object one
+references object two and visa versa)? Well, this is basically the same as the
+uni-directional reference. Only now we need to add some extra information to
+the dictionary at class level. We just define and extra field that gives us
+the name of the opposite reference and viola, we can create bi-directional
+references. You should check out the code in ``gaphor/UML/element.py`` for more details.
+
+Implementation
+--------------
+
+This will allow the user to assign a value to an instance of ``Element`` with
+name ``name``. If no value is assigned before the value is requested, it
+returns and empty string ''::
+
+ m = Class()
+ print m.name # Returns ''
+ m.name = 'MyName'
+ print m.name # Returns 'MyName'
+
+ m = Element()
+ c = Comment()
+ print m.comment # Returns an empty list '[]'
+ print c.annotatedElement # Returns an empty list '[]'
+ m.comment = c # Add 'c' to 'm.comment' and add 'm' to 'c.annotatedElement'
+ print m.comment # Returns a list '[c]'
+ print c.annotatedElement # Returns a list '[m]'
+
+All this wisdom is defined in the data-models base class: ``Element``.
+The datamodel itself code is generated.
+Extensions to the data model
+----------------------------
-{{{
-m = Element()
-c = Comment()
-print m.comment # Returns an empty list '[]'
-print c.annotatedElement # Returns an empty list '[]'
-m.comment = c # Add 'c' to 'm.comment' and
- # add 'm' to 'c.annotatedElement'
-print m.comment # Returns a list '[c]'
-print c.annotatedElement # Returns a list '[m]'
-}}}
+A few changes have been made to Gaphors implementation of the metamodel. First
+of all some relationships have to be modified since the same name is used for
+different relationships. Some n:m relationships have been made 1:n. These are
+all small changed and should not restrict the usability of Gaphors model.
-All this wisdom is defined in the data-models base class: {{{Element}}}. The datamodel itself code is generated.
-Extensions to the data model
+The biggest change is the addition of a whole new class: Diagram. Diagram is
+inherited from Namespace and is used to hold a diagram. It contains a
+``gaphas.canvas.Canvas`` object which can be displayed on screen by a
+``DiagramView`` class.
-A few changes have been made to Gaphors implementation of the metamodel. First of all some relationships have to be modified since the same name is used for different relationships. Some n:m relationships have been made 1:n. These are all small changed and should not restrict the usability of Gaphors model.
+.. _uml_element:
-The biggest change is the addition of a whole new class: Diagram. Diagram is inherited from Namespace and is used to hold a diagram. It contains a {{{gaphas.canvas.Canvas}}} object which can be displayed on screen by a {{{DiagramView}}} class.
+UML.Element
+-----------
+.. autoclass:: gaphor.UML.element.Element
+ :members:
View
44 doc/framework.txt
@@ -1,7 +1,10 @@
Gaphor's Framework
==================
-Gaphor is built in a light, service oriented fashion. The application is split in a series of services, such as a file manager, undo manager and GUI manager. Those services are loaded based on entry points defined in Python Eggs (see :doc:`Service oriented design <so>`).
+Gaphor is built in a light, service oriented fashion. The application is split
+in a series of services, such as a file manager, undo manager and GUI manager.
+Those services are loaded based on entry points defined in Python Eggs
+(see :doc:`Service oriented design <so>`).
Objects communicate with each other through events. Whenever something of
importance happens (e.g. an attribute of a model element changes) an event is
@@ -13,27 +16,48 @@ in (so the diagram item should check if the element that sent the event is
actually the event the item is representing).
-Gaphor is transactional. Transactions work simply by sending an event when a transaction starts and sending another when a transaction ends. E.g. undo management is transactional.
+Gaphor is transactional. Transactions work simply by sending an event when a
+transaction starts and sending another when a transaction ends. E.g. undo
+management is transactional.
-It all starts with an Application. Only one Application instance is permitted. The Application will look for services defined as `[gaphor.services]`. Those services are loaded and initialized.
+It all starts with an Application. Only one Application instance is permitted.
+The Application will look for services defined as :doc:`gaphor.services
+<services>`. Those services are loaded and initialized.
The most notable services are:
gui_manager
- For the Gaphor the GUI manager is one of the major services that have to be loaded. The GUI manager is responsible for loading the main window and displaying it on the screen.
+ The GUI manager is one of the major services that have to be loaded. The
+ GUI manager is responsible for loading the main window and displaying it
+ on the screen.
- This by itself doesn't do a thing though. The Action manager (`action_manager`) is required to maintain all actions users can perform. Actions will be shown as menu entries for example.
+ This by itself doesn't do a thing though. The Action manager
+ (`action_manager`) is required to maintain all actions users can perform.
+ Actions will be shown as menu entries for example.
file_manager
Loading and saving a model is done through this service.
element_factory
- The data model itself is maintained in the element factory. This service is used to create model elements and can be used to lookup elements or query for a set of elements.
+ The :doc:`data model <datamodel>` itself is maintained in the element
+ factory. This service is used to create model elements and can be used to
+ lookup elements or query for a set of elements.
-undo_manager
- One of the most appreciated services. It allows users to make a mistake every now and then.
+:doc:`undo_manager <undo>`
+ One of the most appreciated services. It allows users to make a mistake
+ every now and then!
- The undo manager is transactional. Actions performed by a user are only stored in a transaction is active. If a transaction is completed (committed) a new undo action is stored. Transactions can also be rolled back, in which case all changes are played back directly.
+ The undo manager is transactional. Actions performed by a user are only
+ stored in a transaction is active. If a transaction is completed (committed)
+ a new undo action is stored. Transactions can also be rolled back, in which
+ case all changes are played back directly.
element_dispatcher
- Although Gaphor makes use of a central dispatch engine, this solution is not efficient when it comes to dispatching events of UML model elements. For this purpose the `element_dispatcher` can help out. It maintains a path of elements reaching from the root (e.g. from a diagram item) to the element of interest and will only signal in case this element changes. This makes complex dispatching very efficient.
+ Although Gaphor makes use of a central dispatch engine, this solution is not
+ efficient when it comes to dispatching events of UML model elements. For
+ this purpose the `element_dispatcher` can help out. It maintains a path of
+ elements reaching from the root (e.g. from a diagram item) to the element of
+ interest and will only signal in case this element changes.
+ This makes complex dispatching very efficient.
+
+.. autoclass:: gaphor.services.elementdispatcher.ElementDispatcher
View
77 doc/items.txt
@@ -1,27 +1,56 @@
Gaphor Diagram Items
====================
-The Gaphor diagram items (or in short `items`) represent UML metamodel on a
-diagram.
-
-Basic items
-
- DiagramItem
- Basic diagram item supporting item style, text elements
- and stereotypes.
- ElementItem
- Rectangular canvas item.
- NamedItem
- NamedElement (UML metamodel) representation using rectangular
- canvas item.
- CompartmentItem
- An item with compartments (i.e. Class or State)
- ClassifierItem
- Classifer (UML metamodel) representation.
- DiagramLine
- Line canvas item.
- NamedLine
- NamedElement (UML metamodel) representation using line canvas item.
- FeatureItem
- Diagram representation of UML metamodel classes like property,
- operation, stereotype attribute, etc.
+The diagram items (or in short `items`) represent UML metamodel on a diagram.
+The following sections present the basic items.
+
+DiagramItem
+-----------
+Basic diagram item supporting item style, text elements and stereotypes.
+
+.. autoclass:: gaphor.diagram.diagramitem.DiagramItem
+ :members:
+
+ElementItem
+-----------
+Rectangular canvas item.
+
+.. autoclass:: gaphor.diagram.elementitem.ElementItem
+
+NamedItem
+---------
+NamedElement (UML metamodel) representation using rectangular canvas item.
+
+.. autoclass:: gaphor.diagram.nameditem.NamedItem
+
+CompartmentItem
+---------------
+An item with compartments (i.e. Class or State)
+
+.. autoclass:: gaphor.diagram.compartment.CompartmentItem
+
+ClassifierItem
+--------------
+Classifer (UML metamodel) representation.
+
+.. autoclass:: gaphor.diagram.classifier.ClassifierItem
+
+DiagramLine
+-----------
+Line canvas item.
+
+.. autoclass:: gaphor.diagram.diagramline.DiagramLine
+
+NamedLine
+---------
+NamedElement (UML metamodel) representation using line canvas item.
+
+.. autoclass:: gaphor.diagram.diagramline.NamedLine
+
+FeatureItem
+-----------
+Diagram representation of UML metamodel classes like property, operation,
+stereotype attribute, etc.
+
+.. autoclass:: gaphor.diagram.compartment.FeatureItem
+
View
39 doc/linux.txt
@@ -1,25 +1,28 @@
-= Linux Distro Packages =
-Examples of Gaphor and Gaphas RPM spec files can be found in
-[http://www.pld-linux.org/ PLD Linux]
-[http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/ repository]
- * [http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/python-gaphas.spec gaphas]
- * [http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/gaphor.spec gaphor]
+Gaphor on Linux
+===============
+
+Examples of Gaphor and Gaphas RPM spec files can be found in `PLD Linux <http://www.pld-linux.org/ PLD Linux>`_
+`repository <http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/>`_:
+
+ * http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/python-gaphas.spec
+ * http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/gaphor.spec
Please, do not hesistate to contact us if you need help to create Linux package
for Gaphor or Gaphas.
-= Dependencies =
+Dependencies
+------------
-Gaphor depends on Zope libraries
- * component
- * interface
-and
- * gaphas (of course :)
- * pygtk
+Gaphor depends on Zope libraries:
+ * component
+ * interface
+and:
+ * gaphas (of course :)
+ * pygtk
Above Zope modules require
- * deferredimport
- * deprecation
- * event
- * proxy
- * testing
+ * deferredimport
+ * deprecation
+ * event
+ * proxy
+ * testing
View
155 doc/make.bat
@@ -0,0 +1,155 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Gaphor.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Gaphor.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
View
30 doc/manual/documentation.txt
@@ -1,30 +0,0 @@
-Documentation
-=============
-
-
- ''The source is the documentation.''
-
-Well, not for us.
-
-Currently, there's not a lot of documentation though. For those of you interested in Gaphor there's
-
- * A manual_. It outlines some of the ideas in and behind Gaphor.
- * The Tech section contains some interesting articles about the technology that drives Gaphor and Gaphas, Gaphor's canvas widget.
- * We're working on a `new manual`_.
-
-If you're into writing plug-ins for Gaphor you should have a look at our fabulous [source:/gaphor-plugins/gaphor.plugins.helloworld Hello world] plug-in.
-
-External links
-==============
-
- * You should definitely check out http://www.agilemodeling.com.
- * The `UML diagrams <http://www.agilemodeling.com/essays/umlDiagrams.htm>`_ (although Gaphor does not see it that black-and-white).
- * http://www.agilemodeling.com/essays/
- * The `official UML metamodel specification <http://www.omg.org/technology/documents/modeling_spec_catalog.htm#UML>`_. This ''is'' our data model.
-
-Odds and ends
-=============
-
-* A somewhat older document about [wiki:Documentation/GtkWin32 how to get GTK+ with Python bindings working on Win32].
-
-.. _manual: manual.html
View
7 doc/manual/index.txt
@@ -1,8 +1,9 @@
-The new Gaphor manual
+The Gaphor manual
=====================
-
-This section of the site is dedicated to some user documentation. Although most users will have previous experience with Gaphor, it is evident that some aspects of the application need a little more explanation.
+This section of the site is dedicated to some user documentation. Although most
+users will have previous experience with Gaphor, it is evident that some
+aspects of the application need a little more explanation.
.. toctree::
View
13 doc/manual/introduction.txt
@@ -3,19 +3,24 @@ Introduction
Welcome to the Gaphor!
-Gaphor is a UML modelling application written in Python. It is designed to be easy to use while not substituting completeness, that is, Gaphor implements a fully-compliant UML 2 data model. You can use Gaphor to quickly visualize different aspects of a system as well as create complete, highly complex models.
+Gaphor is a UML modelling application written in Python. It is designed to be
+easy to use while not substituting completeness, that is, Gaphor implements a
+fully-compliant UML 2 data model. You can use Gaphor to quickly visualize
+different aspects of a system as well as create complete, highly complex models.
Gaphor is designed around the following principles:
Consistency
- UML is a graphical modelling language, so every aspect should be represented in a diagram[1]_.
+ UML is a graphical modelling language, so every aspect should be represented in a diagram [#f1]_ .
Simplicity
The application should be easy to use. Only some basic knowledge of UML is required.
Workability
The application should not bother the user every time (s)he does something non-UML-ish.
-This manual serves as a reference for all Gaphor as to offer. So, you may read it from start to finish, or jump to a section that interests you.
+This manual serves as a reference for all Gaphor has to offer. So, you may read it from start to finish, or jump to a section that interests you.
+
+
+.. [#f1] We take this quite literally: even stereotypes are modelled in diagrams.
-.. _[1] We take this quite literally: even stereotypes are modelled in diagrams.
View
36 doc/manual/modelling.txt
@@ -1,36 +1,54 @@
Creating models
===============
-.. image:: oneclass.png
+Once Gaphor is started a new empty model is automatically created. The `main`
+diagram is already open in the :doc:`Diagram section <working>`.
-Once Gaphor is started a new empty model is automatically created. The ''main'' diagram is already open in the :doc:`Diagram section <working>`.
+Select an element you want to place (e.g. a class) by clicking on the icon in
+the :doc:`Toolbox <working>` and click on the diagram. This will place a new
+Class item instance on the diagram and add a new Class to the model (it shows
+up in the :doc:`Navigation <working>`). The selected tool will reset itself to
+the Pointer tool if the option ''Diagram -> Reset tool'' is selected.
-Select an element you want to place (e.g. a class) by clicking on the icon in the :doc:`Toolbox <working>` and click on the diagram. This will place a new Class item instance on the diagram and add a new Class to the model (it shows up in the :doc:`Navigation <working>`). The selected tool will reset itself to the Pointer tool if the option ''Diagram -> Reset tool'' is selected.
+.. image:: oneclass.png
It's simple to add elements to a diagram.
-Some elements are not directly visible. The section in the toolbox is collapsed and needs to be clicked first to reveal its contents.
+Some elements are not directly visible. The section in the toolbox is collapsed
+and needs to be clicked first to reveal its contents.
-Gaphor does not make any assumptions about which elements should be placed on a diagram. A diagram is a diagram. UML defines all different kinds of diagrams, such as Class diagrams, Component diagrams, Action diagrams, Sequence diagrams. But Gaphor does not restrict the user.
+Gaphor does not make any assumptions about which elements should be placed on a
+diagram. A diagram is a diagram. UML defines all different kinds of diagrams,
+such as Class diagrams, Component diagrams, Action diagrams, Sequence diagrams.
+But Gaphor does not restrict the user.
Creating new diagrams
=====================
.. image:: navpopup.png
-To create a new diagram, use the Navigation. Select an element that can contain a diagram (a Package or Profile) and right-click [1]_. Select `New diagram` and a new diagram is created.
+To create a new diagram, use the Navigation. Select an element that can contain
+a diagram (a Package or Profile) and right-click [1]_. Select `New diagram`
+and a new diagram is created.
Copy and paste
==============
-Items in a diagram can be copied and pasted (in the same diagram or another). A paste will create new items in the diagrams, the items they represent (e.g. the Class that's shown in the Naviagtion) is *not* copied (call it a shallow copy if you like).
+Items in a diagram can be copied and pasted (in the same diagram or another).
+A paste will create new items in the diagrams, the items they represent (e.g.
+the Class that's shown in the Naviagtion) is *not* copied (call it a shallow
+copy if you like).
Drag and drop
=============
-Adding an existing element to a diagram is simple: drag the element from the Navigation section onto a diagram. Not all element that show up in the Navigation can be added: Diagrams and attribute/operations of a Class can not be added.
+Adding an existing element to a diagram is simple: drag the element from the
+Navigation section onto a diagram. Not all element that show up in the
+Navigation can be added: Diagrams and attribute/operations of a Class can not
+be added.
-Elements can also be dragged within the Navigation section. This way classes and packages can be rearranged for example.
+Elements can also be dragged within the Navigation section. This way classes
+and packages can be rearranged for example.
.. [1] Command-Click for MacOS X users running Gaphor in X11.
View
23 doc/manual/plugins.txt
@@ -6,7 +6,11 @@ There is little difference in writing a plugin or a service.
Accessing model related data
----------------------------
-The datamodel classes are located in the `gaphor.UML` module. Data objects can be accessed through the ElementFactory. This is a special class for creating and managing data objects. Items can be queried using this element factory. It's registered in the application as `element_factory`. When writing a service or plugin the element factory can be injected into the service like this::
+The datamodel classes are located in the `gaphor.UML` module. Data objects can
+be accessed through the ElementFactory. This is a special class for creating
+and managing data objects. Items can be queried using this element factory.
+It's registered in the application as `element_factory`. When writing a service
+or plugin the element factory can be injected into the service like this::
class MyThing(object):
@@ -15,9 +19,11 @@ The datamodel classes are located in the `gaphor.UML` module. Data objects can b
def do_something(self):
items = element_factory.select()
-NOTE: in the console window services can be retrieved by using the `service()` function. E.g.::
+.. note::
- ef = service('element_factory')
+ In the console window services can be retrieved by using the `service()` function. E.g.::
+
+ ef = service('element_factory')
Querying the data model
-----------------------
@@ -37,13 +43,15 @@ will fetch all Class instances from the element factory.
Traversing data instances
-------------------------
-Once some classes are obtained It's common to traverse through a few related objects in order to obtain the required information. For example: to iterate through all parameters related to class' operations, one can write::
+Once some classes are obtained It's common to traverse through a few related
+objects in order to obtain the required information. For example: to iterate
+through all parameters related to class' operations, one can write::
for o in classes.ownedOperation:
for p in o.ownedParameter:
do_something(p)
-Using the `[:]` operator items can be traversed more easely [1]
+Using the ``[:]`` operator items can be traversed more easily [1]_::
for o in classes.ownedOperation[:].ownedParameter:
do_something(p)
@@ -55,7 +63,8 @@ It's also possible to provide a query as part of the selection::
for o in classes.ownedOperation['it.returnParameter'].ownedParameter:
do_something(p)
-The variable `it` in the query refers to the evaluated object (in this case all operations with a return parameter are taken into account).
+The variable ``it`` in the query refers to the evaluated object (in this case
+all operations with a return parameter are taken into account).
-.. [1] See http://github.com/amolenaar/gaphor/blobs/master/gaphor/misc/listmixins.py
+.. [1] See http://github.com/amolenaar/gaphor/blob/master/gaphor/misc/listmixins.py
View
2  doc/manual/stereotypes.txt
@@ -5,7 +5,7 @@ The UML method to extend UML (basic) components with a special meaning is by
using stereotypes. A stereotype defines a special usage of a model element. For
example: a class that's used as a controller can be assigned a stereotype::
- &laquo;controller&raquo;
+ «controller»
Creating a stereotype starts by the creation of a Profile normally. Although
stereotypes can be created in every package, it's a good habit to use Profiles
View
14 doc/manual/working.txt
@@ -15,9 +15,9 @@ Each section has it's own specific function.
Navigation
==========
-.. image:: gaphor-treeview.png
+The navigation section of the interface displays a hierarchical view of your model. Every model element you create will be inserted into the navigation section. This view acts as a tree where you can expand and collapse different elements of your model. This provides an easy way to view the elements of your model from an elided perspective. That is, you can collapse those model elements that are irrelevant to the task at hand.
-In Gaphor, you use the navigation section of the interface to get a hierarchical view of your model. Every model element you create will be inserted in the navigation section. This view acts as a tree where you can expand and collapse different elements of your model. This provides an easy way to view the elements of your model from an elided perspective. That is, you can collapse those model elements that are irrelevant to the task at hand.
+.. image:: gaphor-treeview.png
In the figure on the left, you will see that there are three elements in the navigation view. The root element, `New Model` is a package. Notice the small arrow beside `New Model` that is pointing downward. This indicates that the element is expanded. You will also notice the two sub-elements are slightly indented in relation to `New Model`. The `NewClass` element is a class and the `main` element is a diagram.
@@ -28,22 +28,22 @@ Double clicking on a diagram element will open it in the Diagram section. Elemen
Diagram section
===============
-The diagram section takes up the most space. Multiple diagrams can be opened at once: they are shown in tabs. Tabs can be close from the file menu (Close) and by pressing `Ctrl+w`.
+The diagram section takes up the most space. Multiple diagrams can be opened at once: they are shown in tabs. Tabs can be closed from the file menu (Close) and by pressing `Ctrl+w`.
-Most element have "hot zones", shown as gray rectangles that are only visible when the item is selected. Double clicking on those rectangles allows you to directly edit the item. E.g. change it's name or change the name of an association end.
+Most elements have `hot zones`, shown as gray rectangles that are only visible when the item is selected. Double clicking on those rectangles allows you to directly edit the item. E.g. change it's name or change the name of an association end.
Toolbox
=======
-The toolbox is mainly used to add new diagram items to a diagram. Select the element you want to add by clicking on it. When you click on the diagram, the selected element is created. The "arrow" is selected again, so the element can be manipulated.
+The toolbox is mainly used to add new diagram items to a diagram. Select the element you want to add by clicking on it. When you click on the diagram, the selected element is created. The arrow is selected again, so the element can be manipulated.
-Tools can be selected by simply clicking on them. By deault the pointer tool is selected after every item placement. This can be changed by disabling the Diagram > Reset tool option.
+Tools can be selected by simply clicking on them. By degault the pointer tool is selected after every item placement. This can be changed by disabling the Diagram > Reset tool option.
Tools can also be selected by a keyboard shortcut. The actual character is displayed as part of the tooltip. Finally it is also possible to drag elements on the canvas from the toolbox.
Element Editor
==============
-The Element editor is not really part of the main screen, it's a utility window that shows all characteristics of the selected element. Things like name, attributes and stereotypes.
+The Element editor is not really part of the main screen, it's a utility window that shows all characteristics of the selected element. Things like name, attributes and stereotypes. It can be opened with `Ctrl+e`.
.. image:: elementeditor.png
View
30 doc/model.txt
@@ -1,10 +1,10 @@
UML datamodel
=============
-For it's data storage, Gaphor uses the UML metamodel specs as guidelines.
-Actually, the datamodel is generated for a model file.
+Gaphor uses the UML metamodel specs as guidelines for its data storage.
+In fact, the datamodel is generated for a model file.
-The model is build using smart properties (descriptors). Those descriptors fire
+The model is built using smart properties (descriptors). Those descriptors fire
events when they're changed. This allows the rest of the application (visuals,
undo system) to update their state accordingly. The events are send using Zope
(3)'s signalling mechanism, called Handlers.
@@ -13,21 +13,17 @@ undo system) to update their state accordingly. The events are send using Zope
Model details
-------------
-Pay attention to the following changes/additions with respect to the official
-model:
+Pay attention to the following changes/additions with respect to the official model:
-Additions to the model have been put in the package AuxilaryConstructs.Presentations and .Stereotypes.
+ * Additions to the model have been put in the package AuxilaryConstructs.Presentations and .Stereotypes.
+ * A Diagram element is added in order to model the diagrams.
+ * A special construct has been put into place in order to apply stereotypes to
+ model elements. The current specs (2.2) are not clear on that subject.
+ * The Slot.value reference is singular.
-A Diagram element is added in order to model the diagrams.
+.. note::
-A special construct has been put into place in order to apply stereotypes to
-model elements. The current specs (2.2) are not clear on that subject.
-We follow teh same direction as MonoUML (URL!)
+ ValueSpecification is generated as if it were a normal attribute.
+ As a result, its subclasses (Expression, OpaqueExpression, InstanceValue,
+ LiteralSpecification and its Literal* subclasses) are not available.
-
-TODO:
-ValueSpecification is generated as if it were a normal attribute.
-As a result, it's subclasses (Expression, OpaqueExpression, InstanceValue,
-LiteralSpecification and its Literal* subclasses) are not available.
-
-The Slot.value reference is singular.
View
26 doc/services.txt
@@ -1,8 +1,8 @@
Services
========
-Gaphor is be modeled around the concept of Services. Each service can
-be registered on the application and be used by other services or other
+Gaphor is modeled around the concept of Services. Each service can
+be registered with the application and then be used by other services or other
objects living within the application.
Since Gaphor already uses the `zope.component` adapters, it seems like a good
@@ -16,7 +16,7 @@ one method::
where `application` is the Application object for Gaphor (which is a service
itself and therefore implements `IService` too.
-Each service is allowed to define it's own interface, as long as `IService` is
+Each service is allowed to define its own interface, as long as `IService` is
implemented too.
Services should be defined as `entry_points` in the Egg info file.
@@ -27,21 +27,31 @@ Typically a service does some work in the background.
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.
+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.
(That is when an element is created/destroyed).
-What you want to do is create an event handler for ElementFactory that stores the add/remove signals in the undo system.
+What you want to do is create an event handler for ElementFactory that stores
+the add/remove signals in the undo system.
-The same goes for UML.Elements. Those classes (or more specific the properties) send notifications every time their state changes.
+The same goes for UML.Elements. Those classes (or more specific the properties)
+send notifications every time their state changes.
But.. where to put such information?
+.. autoclass:: gaphor.UML.elementfactory.ElementFactory
+ :members:
+
Plugins
=======
Currently a plugin is defined by an XML file. This will change as plugins
-should be distributable as Egg's too. A plugin will contain user interface
-information along with it's service definition.
+should be distributable as Eggs too. A plugin will contain user interface
+information along with its service definition.
+
+.. seealso::
+
+ Writing plugins :ref:`<manual/plugins>`
View
201 doc/so.txt
@@ -1,107 +1,152 @@
Service Oriented Architecture
=============================
-Gaphor has a service oriented architecture. What does this mean? Well, Gaphor is build as a set of small islands (services). Each island provides a specific piece of functionality. For example: a service is responsible for loading/saving models, another for the menu structure, yet another service handles the undo system.
-
-Service are defined as `Egg entry points <http://peak.telecommunity.com/DevCenter/setuptools#dynamic-discovery-of-services-and-plugins>`_. With entry points applications can register functionality for specific purposes. entry points are grouped in so called 'entry point groups". For example the `console_scripts` entry point group is used to start an application from the command line.
-
-Entry points, as well as all major components in Gaphor, are defined around [http://www.zope.org/Products/ZopeInterface Zope interfaces]. An interface defines specific methods and attributes that should be implemented by the class.
-
-== Entry point groups ==
+Gaphor has a service oriented architecture. What does this mean? Well, Gaphor
+is build as a set of small islands (services). Each island provides a specific
+piece of functionality. For example: a service is responsible for
+loading/saving models, another for the menu structure, yet another service
+handles the undo system.
+
+Service are defined as `Egg entry points <http://peak.telecommunity.com/
+DevCenter/setuptools#dynamic-discovery-of-services-and-plugins>`_.
+With entry points applications can register functionality for specific
+purposes. Entry points are grouped in so called *entry point groups*.
+For example the `console_scripts` entry point group is used to start
+an application from the command line.
+
+Entry points, as well as all major components in Gaphor, are defined around
+`Zope interfaces <http://www.zope.org/Products/ZopeInterface>`_. An interface
+defines specific methods and attributes that should be implemented by the class.
+
+Entry point groups
+------------------
Gaphor defines two entry point groups:
- * {{{[gaphor.services]}}}
- * {{{[gaphor.uicomponents]}}}
+ * gaphor.services
+ * gaphor.uicomponents
-Services are used to add functionality to the application. Plug-ins should also be defined as services. E.g.
+Services are used to add functionality to the application.
+Plug-ins should also be defined as services. E.g.::
-{{{
entry_points = {
'gaphor.services': [
'xmi_export = gaphor.plugins.xmiexport:XMIExport',
],
},
-}}}
-There is a thin line between a service and a plug-in. A service typically performs some basic need for the applications (such as the element factory or the undo mechanism). A plug-in is more of an add-on. For example a plug-in can depend on external libraries or provide a cross-over function between two applications.
+There is a thin line between a service and a plug-in. A service typically
+performs some basic need for the applications (such as the element factory
+or the undo mechanism). A plug-in is more of an add-on. For example a plug-in
+can depend on external libraries or provide a cross-over function between
+two applications.
+
+Interfaces
+----------
+
+Each service (and plug-in) should implement the `gaphor.interfaces.IService`
+interface:
-== Interfaces ==
+.. autoclass:: gaphor.interfaces.IService
+ :members:
-Each service (and plug-in) should implement the {{{gaphor.interfaces.IService}}} interface ([source:/gaphor/trunk/gaphor/interfaces.py]).
+UI components is another piece of cake. The ``gaphor.uicomponents`` entry
+point group is used to define windows and user interface functionality.
+A UI component should implement the `gaphor.ui.interfaces.IUIComponent`
+interface:
-UI components is another piece of cake. The {{{[gaphor.uicomponents]}}} entry point group is used to define windows and user interface functionality. A UI component should implement the {{{gaphor.ui.interfaces.IUIComponent}}} interface ([source:/gaphor/trunk/gaphor/ui/interfaces.py]).
+.. autoclass:: gaphor.ui.interfaces.IUIComponent
+ :members:
-Typically a service and UI component would like to present some actions to the user, by means of menu entries. Every service and UI component can advertise actions by implementing the {{{gaphor.interfaces.IActionProvider}}} interface ([source:/gaphor/trunk/gaphor/interfaces.py]).
+Typically a service and UI component would like to present some actions to the
+user, by means of menu entries. Every service and UI component can advertise
+actions by implementing the ``gaphor.interfaces.IActionProvider`` interface:
-== Example plugin ==
+.. autoclass:: gaphor.interfaces.IActionProvider
+ :members:
-A small example is provided by means of the ''Hello world plugin''. Take a look at the files in [source:gaphor-plugins/gaphor.plugins.helloworld].
-The {{{setup.py}}} file contains an entry point:
+Example plugin
+~~~~~~~~~~~~~~
+
+A small example is provided by means of the `Hello world plugin`.
+Take a look at the files at `Github <https://github.com/amolenaar/gaphor.plugins.helloworld>`_.
+
+The `setup.py <https://github.com/amolenaar/gaphor.plugins.helloworld/blob/master/setup.py>`_
+file contains an entry point::
-{{{
entry_points = {
'gaphor.services': [
'helloworld = gaphor.plugins.helloworld:HelloWorldPlugin',
]
}
-}}}
-
-This referse to the class {{{HelloWorldPlugin}}} in package/module {{{gaphor.plugins.helloworld}}} ([source:gaphor-plugins/gaphor.plugins.helloworld/gaphor/plugins/helloworld/__init__.py]).
-
-Also notice that, since the package is defined as {{{gaphor.plugins}}}, which is also a package in the default gaphor distribution, each package level contains a special statement in it's {{{__init__.py}}} that tells setuptools it's namespace declaration:
-{{{
-__import__('pkg_resources').declare_namespace(__name__)
-}}}
-
-Here is a stripped version of class [source:gaphor-plugins/gaphor.plugins.helloworld/gaphor/plugins/helloworld/__init__.py HelloWorldPlugin]:
-
-{{{
-from zope import interface
-from gaphor.interfaces import IService, IActionProvider
-from gaphor.core import _, inject, action, build_action_group
-
-
-class HelloWorldPlugin(object):
-
- interface.implements(IService, IActionProvider) # 1.
-
- gui_manager = inject('gui_manager') # 2.
-
- menu_xml = """ # 3.
- <ui>
- <menubar name="mainwindow">
- <menu action="help">
- <menuitem action="helloworld" />
- </menu>
- </menubar>
- </ui>
- """
-
- def __init__(self):
- self.action_group = build_action_group(self) # 4.
-
- def init(self, app): # 5.
- self._app = app
-
- def shutdown(self): # 6.
- pass
-
- @action(name='helloworld', # 7.
- label=_('Hello world'),
- tooltip=_('Every application ...'))
- def helloworld_action(self):
- main_window = self.gui_manager.main_window # 8.
- pass # gtk code left out
-}}}
- 1. As stated before, a plugin should implement the {{{IService}}} interface. It also implements {{{IActionProvider}}}, saying it has some actions to be performed by the user.
- 2. The plugin depends on the {{{gui_manager}}} service. The {{{gui_manager}}} can be referenced as a normal attribute. The first time it's accessed the dependency to the {{{gui_manager}}} is resolved.
- 3. As part of the {{{IActionProvider}}} interface an attribute {{{menu_xml}}} should be defined that contains some menu xml (see http://developer.gnome.org/doc/API/2.0/gtk/GtkUIManager.html#XML-UI)
- 4. {{{IActionProvider}}} also requires an {{{action_group}}} attribute (containing a {{{gtk.ActionGroup}}}). This action group is created on instantiation. The actions itself are defined with an {{{action}}} decorator (see 7.).
- 5. Each {{{IService}}} has an {{{init(app)}}} method...
- 6. ... and a {{{shutdown()}}} method. Those can be used to create and detach event handlers for example.
- 7. The action that can be invoked. The action is defined and will be picked up by {{{build_action_group()}}} (see 4.)
- 8. The main window is retrieved from the {{{gui_manager}}}. At this point the "inject'ed" gui-manager reference is resolved.
+This refers to the class ``HelloWorldPlugin`` in package/module
+`gaphor.plugins.helloworld <https://github.com/amolenaar/gaphor.plugins.helloworld/blob/master/gaphor/plugins/helloworld/__init__.py>`_.
+
+Also notice that, since the package is defined as ``gaphor.plugins``, which is
+also a package in the default gaphor distribution, each package level contains
+a special statement in its ``__init__.py`` that tells setuptools
+its namespace declaration:::
+
+ __import__('pkg_resources').declare_namespace(__name__)
+
+Here is a stripped version of the hello world class::
+
+ from zope import interface
+ from gaphor.interfaces import IService, IActionProvider
+ from gaphor.core import _, inject, action, build_action_group
+
+
+ class HelloWorldPlugin(object):
+
+ interface.implements(IService, IActionProvider) # 1.
+
+ gui_manager = inject('gui_manager') # 2.
+
+ menu_xml = """ # 3.
+ <ui>
+ <menubar name="mainwindow">
+ <menu action="help">
+ <menuitem action="helloworld" />
+ </menu>
+ </menubar>
+ </ui>
+ """
+
+ def __init__(self):
+ self.action_group = build_action_group(self) # 4.
+
+ def init(self, app): # 5.
+ self._app = app
+
+ def shutdown(self): # 6.
+ pass
+
+ @action(name='helloworld', # 7.
+ label=_('Hello world'),
+ tooltip=_('Every application ...'))
+ def helloworld_action(self):
+ main_window = self.gui_manager.main_window # 8.
+ pass # gtk code left out
+
+1. As stated before, a plugin should implement the ``IService`` interface.
+ It also implements ``IActionProvider``, saying it has some actions to
+ be performed by the user.
+2. The plugin depends on the ``gui_manager`` service. The ``gui_manager`` can
+ be referenced as a normal attribute. The first time it's accessed the
+ dependency to the ``gui_manager`` is resolved.
+3. As part of the ``IActionProvider`` interface an attribute ``menu_xml``
+ should be defined that contains some menu xml
+ (see http://developer.gnome.org/doc/API/2.0/gtk/GtkUIManager.html#XML-UI).
+4. ``IActionProvider`` also requires an ``action_group`` attribute (containing
+ a ``gtk.ActionGroup``). This action group is created on instantiation.
+ The actions itself are defined with an ``action`` decorator (see 7).
+5. Each ``IService`` has an ``init(app)`` method...
+6. ... and a ``shutdown()`` method. Those can be used to create and detach
+ event handlers for example.
+7. The action that can be invoked. The action is defined and will be picked
+ up by ``build_action_group()`` (see 4.)
+8. The main window is retrieved from the ``gui_manager``. At this point the
+ "inject'ed" gui-manager reference is resolved.
View
6 doc/stereotypes.txt
@@ -1,5 +1,6 @@
Stereotypes
-----------
+
Stereotypes is quite another story. In order to create a stereotype
one should create a Profile. Within this profile a Diagram can be created.
This diagram should accept only items that are useful within a profile:
@@ -47,6 +48,7 @@ implementable in an application. The point is that the stereotypes you define
(instances of Stereotype) should be instantiated in your model when you create
a stereotyped class.
-There is BTW no way to connect a stereotype with a class other than an
-Association.
+.. note::
+ There is no way to connect a stereotype with a class other than an
+ Association.
View
98 doc/storage.txt
@@ -1,59 +1,57 @@
Saving and loading Gaphor diagrams
+==================================
-The idea is to keep the file format as simple and extensible as possible.
+Everything interesting is an ancestor of the Gaphor root tag.
-This is the format as used by Gaphor.
-
-Everything interesting is between the `Gaphor' start and end tag.
-
-The file is as flat as possible: UML elements (including Diagram) are at
-toplevel, no nesting.
-A UML element can have two tags: `Reference' and `Value'. Reference is used to
+The idea is to keep the file format as simple and extensible as possible: UML elements (including Diagram) are at
+toplevel, no nesting. A UML element can have two tags: ``Reference`` and ``Value``. Reference is used to
point to other UML elements, Value has a value inside (an integer or astring).
Diagram is a special case. Since this element contains a diagram canvas inside,
it may become pretty big (with lots of nested elements).
This is handled by the load and save function of the Diagram class.
-All elements inside a canvas have a tag `Item'.
+All elements inside a canvas have a tag ``Item``.
+
+.. code-block:: xml
-<?xml version="1.0" ?>
-<Gaphor version="1.0" gaphor_version="0.3">
- <Package id="1">
- <ownedElement>
- <reflist>
- <ref refid="2"/>
- <ref refid="3"/>
- <ref refid="4"/>
- </reflist>
- </ownedElement>
- </Package>
- <Diagram id="2">
- <namespace>
- <ref refid="1"/>
- </namespace>
- <canvas extents="(9.0, 9.0, 189.0, 247.0)" grid_bg="0xFFFFFFFF"
- grid_color="0x80ff" grid_int_x="10.0" grid_int_y="10.0"
- grid_ofs_x="0.0" grid_ofs_y="0.0" snap_to_grid="0"
- static_extents="0" affine="(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)"
- id="DCE:xxxx">
- <item affine="(1.0, 0.0, 0.0, 1.0, 150.0, 50.0)" cid="0x8293e74"
- height="78.0" subject="3" type="ActorItem" width="38.0"/>
- <item affine="(1.0, 0.0, 0.0, 1.0, 10.0, 10.0)" cid="0x82e7d74"
- height="26.0" subject="5" type="CommentItem" width="100.0"/>
- </canvas>
- </Diagram>
- <Actor id="3">
- <name>
- <val><![CDATA[Actor]]></val>
- </name>
- <namespace>
- <ref refid="1"/>
- </namespace
- </Actor>
- <UseCase id="4">
- <namespace>
- <ref refid="1"/>
- </namespace>
- </UseCase>
- <Comment id="5"/>
-</Gaphor>
+ <?xml version="1.0" ?>
+ <Gaphor version="1.0" gaphor_version="0.3">
+ <Package id="1">
+ <ownedElement>
+ <reflist>
+ <ref refid="2"/>
+ <ref refid="3"/>
+ <ref refid="4"/>
+ </reflist>
+ </ownedElement>
+ </Package>
+ <Diagram id="2">
+ <namespace>
+ <ref refid="1"/>
+ </namespace>
+ <canvas extents="(9.0, 9.0, 189.0, 247.0)" grid_bg="0xFFFFFFFF"
+ grid_color="0x80ff" grid_int_x="10.0" grid_int_y="10.0"
+ grid_ofs_x="0.0" grid_ofs_y="0.0" snap_to_grid="0"
+ static_extents="0" affine="(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)"
+ id="DCE:xxxx">
+ <item affine="(1.0, 0.0, 0.0, 1.0, 150.0, 50.0)" cid="0x8293e74"
+ height="78.0" subject="3" type="ActorItem" width="38.0"/>
+ <item affine="(1.0, 0.0, 0.0, 1.0, 10.0, 10.0)" cid="0x82e7d74"
+ height="26.0" subject="5" type="CommentItem" width="100.0"/>
+ </canvas>
+ </Diagram>
+ <Actor id="3">
+ <name>
+ <val><![CDATA[Actor]]></val>
+ </name>
+ <namespace>
+ <ref refid="1"/>
+ </namespace
+ </Actor>
+ <UseCase id="4">
+ <namespace>
+ <ref refid="1"/>
+ </namespace>
+ </UseCase>
+ <Comment id="5"/>
+ </Gaphor>
View
27 doc/undo.txt
@@ -1,5 +1,3 @@
-
-
UndoManager
===========
@@ -43,6 +41,7 @@ To update:
tree:
add()
remove()
+
request_update() (should be performed as part of undo action when called)
Solver (?):
@@ -58,7 +57,7 @@ For methods, it should be possible to create a decorator (@reversible) that
schedules a method with the same signature as the calling operation, but with
the inverse effect (e.g. the gaphas.tree module)::
- Tree(object):
+ class Tree(object):
@reversable(lambda s, n, p: s.remove(n))
def add(self, node, parent=None):
@@ -72,17 +71,18 @@ Okay, so the second case is tougher...
So what we did:
-Add a StateManager to gaphas. All changed are send to the statemanager.
-Gaphor should implement it's own state manager.
- + all state changes can easily be recorded
- + fix it in one place
- + reusable throughout Gaphas and subtypes.
+Add a StateManager to gaphas. All changes are sent to the statemanager.
+Gaphor should implement its own state manager.
+
+ * all state changes can easily be recorded
+ * fix it in one place
+ * reusable throughout Gaphas and subtypes.
Transactions
-============
+------------
-Gaphor's Undo manager works transactional. Typically, methods can be
+Gaphor's Undo manager works transactionally. Typically, methods can be
decorated with @transactional and undo data is stored in the current
transaction. A new tx is created when none exists.
@@ -129,20 +129,19 @@ When the topmost Transaction is committed:
When a transaction is rolled back:
1. The main transaction is marked for rollback
-2. When the toplevel tx is rolled back or commited a
+2. When the toplevel tx is rolled back or committed a
TransactionRollback event is emitted
-2. This triggers the UndoManager to play back all recorded actions and
+3. This triggers the UndoManager to play back all recorded actions and
stop listening.
References
-==========
+----------
A Framework for Undoing Actions in Collaborative Systems
http://www.eecs.umich.edu/~aprakash/papers/undo-tochi94.pdf
Undoing Actions in Collaborative Work: Framework and Experience
https://www.eecs.umich.edu/techreports/cse/94/CSE-TR-196-94.pdf
-
Implementing a Selective Undo Framework in Python
http://www.python.org/workshops/1997-10/proceedings/zukowski.html
View
82 doc/win32.txt
@@ -1,73 +1,63 @@
-= Get Gaphor running on Windows =
+Gaphor on Windows
+=================
Gaphor even runs on windows.
- '''NOTE''': The installer is currently broken. For now, use the alternative way as described below (see #128).
+.. warning ::
-Download the installer:
+ The installer is currently broken. For now, use the alternative way
+ as described below (see #128).
-{{{
-#!html
-<div style="float: left; height: 51px; background: #eeeeee url(/projects/gaphor/attachment/wiki/Images/arrow.png?format=raw) no-repeat top right; margin: 0; padding: 3px 36px 10px 5px; border: 1px outset #DDDDCC">
-<a href="http://downloads.sourceforge.net/gaphor/gaphor-0.13.0-py2.5.exe" style="font-size: 26px; font-weight: bold; font-family: Verdana, sans-serif">download<br/><span style="font-size: 11px; padding: 0">windows installer</span></a>
-</div>
-<br style="clear: both" />
-}}}
+Download the installer: http://downloads.sourceforge.net/gaphor/.
+This installer will download all required files and install them (you will
+require an internet connection when running the installer).
-This installer will download all required files and install them (you should have an internet
-connection when running the installer).
+Alternative
+-----------
+Another way is to install the `all-in-one installer <http://osl.ulpgc.es/~arc/gnome/pygtk-setup.exe>`_ from `Alberto Ruiz <http://aruiz.typepad.com/siliconisland/2006/12/allinone_win32_.html>`_. Running the PyGTK installer with default settings will install Python, GTK+ and PyGTK in ``C:\Program Files\PyGTK``.
-----
+After installing Python, PyGTK and the GTK+ runtime environment, you need to install `easy_install <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. Download the latest version from `ez_setup.py <http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py>`_ (place it in ``C:\Program Files\PyGTK`` for example) and run it: Open a command shell (''Start'' -> ''Run...'', type ``cmd`` (enter))::
-For those of you that do not trust installers, check out the alternatives below.
+ C:\>"c:\Program Files\PyGTK\Python\python.exe" "c:\Program Files\PyGTK\ez_setup.py"
-== Alternative ==
+After installing ``easy_install``, first install [http://pypi.python.org/pypi/zope.interface zope.interface]::
-Another way is to install the [http://osl.ulpgc.es/~arc/gnome/pygtk-setup.exe all-in-one installer] from [http://aruiz.typepad.com/siliconisland/2006/12/allinone_win32_.html Alberto Ruiz]. Running the PyGTK installer with default settings will install Python, GTK+ and PyGTK in {{{C:\Program Files\PyGTK}}}.
+ C:\>"c:\Program Files\PyGTK\Python\Scripts\easy_install.exe" zope.interface==3.3.0
-After installing Python, PyGTK and the GTK+ runtime environment, you need to install [http://peak.telecommunity.com/DevCenter/EasyInstall easy_install]. Download the latest version from the [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] (place it in {{{C:\Program Files\PyGTK}}} for example) and run it: Open a command shell (''Start'' -> ''Run...'', type {{{cmd}}} (enter))
+Here version 3.3.0 is installed (instead of the latest version). This is due
+to the fact that no binary distribution is available for the latest
+``zope.interface`` module. No problem. Gaphor will work with an older
+version of ``zope.interface`` too.
-{{{
-C:\>"c:\Program Files\PyGTK\Python\python.exe" "c:\Program Files\PyGTK\ez_setup.py"
-}}}
+After a successful installation of ``zope.interface`` Gaphor should be installed by executing::
-After installing {{{easy_install}}}, first install [http://pypi.python.org/pypi/zope.interface zope.interface]:
+ C:\>"c:\Program Files\PyGTK\Python\Scripts\easy_install.exe" gaphor
-{{{
-C:\>"c:\Program Files\PyGTK\Python\Scripts\easy_install.exe" zope.interface==3.3.0
-}}}
+Now you should be able to start Gaphor my executing ``C:\Program Files\PyGTK\Python\Scripts\gaphor.py``. This work from within the explorer.
-Here version 3.3.0 is installed (instead of the latest version). This is due to the fact that no binary distribution is available for the latest {{{zope.interface}}} module. No problem. Gaphor will work with an older version of {{{zope.interface}}} too.
-After a successful installation of {{{zope.interface}}} Gaphor should be installed by executing:
+If you're a developer and already have Python 2.4 installed you can, as an
+alternative, check out the ``gaphor-win32-libs`` module from Gaphors
+subversion repository or download the zip file from http://svn.devjavu.com/gaphor/gaphor-win32-libs/zips/gaphor-win32-libs.zip.
+Follow the instructions in the ``README.txt`` file.
-{{{
-C:\>"c:\Program Files\PyGTK\Python\Scripts\easy_install.exe" gaphor
-}}}
-Now you should be able to start Gaphor my executing {{{c:\Program Files\PyGTK\Python\Scripts\gaphor.py}}}. This work from within the explorer.
+Troubleshooting
+---------------
+You're getting an error message like this::
-If you're a developer and already have Python 2.4 installed you can, as an alternative, check out the {{{gaphor-win32-libs}}} module from Gaphors subversion repository or download the zip file from http://svn.devjavu.com/gaphor/gaphor-win32-libs/zips/gaphor-win32-libs.zip. Follow the instructions in the {{{README.txt}}} file.
+ error: Setup script exited with error: Python was built with Visual Studio
+ version 7.1, and extensions need to be built with the same version of the
+ compiler, but it isn't installed.
+This is due to the fact that no binary distribution is available for the
+latest ``zope.interface`` module. Try to install an older version of zope.interface (see above).
-== Trouble shooting ==
+My error is more like this::
-''You're getting an error message like this:''
-{{{
-error: Setup script exited with error: Python was built with Visual Studio versi
-on 7.1, and extensions need to be built with the same version of the compiler, b
-ut it isn't installed.
-}}}
-
-This is due to the fact that no binary distribution is available for the latest {{{zope.interface}}} module. Try to install an older version of zope.interface (see above).
-
-''My error is more like this:''
-{{{
-error: Setup script exited with error: command 'gcc' failed: No such file or directory
-}}}
+ error: Setup script exited with error: command 'gcc' failed: No such file or directory
Same reason as described above, you just performed the steps described on CustomInstallationLocation.
-
View
19 doc/xml-format.txt
@@ -11,13 +11,17 @@ piece of cake to generate a DTD too.
These are the things that should be distinguished:
- model elements
-- associations with other model elements (referenced by ID)
+- associations with other model elements (referenced by ID):
+
- 0..1 relations
- 0..* relations
+
- attributes (always have a multiplicity of 0..1)
- diagrams
+
- one canvas
- several canvas items
+
- derived attributes and associations are not saved of course.
Model elements should have their class name as tag name, e.g.::
@@ -29,8 +33,9 @@ Model elements should have their class name as tag name, e.g.::
...
</Package>
-Associations are in two flavors: single and multiple.
-::
+
+Associations are in two flavors: single and multiple::
+
<Class id="DCE:xxx.xxx...">
<package>
<ref refid="DCE:xxx.../>
@@ -45,8 +50,8 @@ Associations are in two flavors: single and multiple.
</ownedClassifier>
</Package>
-Associations contain primitive data, this can always be displayed as strings
-::
+Associations contain primitive data, this can always be displayed as strings::
+
<Class id="DCE:xxx.xxx...">
<name>
<![CDATA[My name]]>
@@ -55,8 +60,8 @@ Associations contain primitive data, this can always be displayed as strings
</Class>
Canvas is the tag in which all canvas related stuff is placed. This is
-the same way it is done now:
-::
+the same way it is done now::
+
<Diagram id="...">
<canvas>
<item type="AssociationItem">
Please sign in to comment.
Something went wrong with that request. Please try again.