Skip to content
Browse files

first commit

  • Loading branch information...
0 parents commit 69216e21c492117bc3fb07cd853c713d75a40556 @kompiro kompiro committed May 15, 2012
Showing with 2,850 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +136 −0 Makefile
  3. +38 −0 ja.json
  4. +178 −0 make.bat
  5. +23 −0 source/_snippets/Activator.java
  6. +117 −0 source/_snippets/AstahAPIUtils.java
  7. +299 −0 source/_snippets/AstahModelUtils.java
  8. +89 −0 source/_snippets/ClassDiagramDropExtension.java
  9. +62 −0 source/_snippets/CountClassAction.java
  10. +27 −0 source/_snippets/HelloWorldAction.java
  11. +91 −0 source/_snippets/HelloWorldView.java
  12. +23 −0 source/_snippets/plugin_count_class_action.xml
  13. +10 −0 source/_snippets/plugin_extraview.xml
  14. +24 −0 source/_snippets/plugin_menu.xml
  15. BIN source/_static/favicon.ico
  16. BIN source/_static/navigation.png
  17. +371 −0 source/_static/sphinxdoc.css
  18. BIN source/_static/top-bar.png
  19. +40 −0 source/_templates/customcover.tmpl
  20. +56 −0 source/_templates/search.html
  21. +23 −0 source/apilist.rst
  22. +118 −0 source/appendixA.rst
  23. +12 −0 source/appendixB.rst
  24. +291 −0 source/conf.py
  25. +124 −0 source/devenv.rst
  26. +99 −0 source/example.rst
  27. +68 −0 source/extraview.rst
  28. +336 −0 source/helloworld.rst
  29. BIN source/images/Eclipse_settings.png
  30. BIN source/images/IntelliJ_settings.png
  31. BIN source/images/added_menu.png
  32. BIN source/images/added_new_menu.png
  33. BIN source/images/archtecture.png
  34. BIN source/images/astah-build-success.png
  35. BIN source/images/astah-generate-project-success.png
  36. BIN source/images/astah-generate-project.png
  37. BIN source/images/astah-launch-success.png
  38. BIN source/images/extend-view.png
  39. BIN source/images/installed_plugin.png
  40. BIN source/images/logo.png
  41. BIN source/images/plugin-list.png
  42. BIN source/images/remote-debug.png
  43. BIN source/images/structure.png
  44. +63 −0 source/index.rst
  45. +14 −0 source/installplugin.rst
  46. +25 −0 source/overview.rst
  47. +26 −0 source/releaseplugin.rst
  48. +66 −0 source/snippets.rst
1 .gitignore
@@ -0,0 +1 @@
+build/*
136 Makefile
@@ -0,0 +1,136 @@
+# 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) source
+
+.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 " pdf to make PDF file"
+ @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/astahPlug-inSDKDocument.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/astahPlug-inSDKDocument.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/astahPlug-inSDKDocument"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/astahPlug-inSDKDocument"
+ @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."
+
+pdf:
+ $(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $(BUILDDIR)/pdf
+ @echo
+ @echo "Build finished; the pdf files are in $(BUILDDIR)/pdf."
38 ja.json
@@ -0,0 +1,38 @@
+{
+ "embeddedFonts" :
+ [[
+ "VL-Gothic-Regular.ttf",
+ "VL-PGothic-Regular.ttf"
+ ]],
+ "fontsAlias" : {
+ "stdFont": "VL-PGothic-Regular",
+ "stdBold": "VL-PGothic-Regular",
+ "stdItalic": "VL-PGothic-Regular",
+ "stdBoldItalic": "VL-PGothic-Regular",
+ "stdMono": "VL-Gothic-Regular",
+ "stdMonoBold": "VL-Gothic-Regular",
+ "stdMonoItalic": "VL-Gothic-Regular",
+ "stdMonoBoldItalic": "VL-Gothic-Regular"
+ },
+ "styles" : [
+ ["base", {
+ "wordWrap": "CJK"
+ }],
+ ["literal", {
+ "wordWrap": "None"
+ }],
+ ["right", {
+ "parent": "bodytext",
+ "alignment": "right"
+ }],
+ ["centered", {
+ "parent": "bodytext",
+ "alignment": "center"
+ }],
+ ["headertable" , {
+ "parent" : "table",
+ "colWidths": ["20%","60%","20%"],
+ "commands": []
+ }]
+ ]
+}
178 make.bat
@@ -0,0 +1,178 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+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
+ echo. pdf to make PDF file
+ 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
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ 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
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\astahPlug-inSDKDocument.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\astahPlug-inSDKDocument.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ 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
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+if "%1" == "pdf" (
+ %SPHINXBUILD% -b pdf %ALLSPHINXOPTS% %BUILDDIR%/pdf
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The PDF files are in %BUILDDIR%/pdf.
+ goto end
+)
+:end
23 source/_snippets/Activator.java
@@ -0,0 +1,23 @@
+package com.example;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+import com.example.internal.ClassDiagramDropExtension;
+import com.example.internal.util.AstahAPIUtils;
+import com.change_vision.jude.api.inf.view.IDiagramViewManager;
+
+public class Activator implements BundleActivator {
+
+ private AstahAPIUtils utils = new AstahAPIUtils();
+
+ public void start(BundleContext context) {
+ ClassDiagramDropExtension diagramDropTargetListener = new ClassDiagramDropExtension();
+ IDiagramViewManager diagramViewManager = utils.getDiagramViewManager();
+ diagramViewManager.addDropTargetListener(diagramDropTargetListener);
+ }
+
+ public void stop(BundleContext context) {
+ }
+
+}
117 source/_snippets/AstahAPIUtils.java
@@ -0,0 +1,117 @@
+/*
+ * Please change this class's package to your genearated Plug-in's package.
+ * Plug-in's package namespace => com.example
+ * com.change_vision.astah.extension.plugin => X
+ * com.example => O
+ * com.example.internal => O
+ * learning => X
+ */
+package com.example.internal;
+
+import javax.swing.JFrame;
+
+import com.change_vision.astah.extension.plugin.util.exception.APIException;
+import com.change_vision.jude.api.inf.editor.BasicModelEditor;
+import com.change_vision.jude.api.inf.editor.ClassDiagramEditor;
+import com.change_vision.jude.api.inf.editor.IDiagramEditorFactory;
+import com.change_vision.jude.api.inf.editor.IModelEditorFactory;
+import com.change_vision.jude.api.inf.exception.InvalidEditingException;
+import com.change_vision.jude.api.inf.exception.InvalidUsingException;
+import com.change_vision.jude.api.inf.model.IClassDiagram;
+import com.change_vision.jude.api.inf.project.ProjectAccessor;
+import com.change_vision.jude.api.inf.project.ProjectAccessorFactory;
+import com.change_vision.jude.api.inf.view.IDiagramViewManager;
+import com.change_vision.jude.api.inf.view.IViewManager;
+
+/**
+ * A class containing utilities easing astah* API operation
+ * Instance must be created before this class is used.
+ */
+public class AstahAPIUtils {
+
+ /**
+ * Get diagramViewManager
+ */
+ public IDiagramViewManager getDiagramViewManager() {
+ IViewManager viewManager = getViewManager();
+ IDiagramViewManager diagramViewManager = viewManager.getDiagramViewManager();
+ return diagramViewManager;
+ }
+
+
+ /**
+ * Get ClassDiagramEditor by which models on class diagrams can be modified
+ */
+ public ClassDiagramEditor getClassDiagramEditor() {
+ try {
+ return getDiagramEditorFactory().getClassDiagramEditor();
+ } catch (InvalidUsingException e) {
+ throw new APIException(e);
+ }
+ }
+
+ /**
+ * Get BasicModelEditor by which basic models can be modified
+ *
+ * @return BasicModelEditor
+ */
+ public BasicModelEditor getBasicModelEditor() {
+ try {
+ return getModelEditorFactory().getBasicModelEditor();
+ } catch (InvalidEditingException e) {
+ throw new APIException(e);
+ }
+ }
+
+ /**
+ * Get ProjectAccessor by which astah* project can be operated
+ */
+ public ProjectAccessor getProjectAccessor() {
+ ProjectAccessor projectAccessor = null;
+ try {
+ projectAccessor = ProjectAccessorFactory.getProjectAccessor();
+ } catch (ClassNotFoundException e) {
+ throw new IllegalStateException(e);
+ }
+ if(projectAccessor == null) throw new IllegalStateException("projectAccessor is null.");
+ return projectAccessor;
+ }
+
+ /**
+ * Get JFrame representing the main window of astah*
+ *
+ * @return JFrame
+ */
+ public JFrame getMainFrame() {
+ return getProjectAccessor().getViewManager().getMainFrame();
+ }
+
+ /**
+ * Get the edition of running astah*
+ */
+ public String getEdition() {
+ return getProjectAccessor().getAstahEdition();
+ }
+
+ private IViewManager getViewManager() {
+ ProjectAccessor projectAccessor = getProjectAccessor();
+ IViewManager viewManager = projectAccessor.getViewManager();
+ if(viewManager == null) throw new IllegalStateException("ViewManager is null.");
+ return viewManager;
+ }
+
+ private IModelEditorFactory getModelEditorFactory() {
+ ProjectAccessor projectAccessor = getProjectAccessor();
+ IModelEditorFactory modelEditorFactory = projectAccessor.getModelEditorFactory();
+ if(modelEditorFactory == null) throw new IllegalStateException("modelEditorFactory is null.");
+ return modelEditorFactory;
+ }
+
+ private IDiagramEditorFactory getDiagramEditorFactory() {
+ ProjectAccessor projectAccessor = getProjectAccessor();
+ IDiagramEditorFactory diagramEditorFactory = projectAccessor.getDiagramEditorFactory();
+ if(diagramEditorFactory == null) throw new IllegalStateException("diagramEditorFactory is null.");
+ return diagramEditorFactory;
+ }
+
+}
299 source/_snippets/AstahModelUtils.java
@@ -0,0 +1,299 @@
+/*
+ * Please change this class's package to your genearated Plug-in's package.
+ * Plug-in's package namespace => com.example
+ * com.change_vision.astah.extension.plugin => X
+ * com.example => O
+ * com.example.internal => O
+ * learning => X
+ */
+package com.example.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.change_vision.jude.api.inf.exception.InvalidEditingException;
+import com.change_vision.jude.api.inf.model.IAttribute;
+import com.change_vision.jude.api.inf.model.IClass;
+import com.change_vision.jude.api.inf.model.IClassifierTemplateParameter;
+import com.change_vision.jude.api.inf.model.IElement;
+import com.change_vision.jude.api.inf.model.IGeneralization;
+import com.change_vision.jude.api.inf.model.INamedElement;
+import com.change_vision.jude.api.inf.model.IOperation;
+import com.change_vision.jude.api.inf.model.IPackage;
+import com.change_vision.jude.api.inf.model.IParameter;
+import com.change_vision.jude.api.inf.model.IRealization;
+
+public class AstahUtils {
+
+ /**
+ * Get classes owned by the owner
+ *
+ * @param owner Class or Package
+ * @return Classes nesting in the owner
+ */
+ public static IClass[] getOwnedClasses(Object owner) {
+ if (owner instanceof IClass) {
+ return ((IClass) owner).getNestedClasses();
+ } else if (owner instanceof IPackage) {
+ List<IClass> classes = new ArrayList<IClass>();
+ for (INamedElement element : ((IPackage) owner).getOwnedElements()) {
+ if (element instanceof IClass) {
+ classes.add((IClass) element);
+ }
+ }
+ return classes.toArray(new IClass[classes.size()]);
+ } else {
+ return new IClass[0];
+ }
+ }
+
+ /**
+ * Get a owner's class whose name is specified
+ *
+ * @param owner Class or Package
+ * @param name Owner name
+ * @return An owner's class whose name is specified
+ */
+ public static IClass getOwnedClass(Object owner, String name) {
+ if (owner instanceof IClass) {
+ return getNestedClass((IClass) owner, name);
+ } else if (owner instanceof IPackage) {
+ return getOwnedElement((IPackage) owner, name, IClass.class);
+ } else {
+ return null;
+ }
+ }
+
+
+ /**
+ * Get an INamedElement whose name is specified in the target package
+ *
+ * @param owner Target package
+ * @param name Name
+ * @return a namedElement whose name is specified in the target package
+ */
+ public static INamedElement getOwnedElement(IPackage owner, String name) {
+ return getOwnedElement(owner, name, INamedElement.class);
+ }
+
+ /**
+ * Get an Object whose name and type are specified in the target package
+ *
+ * @param owner Target package
+ * @param name Name
+ * @param elementType The child class type of INamedElement
+ * @return the child class type of INamedElement whose name and type are specified in the target package
+ */
+ public static <T extends INamedElement> T getOwnedElement(IPackage owner,
+ String name, Class<T> elementType) {
+ for (INamedElement element : owner.getOwnedElements()) {
+ if (name.equals(element.getName())) {
+ if (elementType.isInstance(element)) {
+ return elementType.cast(element);
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a class whose name is specified in the target class
+ *
+ * @param owner Target class
+ * @param name Name
+ * @return a class whose name is specified in the target class
+ */
+ public static IClass getNestedClass(IClass owner, String name) {
+ for (IClass element : owner.getNestedClasses()) {
+ if (name.equals(element.getName())) {
+ return element;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a generalization whose parent class is specified
+ *
+ * @param owner Target class
+ * @param superType Parent class
+ * @return Generalization
+ * Null if the superType isn't generalized by the owner
+ */
+ public static IGeneralization getGeneralization(IClass owner,
+ IClass superType) {
+ for (IGeneralization generalization : owner.getGeneralizations()) {
+ if (superType.equals(generalization.getSuperType())) {
+ return generalization;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a generalization whose child class is specified
+ *
+ * @param owner Target class
+ * @param subType Child class
+ * @return Generalization
+ * Null if the owner isn't generalized by the subType
+ */
+ public static IGeneralization getSpecialization(IClass owner, IClass subType) {
+ for (IGeneralization generalization : owner.getSpecializations()) {
+ if (subType.equals(generalization.getSubType())) {
+ return generalization;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a realization whose supplier class is specified
+ *
+ * @param owner Target class
+ * @param supplier Supplier Class
+ *
+ * @return Realization
+ * Null if the owner isn't realized by the supplier
+ */
+ public static IRealization getClientRealization(IClass owner,
+ IClass supplier) {
+ for (IRealization realization : owner.getClientRealizations()) {
+ if (supplier.equals(realization.getSupplier())) {
+ return realization;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a realization whose client class is specified
+ *
+ * @param owner Target class
+ * @param client Client Class
+ *
+ * @return Realization
+ * Null if the client isn't realized by the owner
+ */
+ public static IRealization getSupplierRealization(IClass owner,
+ IClass client) {
+ for (IRealization realization : owner.getSupplierRealizations()) {
+ if (client.equals(realization.getClient())) {
+ return realization;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Get a owner's template parameter whose name is specified
+ *
+ * @param owner Target class
+ * @param name Parameter Name
+ * @return Template Parameter
+ * Null if the template parameter dosn't exist
+ */
+ public static IClassifierTemplateParameter getTemplateParameter(
+ IClass owner, String name) {
+ for (IClassifierTemplateParameter templateParameter : owner
+ .getTemplateParameters()) {
+ if (name.equals(templateParameter.getName())) {
+ return templateParameter;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a owner's attribute whose name is specified
+ *
+ * @param owner Target class
+ * @param name Attribute name
+ * @return Attribute
+ * Null if the attribute dosn't exist
+ */
+ public static IAttribute getAttribute(IClass owner, String name) {
+ for (IAttribute attribute : owner.getAttributes()) {
+ if (name.equals(attribute.getName())) {
+ return attribute;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a owner's operation whose name is specified。
+ *
+ * @param owner Target class
+ * @param name Operation name
+ * @return Operation
+ * Null if the operation dosn't exist
+ */
+ public static IOperation getOperation(IClass owner, String name,
+ Object[] parameterTypes) {
+ for (IOperation operation : owner.getOperations()) {
+ if (name.equals(operation.getName())) {
+ IParameter[] parameters = operation.getParameters();
+ if (matches(parameters, parameterTypes)) {
+ return operation;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * set a class as an interface
+ *
+ * @param type Target class
+ * @param isInterfase True if the class is an interface
+ * False if the class isn't an interface
+ */
+ public static void setInterface(IClass type, boolean isInterface)
+ throws InvalidEditingException {
+ if (isInterface) {
+ addStereotype(type, "interface");
+ } else {
+ type.removeStereotype("interface");
+ }
+ }
+
+ /**
+ * Add a stereotype to an element
+ * @param element Target element
+ * @param stereotype Added stereotype
+ * @return True if the stereotype is added
+ * False if the stereotype has been owned by the element
+ */
+ public static boolean addStereotype(IElement element, String stereotype)
+ throws InvalidEditingException {
+ for (String exists : element.getStereotypes()) {
+ if (stereotype.equals(exists)) {
+ return false;
+ }
+ }
+ element.addStereotype(stereotype);
+ return true;
+ }
+
+ static boolean matches(IParameter[] parameters, Object[] parameterTypes) {
+ if (parameterTypes.length != parameters.length) {
+ return false;
+ }
+ for (int i = 0; i < parameterTypes.length; i++) {
+ Object type = parameterTypes[i];
+ if (type instanceof IClass) {
+ if (!type.equals(parameters[i].getType())) {
+ return false;
+ }
+ } else {
+ if (!type.equals(parameters[i].getTypeExpression())) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
89 source/_snippets/ClassDiagramDropExtension.java
@@ -0,0 +1,89 @@
+/*
+ * Please change this class's package to your genearated Plug-in's package.
+ * Plug-in's package namespace => com.example
+ * com.change_vision.astah.extension.plugin => X
+ * com.example => O
+ * com.example.internal => O
+ * learning => X
+ */
+package com.example.internal;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import com.change_vision.jude.api.inf.model.IClassDiagram;
+import com.change_vision.jude.api.inf.view.DiagramDropTargetListener;
+
+public final class ClassDiagramDropExtension extends DiagramDropTargetListener {
+
+ public ClassDiagramDropExtension() {
+ super(IClassDiagram.class);
+ }
+
+ @Override
+ public void dropExternalData(DropTargetDropEvent dtde) {
+ if(dtde.isLocalTransfer()) return;
+
+ if(dtde.isDataFlavorSupported(DataFlavor.stringFlavor)) {
+ System.out.println("ClassDiagramDropExtension.stringFlavor" + getURLStringFromDropContent(dtde));
+ dtde.dropComplete(true);
+ } else if (dtde.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
+ List<File> files = getFilesFromDropContent(dtde);
+ System.out.println("javaFileListFravor" + files);
+ dtde.dropComplete(true);
+ }
+ }
+
+ private String getURLStringFromDropContent(DropTargetDropEvent dtde) {
+ dtde.acceptDrop(DnDConstants.ACTION_LINK);
+ Transferable target = dtde.getTransferable();
+
+ String urlString;
+ try {
+ urlString = (String)target.getTransferData(DataFlavor.stringFlavor);
+ } catch (Exception e) {
+ urlString = "";
+ }
+ return urlString;
+ }
+
+ @SuppressWarnings("unchecked")
+ private List<File> getFilesFromDropContent(DropTargetDropEvent dtde) {
+ dtde.acceptDrop(DnDConstants.ACTION_COPY);
+ List<File> list;
+ try {
+ list = (List<File>) dtde.getTransferable().getTransferData(DataFlavor.javaFileListFlavor);
+ } catch (Exception e) {
+ list = new ArrayList<File>();
+ }
+ return list;
+ }
+
+ @Override
+ public void dropModels(DropTargetDropEvent dtde, Set<?> models) {
+ }
+
+ @Override
+ public void dragEnter(DropTargetDragEvent dtde) {
+ }
+
+ @Override
+ public void dragExit(DropTargetEvent dte) {
+ }
+
+ @Override
+ public void dragOver(DropTargetDragEvent dtde) {
+ }
+
+ @Override
+ public void dropActionChanged(DropTargetDragEvent dtde) {
+ }
+}
62 source/_snippets/CountClassAction.java
@@ -0,0 +1,62 @@
+/*
+ * Please change this class's package to your genearated Plug-in's package.
+ * Plug-in's package namespace => com.example
+ * com.change_vision.astah.extension.plugin => X
+ * com.example => O
+ * com.example.internal => O
+ * learning => X
+ */
+package com.example.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.JOptionPane;
+import com.change_vision.jude.api.inf.exception.ProjectNotFoundException;
+import com.change_vision.jude.api.inf.model.IClass;
+import com.change_vision.jude.api.inf.model.IModel;
+import com.change_vision.jude.api.inf.model.INamedElement;
+import com.change_vision.jude.api.inf.model.IPackage;
+import com.change_vision.jude.api.inf.project.ProjectAccessor;
+import com.change_vision.jude.api.inf.project.ProjectAccessorFactory;
+import com.change_vision.jude.api.inf.ui.IPluginActionDelegate;
+import com.change_vision.jude.api.inf.ui.IWindow;
+
+public class CountClassAction implements IPluginActionDelegate {
+ public Object run(IWindow window) throws UnExpectedException {
+ try {
+ ProjectAccessor projectAccessor = ProjectAccessorFactory.getProjectAccessor();
+ IModel iCurrentProject = projectAccessor.getProject();
+ List<IClass> classeList = new ArrayList<IClass>();
+ getAllClasses(iCurrentProject, classeList);
+ JOptionPane.showMessageDialog(window.getParent(),
+ "There are " + classeList.size() + " classes.");
+ } catch (ProjectNotFoundException e) {
+ String message = "Please open a project";
+ JOptionPane.showMessageDialog(window.getParent(), message,
+ "Warning", JOptionPane.WARNING_MESSAGE);
+ throw new CalculateUnExpectedException();
+ } catch (Exception e) {
+ JOptionPane.showMessageDialog(window.getParent(),
+ "Exception occured", "Alert", JOptionPane.ERROR_MESSAGE);
+ throw new UnExpectedException();
+ }
+ return null;
+ }
+
+ public class CalculateUnExpectedException extends UnExpectedException {
+ }
+
+ private void getAllClasses(INamedElement element, List<IClass> classList)
+ throws ClassNotFoundException, ProjectNotFoundException {
+ if (element instanceof IPackage) {
+ for(INamedElement ownedNamedElement : ((IPackage)element).getOwnedElements()) {
+ getAllClasses(ownedNamedElement, classList);
+ }
+ } else if (element instanceof IClass) {
+ classList.add((IClass)element);
+ for(IClass nestedClasses : ((IClass)element).getNestedClasses()) {
+ getAllClasses(nestedClasses, classList);
+ }
+ }
+ }
+}
27 source/_snippets/HelloWorldAction.java
@@ -0,0 +1,27 @@
+/*
+ * Please change this class's package to your genearated Plug-in's package.
+ * Plug-in's package namespace => com.example
+ * com.change_vision.astah.extension.plugin => X
+ * com.example => O
+ * com.example.internal => O
+ * learning => X
+ */
+package com.example.actions;
+
+
+import javax.swing.JOptionPane;
+import com.change_vision.jude.api.inf.ui.IPluginActionDelegate;
+import com.change_vision.jude.api.inf.ui.IWindow;
+
+public class HelloWorldAction implements IPluginActionDelegate {
+ public Object run(IWindow window) throws UnExpectedException {
+ try {
+ JOptionPane.showMessageDialog(window.getParent(), "Hello World");
+ } catch (Exception e) {
+ JOptionPane.showMessageDialog(window.getParent(),
+ "Exception occured", "Alert", JOptionPane.ERROR_MESSAGE);
+ throw new UnExpectedException();
+ }
+ return null;
+ }
+}
91 source/_snippets/HelloWorldView.java
@@ -0,0 +1,91 @@
+/*
+ * Please change this class's package to your genearated Plug-in's package.
+ * Plug-in's package namespace => com.example
+ * com.change_vision.astah.extension.plugin => X
+ * com.example => O
+ * com.example.internal => O
+ * learning => X
+ */
+package com.example.internal;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Container;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import com.change_vision.jude.api.inf.project.ProjectAccessor;
+import com.change_vision.jude.api.inf.project.ProjectAccessorFactory;
+import com.change_vision.jude.api.inf.project.ProjectEvent;
+import com.change_vision.jude.api.inf.project.ProjectEventListener;
+import com.change_vision.jude.api.inf.ui.IPluginExtraTabView;
+import com.change_vision.jude.api.inf.ui.ISelectionListener;
+
+public class HelloWorldView extends JPanel
+ implements IPluginExtraTabView, ProjectEventListener {
+ public HelloWorldView() {
+ initComponents();
+ }
+
+ private void initComponents() {
+ setLayout(new BorderLayout());
+ add(createLabelPane(), BorderLayout.CENTER);
+ addProjectEventListener();
+ }
+
+ private void addProjectEventListener() {
+ try {
+ ProjectAccessor projectAccessor = ProjectAccessorFactory.getProjectAccessor();
+ projectAccessor.addProjectEventListener(this);
+ } catch (ClassNotFoundException e) {
+ e.getMessage();
+ }
+ }
+
+ private Container createLabelPane() {
+ JLabel label = new JLabel("hello world");
+ JScrollPane pane = new JScrollPane(label);
+ return pane;
+ }
+
+ @Override
+ public void projectChanged(ProjectEvent e) {
+ }
+
+ @Override
+ public void projectClosed(ProjectEvent e) {
+ }
+
+ @Override
+ public void projectOpened(ProjectEvent e) {
+ }
+
+ @Override
+ public void addSelectionListener(ISelectionListener listener) {
+ }
+
+ @Override
+ public Component getComponent() {
+ return this;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Show Hello World here";
+ }
+
+ @Override
+ public String getTitle() {
+ return "Hello World View";
+ }
+
+ public void activated() {
+
+ }
+
+ public void deactivated() {
+
+ }
+}
23 source/_snippets/plugin_count_class_action.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <extension point="com.change_vision.astah.ui.actionSets">
+ <actionSet
+ label="%action_set_label "
+ visible="true"
+ id="com.example.actions.actionSet1">
+ <menu
+ label="%sample_menu"
+ id="sampleMenu"
+ path="tool/sampleMenu">
+ </menu>
+ <action
+ label="%count_classes"
+ icon="icons/sample.gif"
+ class="com.example.actions.CountClassAction"
+ tooltip="Count classes"
+ menubarPath="tool/sampleMenu/"
+ id="com.example.actions.CountClassdAction">
+ </action>
+ </actionSet>
+ </extension>
+</plugin>
10 source/_snippets/plugin_extraview.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <extension point="com.change_vision.astah.ui.view">
+ <view
+ id="com.example.internal.HelloWorldView"
+ type="extraTab"
+ class="com.example.internal.HelloWorldView" />
+ </extension>
+</plugin>
+
24 source/_snippets/plugin_menu.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+ <extension point="com.change_vision.astah.ui.actionSets">
+ <actionSet
+ label="%action_set_label"
+ visible="true"
+ id="com.example.helloworld.actionSet">
+ <menu
+ id="helloworld"
+ label="%menu_group"
+ path="tool/helloworld">
+ </menu>
+ <action
+ label="%menu_label"
+ icon="icons/sample.gif"
+ class="com.example.TemplateAction"
+ tooltip="%menu_tooltip"
+ menubarPath="tool/helloworld/"
+ id="com.example.actions.HelloWorldAction">
+ </action>
+ </actionSet>
+ </extension>
+</plugin>
+
BIN source/_static/favicon.ico
Binary file not shown.
BIN source/_static/navigation.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
371 source/_static/sphinxdoc.css
@@ -0,0 +1,371 @@
+/*
+ * sphinxdoc.css_t
+ * ~~~~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- sphinxdoc theme. Originally created by
+ * Armin Ronacher for Werkzeug.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+ font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
+ 'Verdana', sans-serif;
+ font-size: 14px;
+ letter-spacing: -0.01em;
+ line-height: 150%;
+ text-align: center;
+ background-color: #DBDBD1;
+ color: #222;
+ padding: 0;
+ padding-top: 100px;
+ margin-left: auto;
+ margin-right: auto;
+ max-width: 920px;
+ margin-top: 0px;
+ margin-bottom: Opx;
+
+ background-image: url(top-bar.png); background-repeat: no-repeat; background-position-x: center; background-position-y: top;
+}
+
+
+div.document {
+
+ background-color: white;
+ text-align: left;
+ background-image: url(contents.png);
+ background-repeat: repeat-x;
+}
+
+div.bodywrapper {
+ margin: 0 240px 0 0;
+ border-right: 1px solid #ccc;
+}
+
+div.body {
+ margin: 0;
+ padding: 0.5em 20px 20px 20px;
+
+}
+
+div.related {
+ font-size: 1em;
+
+
+}
+
+div.related ul {
+ background-image: url(navigation.png);
+ color: #222;
+ height: 2em;
+ border-bottom: 1px solid #ddd;
+}
+
+div.related ul li {
+ margin: 0;
+ padding: 0;
+ height: 2em;
+ float: left;
+}
+
+div.related ul li.right {
+ float: right;
+ margin-right: 5px;
+}
+
+div.related ul li a {
+ margin: 0;
+ padding: 0 5px 0 5px;
+ line-height: 1.75em;
+ color: #222;
+}
+
+div.related ul li a:hover {
+ color: #222;
+ text-decoration: underline;
+}
+
+div.sphinxsidebarwrapper {
+ padding: 0;
+}
+
+div.sphinxsidebar {
+ margin: 0;
+ padding: 0.5em 15px 15px 0;
+ width: 210px;
+ float: right;
+ font-size: 0.9em;
+ text-align: left;
+}
+
+div.sphinxsidebar h3, div.sphinxsidebar h4 {
+ margin: 1em 0 0.5em 0;
+ font-size: 1em;
+ padding: 0.1em 0 0.1em 0.5em;
+ color: white;
+ background-color: #CBC5B8;
+}
+
+div.sphinxsidebar h3 a {
+ color: white;
+}
+
+div.sphinxsidebar p {
+ margin: 0.8em 0 0.5em 0;
+
+}
+
+ div#searchbox p.searchtip {
+ font-style: italic;
+}
+
+div.sphinxsidebar ul {
+ padding-left: 0em;
+ margin-left: 0px;
+ margin-top: 7px;
+ padding: 0;
+ line-height: 130%;
+}
+
+div.sphinxsidebar ul ul {
+ margin-left: 20px;
+}
+
+div.sphinxsidebar input{
+ border: 1px solid #CBC5B8;
+ font-family: sans-serif;
+ font-size: 1em;
+ margin: 0.5em 0 -.5em 0;
+
+}
+
+div.sphinxsidebar a {
+ text-decoration: underline;
+}
+
+
+div.footer {
+ background-color: #DBDBD1;
+ color: #86989B;
+ padding: 3px 8px 3px 0;
+ clear: both;
+ font-size: 0.8em;
+ text-align: right;
+}
+
+div.footer a {
+ color: #DBE240;
+ text-decoration: underline;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+p {
+ margin: 0.8em 0 0.5em 0;
+}
+
+a {
+ color: #686868;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #;
+}
+
+div.body a {
+ text-decoration: underline;
+}
+
+h1 {
+ margin: 0;
+ padding: 0.7em 0 0.3em 0;
+ font-size: 1.5em;
+ color: #666;
+}
+
+h2 {
+ margin: 1.3em 0 0.2em 0;
+ font-size: 1.35em;
+ padding: 0;
+}
+
+h3 {
+ margin: 1em 0 -0.3em 0;
+ font-size: 1.2em;
+}
+
+div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a {
+ color: black!important;
+}
+
+h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
+ display: none;
+ margin: 0 0 0 0.3em;
+ padding: 0 0.2em 0 0.2em;
+ color: #aaa!important;
+}
+
+h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor,
+h5:hover a.anchor, h6:hover a.anchor {
+ display: inline;
+}
+
+h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover,
+h5 a.anchor:hover, h6 a.anchor:hover {
+ color: #777;
+ background-color: #eee;
+}
+
+a.headerlink {
+ color: #c60f0f!important;
+ font-size: 1em;
+ margin-left: 6px;
+ padding: 0 4px 0 4px;
+ text-decoration: none!important;
+}
+
+a.headerlink:hover {
+ background-color: #ccc;
+ color: white!important;
+}
+
+cite, code, tt {
+ font-family: 'Consolas', 'Deja Vu Sans Mono',
+ 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.95em;
+ letter-spacing: 0.01em;
+}
+
+tt {
+ background-color: #f2f2f2;
+ border-bottom: 1px solid #ddd;
+ color: #333;
+}
+
+tt.descname, tt.descclassname, tt.xref {
+ border: 0;
+}
+
+hr {
+ border: 1px solid #abc;
+ margin: 2em;
+}
+
+a tt {
+ border: 0;
+ color: #CA7900;
+}
+
+a tt:hover {
+ color: #2491CF;
+}
+
+pre {
+ font-family: 'Consolas', 'Deja Vu Sans Mono',
+ 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.95em;
+ letter-spacing: 0.015em;
+ line-height: 120%;
+ padding: 0.5em;
+ border: 1px solid #ccc;
+ background-color: #f8f8f8;
+}
+
+pre a {
+ color: inherit;
+ text-decoration: underline;
+}
+
+td.linenos pre {
+ padding: 0.5em 0;
+}
+
+div.quotebar {
+ background-color: #f8f8f8;
+ max-width: 250px;
+ float: right;
+ padding: 2px 7px;
+ border: 1px solid #ccc;
+}
+
+div.topic {
+ background-color: #f8f8f8;
+}
+
+table {
+ border-collapse: collapse;
+ margin: 0 -0.5em 0 -0.5em;
+}
+
+table td, table th {
+ padding: 0.2em 0.5em 0.2em 0.5em;
+}
+
+div.admonition, div.warning {
+ font-size: 0.9em;
+ margin: 1em 0 1em 0;
+ border: 1px solid #86989B;
+ background-color: #f7f7f7;
+ padding: 0;
+}
+
+div.admonition p, div.warning p {
+ margin: 0.5em 1em 0.5em 1em;
+ padding: 0;
+}
+
+div.admonition pre, div.warning pre {
+ margin: 0.4em 1em 0.4em 1em;
+}
+
+div.admonition p.admonition-title,
+div.warning p.admonition-title {
+ margin: 0;
+ padding: 0.1em 0 0.1em 0.5em;
+ color: white;
+ border-bottom: 1px solid #86989B;
+ font-weight: bold;
+ background-color: #AFC1C4;
+}
+
+div.warning {
+ border: 1px solid #940000;
+}
+
+div.warning p.admonition-title {
+ background-color: #CF0000;
+ border-bottom-color: #940000;
+}
+
+div.admonition ul, div.admonition ol,
+div.warning ul, div.warning ol {
+ margin: 0.1em 0.5em 0.5em 3em;
+ padding: 0;
+}
+
+div.versioninfo {
+ margin: 1em 0 0 0;
+ border: 1px solid #ccc;
+ background-color: #DDEAF0;
+ padding: 8px;
+ line-height: 1.3em;
+ font-size: 0.9em;
+}
+
+.viewcode-back {
+ font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
+ 'Verdana', sans-serif;
+}
+
+div.viewcode-block:target {
+ background-color: #f4debf;
+ border-top: 1px solid #ac9;
+ border-bottom: 1px solid #ac9;
+}
BIN source/_static/top-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 source/_templates/customcover.tmpl
@@ -0,0 +1,40 @@
+.. role:: normal
+
+<?py if title: ?>
+
+.. cssclass:: title
+
+#{title}
+
+<?py #end ?>
+
+<?py if subtitle: ?>
+
+.. cssclass:: subtitle
+
+#{subtitle}
+
+<?py #end ?>
+
+.. raw:: pdf
+
+ Spacer 0 3cm
+
+<?py for author in authors: ?>
+.. cssclass:: author
+
+#{author}
+
+<?py #end ?>
+
+.. raw:: pdf
+
+ Spacer 0 3cm
+
+.. cssclass:: author
+
+:normal:`#{date}`
+
+.. raw:: pdf
+
+ PageBreak
56 source/_templates/search.html
@@ -0,0 +1,56 @@
+{#
+ basic/search.html
+ ~~~~~~~~~~~~~~~~~
+
+ Template for the search page.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
+{% extends "layout.html" %}
+{% set title = _('Search') %}
+{% set script_files = script_files + ['_static/searchtools.js'] %}
+{% block extrahead %}
+ <script type="text/javascript">
+ jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
+ </script>
+ {{ super() }}
+{% endblock %}
+{% block body %}
+ <h1 id="search-documentation">{{ _('Search') }}</h1>
+ <div id="fallback" class="admonition warning">
+ <script type="text/javascript">$('#fallback').hide();</script>
+ <p>
+ {% trans %}Please activate JavaScript to enable the search
+ functionality.{% endtrans %}
+ </p>
+ </div>
+ <p>
+ {% trans %}You can search a document by entering your search words in to the box
+ below and click "search". Please note that this will automatically
+ search for all of the words entered in the box and pages containing fewer words
+ won't appear in the result list..{% endtrans %}
+ </p>
+ <form action="" method="get">
+ <input type="text" name="q" value="" />
+ <input type="submit" value="{{ _('search') }}" />
+ <span id="search-progress" style="padding-left: 10px"></span>
+ </form>
+ {% if search_performed %}
+ <h2>{{ _('Search Results') }}</h2>
+ {% if not search_results %}
+ <p>{{ _('Your search did not match any results.') }}</p>
+ {% endif %}
+ {% endif %}
+ <div id="search-results">
+ {% if search_results %}
+ <ul>
+ {% for href, caption, context in search_results %}
+ <li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
+ <div class="context">{{ context|e }}</div>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+{% endblock %}
23 source/apilist.rst
@@ -0,0 +1,23 @@
+
+.. astah*のプラグイン開発で利用できるAPI 一覧
+
+Related Links
+=======================================================
+
+..
+ astah*のプラグインに関するAPIの情報はastah* API利用ガイドおよびJavaDocを参照してください。
+
+Astah API
+-------------------------------------------------------
+
+Please refer to the following contents for details about Astah API.
+
+ * `Astah API User Guide <http://members.change-vision.com/javadoc/astah-api/latest/api/en/doc/index.html>`_
+ * `Astah API JavaDoc <http://members.change-vision.com/javadoc/astah-api/latest/api/en/doc/javadoc/index.html>`_
+
+Maven
+-------------------------------------------------------
+Astah Plug-in SDK is based on Maven.
+Please refere to the following contents for details about Maven.
+
+ * `Maven Getting Started Guide <http://maven.apache.org/guides/getting-started/index.html>`_
118 source/appendixA.rst
@@ -0,0 +1,118 @@
+
+Astah Menu ID List
+=======================================================
+
+======================================== =======================================
+Menu ID
+======================================== =======================================
+File file
+Edit edit
+Diagram diagram
+Alignment alignment
+View view
+Tool tool
+Window window
+Help help
+New file/new
+New By Template file/new_template
+Open file/open
+Save file/save
+Save As file/saveas
+Close file/close
+Merge Project file/import_model_by_uuid
+Reference Model Management file/refer_model_management
+Compare Project file/compare_project
+Print Setup (Project)) file/print_setup
+Print Setup (Diagram) file/print_setup_dgm
+Print Preview file/print_preview
+Print file/print
+Preview Multi file/preview_multi
+Print Multi file/print_multi
+Exit file/exit
+Undo edit/undo
+Redo edit/redo
+Copy edit/copy
+Copy to Clipboard edit/copys
+Paste edit/paste
+Copy Style edit/style_copy
+Paste Style edit/style_paste
+Delete from Model edit/delete_from_model
+Delete from Diagram edit/delete_from_diagram
+Line Style edit/line_style
+Shared Style edit/shared_style
+Stereotype edit/stereotype
+Set Color edit/set_color
+Set Line Color edit/set_line_color
+Set Font Color edit/set_font_color
+Set Color for Stereotype edit/stereotype_color
+Search on Diagram edit/dgm_search
+Select All edit/select_all
+Depth Arrangement edit/arrange_depth
+Class Diagram diagram/class_diagram
+UseCase Diagram diagram/usecase_diagram
+Satemachine Diagram diagram/state_chart_diagram
+Activity Diagram diagram/activity_diagram
+Sequence Diagram diagram/sequence_diagram
+Communication Diagram diagram/collaboration_diagram
+Component Diagram diagram/component_diagram
+Deployment Diagram diagram/deployment_diagram
+Composite Structure Diagram diagram/compositestructure_diagram
+Flowchart diagram/flow_chart_diagram
+Data Flow Diagram diagram/data_flow_diagram
+ER Diagram diagram/er_diagram
+CRUD diagram/crud_diagram
+Mindmap diagram/mind_map_diagram
+Requirement Diagram diagram/requirement_diagram
+Requirement Table diagram/requirement_table
+Align Horizontally alignment/align_horizontally
+Align Vertically alignment/align_vertically
+Adjust Size alignment/align_size
+Auto Layout alignment/auto_layout
+Partial Auto Layout alignment/partial_layout
+Zoom view/zoom
+Zoom In view/zoom_in
+Zoom Out view/zoom_out
+Fit to Window view/fit_window
+Back to Previous Editor view/drop_down_back_list
+Forward to Next Editor view/drop_down_forward_list
+Show/Hide Project View view/show_hide_project_view
+Show/Hide Extend View view/show_hide_plugin_view
+Look & Feel view/ui
+Alias view/alias
+Export Image tool/export_image
+Export Html (javadoc) tool/export_html
+Export CSV tool/export_csv
+XML Input & Output tool/xmi
+Export RTF tool/export_rtf
+Mindmap tool/mindmap
+Java tool/java
+C# tool/c_sharp
+C++ tool/c_plus
+ER Diagram tool/er
+CRUD tool/crud
+Requirement tool/requirement
+Traceability Map tool/traceability
+Set Template tool/template
+Search Invalid Hyperlinks tool/search_invalid_hyperlinks
+Import User Defined TaggedValue tool/update_custom_taggedvalue
+External Tool tool/external_tool
+Correct Model tool/correct_model
+License tool/check_license
+Project tool/project_property
+System Properties tool/system_property
+Close window/close_current
+Close Left Tabs window/close_left
+Close Right Tabs window/close_right
+Close Others window/close_other
+Close All window/close_all
+Alignment window/alignment
+Astah Website help/jude_home
+Astah Community Site help/jude_community
+Astah Reference Manual help/jude_help
+Welcome to Astah Professional help/welcome
+Bug Information help/bug_info_community
+Astah Support help/jude_support_site
+Plugin List help/plugin_list
+Software Update Information help/check_version
+Version Information help/version
+======================================== =======================================
12 source/appendixB.rst
@@ -0,0 +1,12 @@
+
+Astah Plug-in SDK Command List
+=======================================================
+
+======================================= ============================================
+Command Help
+======================================= ============================================
+asdk Show version
+astah-generate-project Generate Plug-in project
+astah-launch Launch Astah with dev Plug-ins
+astah-debug Launch Astah and open 44000 for debugging
+======================================= ============================================
291 source/conf.py
@@ -0,0 +1,291 @@
+# -*- coding: utf-8 -*-
+#
+# Astah Plug-in SDK Document documentation build configuration file, created by
+# sphinx-quickstart on Mon Oct 03 16:49:51 2011.
+#
+# 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','rst2pdf.pdfbuilder']
+extensions = ['sphinx.ext.autodoc']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Astah Plug-in Tutorial'
+copyright = u'2012, Change Vision,inc'
+
+# 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 = '1.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.0'
+
+# 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 = []
+
+# 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 = 'sphinxdoc'
+
+# 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 = "favicon.ico"
+
+# 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 = 'astahPlug-inSDKDocumentdoc'
+
+
+# -- 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 = [
+ ('index', 'astahPlug-inSDKDocument.tex', u'Asteh Plug-in SDK Document Documentation',
+ u'Change Vision,inc', '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 = [
+ ('index', 'astahplug-insdkdocument', u'Astah Plug-in SDK Document Documentation',
+ [u'Change Vision,inc'], 1)
+]
+
+# -- Options for PDF output --------------------------------------------------
+
+## Grouping the document tree into PDF files. List of tuples
+## (source start file, target name, title, author, options).
+##
+## If there is more than one author, separate them with \\.
+## For example: r'Guido van Rossum\\Fred L. Drake, Jr., editor'
+##
+## The options element is a dictionary that lets you override
+## this config per-document.
+## For example,
+## ('index', u'MyProject', u'My Project', u'Author Name',
+## dict(pdf_compressed = True))
+## would mean that specific document would be compressed
+## regardless of the global pdf_compressed setting.
+#
+#pdf_documents = [
+# ('index', u'Astah-plugin-tutorial', u'Astah Plug-in Tutorial', u'Change Vision inc,'),
+#]
+#
+## A comma-separated list of custom stylesheets. Example:
+#pdf_stylesheets = ['sphinx','kerning','a4','ja']
+#
+## Create a compressed PDF
+## Use True/False or 1/0
+## Example: compressed=True
+##pdf_compressed = False
+#
+## A colon-separated list of folders to search for fonts. Example:
+#pdf_font_path = [os.path.normpath(os.path.join(os.getcwd(),'../Font/VLGothic'))]
+#
+## Language to be used for hyphenation support
+#pdf_language = "en"
+#
+## Mode for literal blocks wider than the frame. Can be
+## overflow, shrink or truncate
+#pdf_fit_mode = "shrink"
+#
+## Section level that forces a break page.
+## For example: 1 means top-level sections start in a new page
+## 0 means disabled
+##pdf_break_level = 0
+#
+## When a section starts in a new page, force it to be 'even', 'odd',
+## or just use 'any'
+##pdf_breakside = 'any'
+#
+## Insert footnotes where they are defined instead of
+## at the end.
+#pdf_inline_footnotes = True
+#
+## verbosity level. 0 1 or 2
+##pdf_verbosity = 0
+#
+## If false, no index is generated.
+##pdf_use_index = True
+#
+## If false, no modindex is generated.
+##pdf_use_modindex = True
+#
+## If false, no coverpage is generated.
+##pdf_use_coverpage = True
+#pdf_cover_template = '_templates/customcover.tmpl'
+#
+## Documents to append as an appendix to all manuals.
+##pdf_appendices = ['appendixA','appendixB']
+#
+## Enable experimental feature to split table cells. Use it
+## if you get "DelayedTable too big" errors
+##pdf_splittables = False
+#
+## Set the default DPI for images
+#pdf_default_dpi = 96
124 source/devenv.rst
@@ -0,0 +1,124 @@
+
+.. astah*のプラグインの開発環境を構築しましょう
+
+Let's set up the development environment for Astah Plug-ins
+=============================================================
+
+.. astah*のプラグイン開発環境として、astah* Plug-in SDKを配布しています。このSDKはMaven 3をベースにカスタマイズしたものです。
+
+`We provide Astah Plug-in SDK <http://astah.net/features/plugins#develop>`_ on our website which is based on Maven3.
+
+.. ここではastah*のプラグインの開発環境を構築しましょう。`なお、astah*プラグイン開発環境のシステム要件は、astah*に準じます。 <http://astah.change-vision.com/ja/product/astah-requirement.html>`_
+
+Let's set up your development environment for Astah Plug-ins! `System Requirements for this environment are same as Astah's <http://astah.change-vision.com/en/product/astah-requirement.html>`_.
+
+.. まず配布されているastah* Plug-in SDKを適当なフォルダに展開します。次に以下に挙げる環境変数を設定します。
+
+
+..
+ * 環境変数「ASDK_HOME」を追加し、展開したフォルダを指定する。
+ * 環境変数「PATH」にastah* Plug-in SDKの実行ファイルがある「%ASDK_HOME%\\bin」フォルダ(Linux/Mac OS Xをお使いであれば「$ASDK_HOME/bin」)を追加する。
+
+At first, extract the Astah Plug-in SDK to a folder and then set the following environment variables.
+
+* Add [ASDK_HOME] and specify the folder where you deployed the Astah Plug-in SDK ::
+
+ e.g.) set ASDK_HOME=C:\dev\astah-plugin-SDK-1.0
+
+* Specify "%ASDK_HOME%\\bin" ("$ASDK_HOME/bin" if you are using Linux or Mac OS X) folder to [PATH], where the excutable files of Astah Plug-in SDK's exist ::
+
+ e.g.) set PATH=%ASDK_HOME%\bin;%PATH%
+
+.. 以上の作業が終了したら、次のコマンドを入力してみましょう。 ::
+
+Then run the command below. ::
+
+ > asdk
+
+.. 以下のような出力が得られれば、astah* Plug-in SDKのインストールは完了です。 ::
+
+If the below appears, that means installation of Astah Plug-in SDK is completed. ::
+
+ > astah* Plug-in SDK version: 1.0
+
+..
+ 次にastah* Plug-in SDKからastah*が起動できることを確認するために、下記のコマンドを入力してみましょう。 ::
+
+Now, run the command below to make sure Astah launches on the SDK. ::
+
+ > astah-launch
+
+..
+ うまく行くと、お使いのastah*が起動されます。
+
+Then Astah should launch now.
+
+.. もし、64bit版Windowsをご利用で、32bit版astah*をインストールしている場合や、デフォルトのパス以外にastah*をインストールしている場合は起動できません。パスを変更してインストールしているために、astah*を起動できない場合は、%ASDK_HOME%\\conf\\settings.xmlの中の<profile>タグに囲まれた部分を適切に設定します。お使いの「エディション」と「OS」に対応するID「astah-<エディション>-<os>」のプロファイルを適切なパスに修正してください。
+
+..
+ <profile>
+ <id>astah-professional-windows</id> <!-- このIDの[professional]はastah*のエディション、[windows]はosです -->
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <file>
+ <exists>C:/astah-professional/astah-pro.jar</exists> <!-- ココ -->
+ </file>
+ </activation>
+ <properties>
+ <astahPath>C:/astah-professional</astahPath> <!--ココ -->
+ <astahEdition>professional</astahEdition>
+ </properties>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>local_astah_repository</id>
+ <name>Local Astah* Plugin Repository</name>
+ <url>file://${env.M2_HOME}/repository/</url>
+ <layout>default</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+.. Warning::
+
+ If Astah doesn't launch by the command, please check the settings.xml and set the correct location, Astah's edition and OS you use in the <profile/> in the %ASDK_HOME%\\conf\\settings.xml as below.
+
+.. code-block:: xml
+
+ <profile>
+ <id>astah-professional-windows</id> <!-- Specify the correct edition of Astah and OS you use. -->
+ <!-- In this case,Astah Professional is used on Windows. -->
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <file>
+ <exists>C:/Program Files/astah-professional/astah-pro.jar</exists> <!-- Make sure to specify the correct path -->
+ </file>
+ </activation>
+ <properties>
+ <astahPath>C:/Program Files/astah-professional</astahPath> <!-- Make sure to specify the correct path -->
+ <astahEdition>professional</astahEdition>
+ </properties>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>local_astah_repository</id>
+ <name>Local Astah* Plugin Repository</name>
+ <url>file://${env.M2_HOME}/repository/</url>
+ <layout>default</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+.. astah* Plug-in SDKは、内部でMaven 3を利用しています。
+.. note::
+ Astah Plug-in SDK is using Maven 3 internally.
99 source/example.rst
@@ -0,0 +1,99 @@
+
+.. クラスの総数を表示するプラグインを作ってみましょう
+
+Let's make a Plug-in to count number of Classes in Astah
+=========================================================
+
+.. 単純なプラグインを作成しました。そのプラグインをベースに実践的なプラグインを作成してみましょう。設計されたモデルの品質を評価する指標の一つに、クラスの総数を利用することがあります。Hello Worldの代わりに、astah*モデル内のクラスの総数を表示するプラグインを変更してみましょう。
+
+We've created a simple Astah Plug-in. Now let's make another one. This time make one to count number of Classes in Astah which can be used as one of indexes for an evaluation of the value of designs.
+
+.. astah*モデル内のクラスの総数とは、下記のastah*モデルの場合は、3つです。
+
+In this sample model as the figure below, there are three classes in this model.
+
+.. figure:: images/structure.png
+ :width: 214
+ :alt: Sample model to get the model recursively.
+
+.. プラグインによって追加したメニューを押下すると、 ::
+
+Now let's make a Plug-in to count the models and let it show the number as below. ::
+
+ "There are 3 classes"
+
+.. と表示されるようにしてみましょう。
+
+.. 英語版では上の文省きました。(一つ前の文にまとめました)
+
+.. モデル情報を取得してみましょう
+
+Getting model information
+-------------------------------------------------------
+
+.. astah*のモデル情報を取得するために、astah* APIを活用してみましょう。astah* APIとは、astah*のモデルデータを活用するアプリケーションを開発するためのJavaインターフェース群です。astah* APIの詳細については、本体に付属するastah* API利用ガイドを参照してください。
+
+In order to get model information, let's use Astah API. Astah API is a group of Java interfaces for reading/writing Astah which can be used to count number of classes in this case. Please refer to Astah API User guide which you can find in Astah Install folder for details about Astah API.
+
+.. これから書くコードでは、ProjectAccessorから現在開いているastah*モデルのルートモデルを取得し、再帰的にすべてのクラスを取得します。それではクラスの総数をメッセージダイアログに表示するようにHelloWorldプラグインを修正してみましょう。
+
+We are going to write a code to get the root model of Astah by using ProjectAccessor and get all the classes under the root model recursively. Now let's modify the "Hello World" Plug-in to make it show the number of Class in the menu instead.
+
+.. まず、CountClassActionクラスを作成しましょう。
+
+First, create CountClassAction class.
+
+.. literalinclude:: _snippets/CountClassAction.java
+ :language: java
+ :linenos:
+
+.. 次に、plugin.xmlファイルにCountClassActionクラスを使ったメニューに変更しましょう。
+
+Now, modify the plugin.xml with this CountClassAction class.
+
+.. literalinclude:: _snippets/plugin_count_class_action.xml
+ :language: xml
+ :linenos:
+
+.. 最後に、plugin.propertiesに追加したメニューのラベルを追加します。 ::
+
+At last, add the label for this menu in plugin.properties ::
+
+ count_classes=Count classes(C)
+
+.. これで、クラスの数をカウント結果を表示できます。
+
+And now this new Plug-in should show number of classes in Astah from the menu.
+
+.. デバッグしてみましょう
+
+Debugging the Plug-in
+------------------------------------------------------------
+
+.. ネストクラスのクラス1とパッケージ0以下のクラス2を、再帰的に取得できるかデバッグしながら、確認してみましょう。デバッグをするには次のコマンドを実行します。 ::
+
+Now let's debug and also see if it can get a nested class1 and class2 under a pacage0 recursively by running the command below. ::
+
+ > astah-debug
+
+..
+ すると、44000ポートがリモートデバッグ用のポートとして開かれた状態で起動します。IDEなどからこのポートに接続し、リモートデバッグします。
+
+This command launches Astah with the 44000 port open for remote debugging which you can connect from IDE.
+
+.. Eclipseを使ったリモートデバッグの例
+
+Example of remote debugging using Eclipse
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. Eclipseの場合は、下記のように設定します。
+
+If you are using Eclipse, please make the configuration as below.
+
+.. figure:: images/remote-debug.png
+ :width: 541
+ :alt: Remote Debug setting
+
+.. 設定後、Debugボタンを押すとリモートデバッグが開始されます。適当な場所にブレークポイントを設定し、実行すると、デバッグが行われます。なお、リモートデバッグの詳細については、本書で扱う範囲外のため、割愛します。
+
+Clicking [Debug] button executes the remote debugging. Please set a breakpoint in the line of codes if you like. This is all we provide regarding the remote debugging on this tutorial.
68 source/extraview.rst
@@ -0,0 +1,68 @@
+
+.. 拡張タブビューを作ってみましょう。
+
+Let's add an extended view to Astah
+=======================================================
+
+.. astah*プラグインには、拡張タブビューがあります。これを使うと、例えばクラス情報のサマリを一覧にしてastah*上で見ることができるプラグインを作成できます。ここでは、”hello world”という文字列を表示する拡張タブビューを作成する方法を紹介します。
+
+Astah Plug-in can add an extra view in Astah. For example, you can make a view to show a list of class summary or whatever you would like to show on Astah. So in this page, let's create a Plug-in to add an extended view to Astah. And let's make it show just a "hello world" text on there as an easy example.
+
+
+.. figure:: images/extend-view.png
+ :width: 503
+ :alt: ex.Extra tab view
+
+.. 拡張タブビューを実装しましょう
+
+Creating an extended view
+----------------------------------------------------------
+
+.. 拡張タブビューはIPluginExtraTabViewインターフェースの実装クラスとして定義します。下記のソースコードは、IPluginExtraTabViewを実装したHolloWorldViewの例です。
+
+To add an extended view, use IPluginExtraTabView interface. Below is a sample of the HelloWoroldView which implements the IPluginExtraTabView.
+
+.. literalinclude:: _snippets/HelloWorldView.java