From 55d674986087a8ea4ef6625414a37184989acb22 Mon Sep 17 00:00:00 2001 From: ptessier Date: Wed, 11 Jun 2014 12:18:33 +0200 Subject: 399858: [Documentation] Papyrus shall have an embedded documentation https://bugs.eclipse.org/bugs/show_bug.cgi?id=399858 Change-Id: I1c818de70024b6e08dd2a043931c59ff972c8197 --- .../.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 7 - .../plugin.xml | 14 ++ .../papyrus/uml/developper/mde/Activator.java | 2 +- .../developper/mde/I_DeveloperIDMStereotype.java | 50 ++-- .../uml/developper/mde/I_DocumentStereotype.java | 26 +- .../mde/command/CreateDocumentModelCommand.java | 85 +++++-- .../developper/mde/handler/GetHTMLTextHandler.java | 6 +- .../developper/mde/handler/GetWikiTextHandler.java | 74 ++++++ .../developper/mde/handler/IDMAbstractHandler.java | 2 +- .../mde/transcription/HTMLTranscription.java | 28 +-- .../mde/transcription/ITranscription.java | 4 +- .../mde/transcription/TranscriptionEngine.java | 30 ++- .../mde/transcription/WikiTranscription.java | 118 +++++++++ .../imgDOC/ClassDiagram.png | Bin 0 -> 231 bytes .../imgDOC/UseCaseDiagram.png | Bin 0 -> 231 bytes .../model/GenericDiagramFucntion.di | 11 +- .../model/GenericDiagramFucntion.notation | 278 ++------------------- .../model/GenericDiagramFucntion.uml | 113 ++++++++- 19 files changed, 502 insertions(+), 348 deletions(-) delete mode 100644 plugins/developer/org.eclipse.papyrus.uml.developer.mde/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetWikiTextHandler.java create mode 100644 plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/WikiTranscription.java create mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/ClassDiagram.png create mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/UseCaseDiagram.png diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/.classpath b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/.classpath index 8a8f1668cdc..2d1a4302f04 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/.classpath +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/.settings/org.eclipse.jdt.core.prefs b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index f287d53cf45..00000000000 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/plugin.xml b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/plugin.xml index d6108a25f12..490de361aac 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/plugin.xml +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/plugin.xml @@ -62,6 +62,15 @@ checkEnabled="true"> + + + + @@ -72,5 +81,10 @@ id="org.eclipse.papyrus.uml.developper.mde.handler.GetHTMLTextHandler" name="generate HTML page"> + + diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/Activator.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/Activator.java index 294f534c6dd..77d724c6b52 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/Activator.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/Activator.java @@ -21,7 +21,7 @@ import org.osgi.framework.BundleContext; */ public class Activator extends AbstractUIPlugin { - // The plug-in ID + /** The plug-in ID**/ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.developper.idm"; //$NON-NLS-1$ // The shared instance diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DeveloperIDMStereotype.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DeveloperIDMStereotype.java index 6d0392d170f..9998c9b7047 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DeveloperIDMStereotype.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DeveloperIDMStereotype.java @@ -20,77 +20,77 @@ package org.eclipse.papyrus.uml.developper.mde; public interface I_DeveloperIDMStereotype { /** Qualified name of the stereotype Project */ - public static final String PROJECT_STEREOTYPE = "DeveloperProcess::structure::Project"; + public static final String PROJECT_STEREOTYPE = "DeveloperProcess::structure::Project"; //$NON-NLS-1$ /** name of property author of the stereotype Project */ - public static final String PROJECT_AUTHOR_ATT = "author"; + public static final String PROJECT_AUTHOR_ATT = "author"; //$NON-NLS-1$ /** name of property title of the stereotype Project */ - public static final String PROJECT_TITLE_ATT = "title"; + public static final String PROJECT_TITLE_ATT = "title"; //$NON-NLS-1$ /** name of property version of the stereotype Project */ - public static final String PROJECT_VERSION_ATT = "version"; + public static final String PROJECT_VERSION_ATT = "version"; //$NON-NLS-1$ /** name of property base_Model of the stereotype Project */ - public static final String PROJECT_BASE_MODEL_ATT = "base_Model"; + public static final String PROJECT_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ /** Qualified name of the stereotype UserDoc */ - public static final String USERDOC_STEREOTYPE = "DeveloperProcess::structure::UserDoc"; + public static final String USERDOC_STEREOTYPE = "DeveloperProcess::structure::UserDoc"; //$NON-NLS-1$ /** name of property base_Comment of the stereotype UserDoc */ - public static final String USERDOC_BASE_COMMENT_ATT = "base_Comment"; + public static final String USERDOC_BASE_COMMENT_ATT = "base_Comment"; //$NON-NLS-1$ /** Qualified name of the stereotype DeveloperDoc */ - public static final String DEVELOPERDOC_STEREOTYPE = "DeveloperProcess::structure::DeveloperDoc"; + public static final String DEVELOPERDOC_STEREOTYPE = "DeveloperProcess::structure::DeveloperDoc"; //$NON-NLS-1$ /** name of property base_Comment of the stereotype DeveloperDoc */ - public static final String DEVELOPERDOC_BASE_COMMENT_ATT = "base_Comment"; + public static final String DEVELOPERDOC_BASE_COMMENT_ATT = "base_Comment"; //$NON-NLS-1$ /** Qualified name of the stereotype Requirements */ - public static final String REQUIREMENTS_STEREOTYPE = "DeveloperProcess::structure::Requirements"; + public static final String REQUIREMENTS_STEREOTYPE = "DeveloperProcess::structure::Requirements"; //$NON-NLS-1$ /** name of property base_Model of the stereotype Requirements */ - public static final String REQUIREMENTS_BASE_MODEL_ATT = "base_Model"; + public static final String REQUIREMENTS_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ /** Qualified name of the stereotype Design */ - public static final String DESIGN_STEREOTYPE = "DeveloperProcess::structure::Design"; + public static final String DESIGN_STEREOTYPE = "DeveloperProcess::structure::Design"; //$NON-NLS-1$ /** name of property base_Model of the stereotype Design */ - public static final String DESIGN_BASE_MODEL_ATT = "base_Model"; + public static final String DESIGN_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ /** Qualified name of the stereotype UseCases */ - public static final String USECASES_STEREOTYPE = "DeveloperProcess::structure::UseCases"; + public static final String USECASES_STEREOTYPE = "DeveloperProcess::structure::UseCases"; //$NON-NLS-1$ /** name of property base_Model of the stereotype UseCases */ - public static final String USECASES_BASE_MODEL_ATT = "base_Model"; + public static final String USECASES_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ /** Qualified name of the stereotype Tests */ - public static final String TESTS_STEREOTYPE = "DeveloperProcess::structure::Tests"; + public static final String TESTS_STEREOTYPE = "DeveloperProcess::structure::Tests"; //$NON-NLS-1$ /** name of property base_Model of the stereotype Tests */ - public static final String TESTS_BASE_MODEL_ATT = "base_Model"; + public static final String TESTS_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ /** Qualified name of the stereotype UseCaseTest */ - public static final String USECASETEST_STEREOTYPE = "DeveloperProcess::trace::UseCaseTest"; + public static final String USECASETEST_STEREOTYPE = "DeveloperProcess::trace::UseCaseTest"; //$NON-NLS-1$ /** name of property base_UseCase of the stereotype UseCaseTest */ - public static final String USECASETEST_BASE_USECASE_ATT = "base_UseCase"; + public static final String USECASETEST_BASE_USECASE_ATT = "base_UseCase"; //$NON-NLS-1$ /** Qualified name of the stereotype ManualTest */ - public static final String MANUALTEST_STEREOTYPE = "DeveloperProcess::trace::ManualTest"; + public static final String MANUALTEST_STEREOTYPE = "DeveloperProcess::trace::ManualTest"; //$NON-NLS-1$ /** name of property path of the stereotype ManualTest */ - public static final String MANUALTEST_PATH_ATT = "path"; + public static final String MANUALTEST_PATH_ATT = "path"; //$NON-NLS-1$ /** name of property base_Model of the stereotype ManualTest */ - public static final String MANUALTEST_BASE_MODEL_ATT = "base_Model"; + public static final String MANUALTEST_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ /** Qualified name of the stereotype ExecutableTest */ - public static final String EXECUTABLETEST_STEREOTYPE = "DeveloperProcess::trace::ExecutableTest"; + public static final String EXECUTABLETEST_STEREOTYPE = "DeveloperProcess::trace::ExecutableTest"; //$NON-NLS-1$ /** name of property base_Class of the stereotype ExecutableTest */ - public static final String EXECUTABLETEST_BASE_CLASS_ATT = "base_Class"; + public static final String EXECUTABLETEST_BASE_CLASS_ATT = "base_Class"; //$NON-NLS-1$ /** name of property base_Model of the stereotype ExecutableTest */ - public static final String EXECUTABLETEST_BASE_MODEL_ATT = "base_Model"; + public static final String EXECUTABLETEST_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ } diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DocumentStereotype.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DocumentStereotype.java index c9790b9d229..4349c53ba4b 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DocumentStereotype.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/I_DocumentStereotype.java @@ -20,41 +20,41 @@ package org.eclipse.papyrus.uml.developper.mde; public interface I_DocumentStereotype { /** Qualified name of the stereotype Section */ - public static final String SECTION_STEREOTYPE = "Document::Section"; + public static final String SECTION_STEREOTYPE = "Document::Section"; //$NON-NLS-1$ /** name of property base_Package of the stereotype Section */ - public static final String SECTION_BASE_PACKAGE_ATT = "base_Package"; + public static final String SECTION_BASE_PACKAGE_ATT = "base_Package"; //$NON-NLS-1$ /** Qualified name of the stereotype Document */ - public static final String DOCUMENT_STEREOTYPE = "Document::Document"; + public static final String DOCUMENT_STEREOTYPE = "Document::Document"; //$NON-NLS-1$ /** name of property base_Model of the stereotype Document */ - public static final String DOCUMENT_BASE_MODEL_ATT = "base_Model"; + public static final String DOCUMENT_BASE_MODEL_ATT = "base_Model"; //$NON-NLS-1$ /** name of property author of the stereotype Document */ - public static final String DOCUMENT_AUTHOR_ATT = "author"; + public static final String DOCUMENT_AUTHOR_ATT = "author"; //$NON-NLS-1$ /** name of property version of the stereotype Document */ - public static final String DOCUMENT_VERSION_ATT = "version"; + public static final String DOCUMENT_VERSION_ATT = "version"; //$NON-NLS-1$ /** Qualified name of the stereotype ImageRef */ - public static final String IMAGEREF_STEREOTYPE = "Document::ImageRef"; + public static final String IMAGEREF_STEREOTYPE = "Document::ImageRef"; //$NON-NLS-1$ /** name of property base_Comment of the stereotype ImageRef */ - public static final String IMAGEREF_BASE_COMMENT_ATT = "base_Comment"; + public static final String IMAGEREF_BASE_COMMENT_ATT = "base_Comment"; //$NON-NLS-1$ /** name of property ref of the stereotype ImageRef */ - public static final String IMAGEREF_REF_ATT = "ref"; + public static final String IMAGEREF_REF_ATT = "ref"; //$NON-NLS-1$ /** Qualified name of the stereotype Content */ - public static final String CONTENT_STEREOTYPE = "Document::Content"; + public static final String CONTENT_STEREOTYPE = "Document::Content"; //$NON-NLS-1$ /** name of property base_Comment of the stereotype Content */ - public static final String CONTENT_BASE_COMMENT_ATT = "base_Comment"; + public static final String CONTENT_BASE_COMMENT_ATT = "base_Comment"; //$NON-NLS-1$ /** Qualified name of the stereotype TableOfContent */ - public static final String TABLEOFCONTENT_STEREOTYPE = "Document::TableOfContent"; + public static final String TABLEOFCONTENT_STEREOTYPE = "Document::TableOfContent"; //$NON-NLS-1$ /** name of property base_Comment of the stereotype TableOfContent */ - public static final String TABLEOFCONTENT_BASE_COMMENT_ATT = "base_Comment"; + public static final String TABLEOFCONTENT_BASE_COMMENT_ATT = "base_Comment"; //$NON-NLS-1$ } diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/command/CreateDocumentModelCommand.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/command/CreateDocumentModelCommand.java index 15eeaa13ab3..5610a71ebb9 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/command/CreateDocumentModelCommand.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/command/CreateDocumentModelCommand.java @@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils; import org.eclipse.papyrus.infra.hyperlink.helper.AbstractHyperLinkHelper; import org.eclipse.papyrus.infra.hyperlink.helper.HyperLinkHelperFactory; +import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkDocument; import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject; import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkException; import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkHelpersRegistrationUtil; @@ -56,10 +57,24 @@ import org.eclipse.uml2.uml.UseCase; */ public class CreateDocumentModelCommand extends RecordingCommand { + protected static final String TESTS = "Tests"; //$NON-NLS-1$ + protected static final String DESIGN = "Design"; //$NON-NLS-1$ + protected static final String HOW_TO = "How to"; //$NON-NLS-1$ + protected static final String USE_CASES = "Use Cases"; //$NON-NLS-1$ + private static final String SYS_ML_REQUIREMENTS_REQUIREMENT = "SysML::Requirements::Requirement"; //$NON-NLS-1$ + protected static final String REQUIREMENTS = "Requirements"; //$NON-NLS-1$ protected org.eclipse.uml2.uml.Package topModel; protected String directoryPath=null; protected HyperLinkHelperFactory hyperlinkHelperFactory; + /** + * + * Constructor to transform model into document model + * + * @param domain + * @param topModel the root model + * @param directoryPath the directory where image will be stored, pay attention directory must exist + */ public CreateDocumentModelCommand(TransactionalEditingDomain domain, org.eclipse.uml2.uml.Package topModel, String directoryPath) { super(domain); this.topModel=topModel; @@ -116,14 +131,14 @@ public class CreateDocumentModelCommand extends RecordingCommand { documentModel.getPackagedElements().add(requirementsOUT); Stereotype sectionStereotype= requirementsOUT.getApplicableStereotype(I_DocumentStereotype.SECTION_STEREOTYPE); requirementsOUT.applyStereotype(sectionStereotype); - requirementsOUT.setName("Requirements"); + requirementsOUT.setName(REQUIREMENTS); for(Iterator itereq = (requirementsIn).getOwnedElements().iterator(); itereq.hasNext();) { Element currentReq = (Element)itereq.next(); - Stereotype reqStereotype=currentReq.getApplicableStereotype("SysML::Requirements::Requirement"); + Stereotype reqStereotype=currentReq.getApplicableStereotype(SYS_ML_REQUIREMENTS_REQUIREMENT); if(reqStereotype!=null){ - String out="- "+((org.eclipse.uml2.uml.Class)currentReq).getName()+" (id="+currentReq.getValue(reqStereotype, "id")+"): "; - out=out+"\n "+currentReq.getValue(reqStereotype, "text"); + String out="- "+((org.eclipse.uml2.uml.Class)currentReq).getName()+" (id="+currentReq.getValue(reqStereotype, "id")+"): "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + out=out+"\n "+currentReq.getValue(reqStereotype, "text"); //$NON-NLS-1$ //$NON-NLS-2$ Comment comment=requirementsOUT.createOwnedComment(); Stereotype contentStereotype= comment.getApplicableStereotype(I_DocumentStereotype.CONTENT_STEREOTYPE); @@ -144,12 +159,13 @@ public class CreateDocumentModelCommand extends RecordingCommand { } if (useCaseIN!= null){ - Package useCaseModelOUT = createSection(documentModel, "Use Cases"); + Package useCaseModelOUT = createSection(documentModel, USE_CASES); //createRef diagram - Diagram currentDiagram= containedDiagrams(useCaseIN).get(0); - generateImg(copyImageUtil, useCaseModelOUT, currentDiagram); - + if(containedDiagrams(useCaseIN).size()>0){ + Diagram currentDiagram= containedDiagrams(useCaseIN).get(0); + generateImg(copyImageUtil, useCaseModelOUT, currentDiagram); + } for(Iterator iteComment = (useCaseIN).getOwnedComments().iterator(); iteComment.hasNext();) { Comment currentComment = (Comment)iteComment.next(); transformToContentComment(useCaseModelOUT, currentComment); @@ -163,7 +179,7 @@ public class CreateDocumentModelCommand extends RecordingCommand { for(Iterator iteComment = ((UseCase)packageableElement).getOwnedComments().iterator(); iteComment.hasNext();) { Comment currentComment = (Comment)iteComment.next(); - transformToContentComment(useCaseSectionOUT, currentComment); + transformToContentWithUser(copyImageUtil, useCaseSectionOUT, currentComment); } } } @@ -172,6 +188,20 @@ public class CreateDocumentModelCommand extends RecordingCommand { return useCaseIN; } + protected void transformToContentWithUser(CopyToImageUtil copyImageUtil, Package useCaseSectionOUT, Comment currentComment) { + Stereotype isUser= currentComment.getAppliedStereotype(I_DeveloperIDMStereotype.USERDOC_STEREOTYPE); + if(isUser!=null){ + Package HowToSection=(Package)useCaseSectionOUT.getPackagedElement(HOW_TO); + if( HowToSection==null){ + HowToSection= createSection(useCaseSectionOUT, HOW_TO);} + transformToContentComment(HowToSection, currentComment); + createImageFromHyperLink(copyImageUtil, HowToSection, currentComment); + } + else{ + transformToContentComment(useCaseSectionOUT, currentComment); + } + } + protected void generateDesign(CopyToImageUtil copyImageUtil, Model documentModel) { //get Design package Model designPackageIn=null; @@ -182,11 +212,12 @@ public class CreateDocumentModelCommand extends RecordingCommand { } } if(designPackageIn!=null){ - Package designPackageOUT= createSection(documentModel, "Design"); + Package designPackageOUT= createSection(documentModel, DESIGN); //createRef diagram - Diagram currentDiagram= containedDiagrams(designPackageIn).get(0); - generateImg(copyImageUtil, designPackageOUT, currentDiagram); - + if(containedDiagrams(designPackageIn).size()>0){ + Diagram currentDiagram= containedDiagrams(designPackageIn).get(0); + generateImg(copyImageUtil, designPackageOUT, currentDiagram); + } for(Iterator iteComment = (designPackageIn).getOwnedComments().iterator(); iteComment.hasNext();) { Comment currentComment = (Comment)iteComment.next(); createImageFromHyperLink(copyImageUtil, designPackageOUT, currentComment); @@ -208,12 +239,13 @@ public class CreateDocumentModelCommand extends RecordingCommand { } if (testIN!= null){ - Package testModelOUT = createSection(documentModel, "Tests"); + Package testModelOUT = createSection(documentModel, TESTS); //createRef diagram - Diagram currentDiagram= containedDiagrams(testIN).get(0); - generateImg(copyImageUtil, testModelOUT, currentDiagram); - + if(containedDiagrams(testIN).size()>0){ + Diagram currentDiagram= containedDiagrams(testIN).get(0); + generateImg(copyImageUtil, testModelOUT, currentDiagram); + } for(Iterator iteComment = (testIN).getOwnedComments().iterator(); iteComment.hasNext();) { Comment currentComment = (Comment)iteComment.next(); transformToContentComment(testModelOUT, currentComment); @@ -242,6 +274,12 @@ public class CreateDocumentModelCommand extends RecordingCommand { return testIN; } + /** + * + * @param namedElement + * @param topModel + * @return the list of elements that depends of the given named element (never null, empty list) + */ public ArrayList getAllDependentElement(NamedElement namedElement, Package topModel){ ArrayList result= new ArrayList(); Iterator iteratorEObject= topModel.eAllContents(); @@ -250,7 +288,7 @@ public class CreateDocumentModelCommand extends RecordingCommand { if(eObject instanceof Dependency){ if(((Dependency)eObject).getSuppliers().contains(namedElement)){ result.addAll(((Dependency)eObject).getClients()); - } + } } } @@ -259,6 +297,7 @@ public class CreateDocumentModelCommand extends RecordingCommand { } + @SuppressWarnings("unchecked") protected void createImageFromHyperLink(CopyToImageUtil copyImageUtil, Package designPackageOUT, Comment currentComment) { ListreferedViews=NavigatorUtils.getEObjectViews(currentComment); if(referedViews.size()!=0){ @@ -278,6 +317,14 @@ public class CreateDocumentModelCommand extends RecordingCommand { if(hyperLinkObject.getObject() instanceof Diagram){ generateImg(copyImageUtil, designPackageOUT, ((Diagram)hyperLinkObject.getObject())); } + if(hyperLinkObject instanceof HyperLinkDocument ){ + String IMGpath=((HyperLinkDocument)hyperLinkObject).getHyperlinkDocument(); + Comment commentImg=designPackageOUT.createOwnedComment(); + Stereotype refStereotype= commentImg.getApplicableStereotype(I_DocumentStereotype.IMAGEREF_STEREOTYPE); + commentImg.applyStereotype(refStereotype); + commentImg.setValue(refStereotype, I_DocumentStereotype.IMAGEREF_REF_ATT, IMGpath.toString()); + commentImg.setBody(hyperLinkObject.getTooltipText()); + } } } } @@ -319,7 +366,7 @@ public class CreateDocumentModelCommand extends RecordingCommand { * @param currentDiagram */ protected void generateImg(CopyToImageUtil copyImageUtil, Package currentModel, Diagram currentDiagram) { - Path imagePath= new Path(""+directoryPath+ File.separator +"imgDOC"+File.separator+ currentDiagram.getName().replaceAll(" ", "_")+".png"); + Path imagePath= new Path(""+directoryPath+ File.separator +"imgDOC"+File.separator+ currentDiagram.getName().replaceAll(" ", "_")+".png"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ try { copyImageUtil.copyToImage(currentDiagram, diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetHTMLTextHandler.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetHTMLTextHandler.java index 99b36e54ee9..01ccfb39cc5 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetHTMLTextHandler.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetHTMLTextHandler.java @@ -31,11 +31,15 @@ import org.eclipse.uml2.uml.Model; */ public class GetHTMLTextHandler extends IDMAbstractHandler { + protected static final String INTERNAL_DIRECTORY_NAME = "/doc"; //$NON-NLS-1$ + + + @Override public Object execute(ExecutionEvent event) throws ExecutionException { super.execute(event); System.err.println( getCurrentProject().getLocationURI().getPath()); - CreateDocumentModelCommand createDocumentModelCommand= new CreateDocumentModelCommand(transactionalEditingDomain,(Model)getSelection(), getCurrentProject().getLocationURI().getPath() ); + CreateDocumentModelCommand createDocumentModelCommand= new CreateDocumentModelCommand(transactionalEditingDomain,(Model)getSelection(), getCurrentProject().getLocationURI().getPath()+INTERNAL_DIRECTORY_NAME ); transactionalEditingDomain.getCommandStack().execute(createDocumentModelCommand); IProject project = getCurrentProject(); TranscriptionEngine engine= new TranscriptionEngine((Model)getSelection(), project, new HTMLTranscription()); diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetWikiTextHandler.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetWikiTextHandler.java new file mode 100644 index 00000000000..f45626cddf9 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/GetWikiTextHandler.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2014 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.developper.mde.handler; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.papyrus.uml.developper.mde.I_DeveloperIDMStereotype; +import org.eclipse.papyrus.uml.developper.mde.command.CreateDocumentModelCommand; +import org.eclipse.papyrus.uml.developper.mde.transcription.TranscriptionEngine; +import org.eclipse.papyrus.uml.developper.mde.transcription.WikiTranscription; +import org.eclipse.uml2.uml.Model; + +/** + * This class is used to create and wiki developper doc file. + * + */ +public class GetWikiTextHandler extends IDMAbstractHandler { + + protected static final String INTERNAL_DIRECTORY_NAME = "/doc"; //$NON-NLS-1$ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + super.execute(event); + System.err.println( getCurrentProject().getLocationURI().getPath()); + CreateDocumentModelCommand createDocumentModelCommand= new CreateDocumentModelCommand(transactionalEditingDomain,(Model)getSelection(), getCurrentProject().getLocationURI().getPath()+INTERNAL_DIRECTORY_NAME ); + transactionalEditingDomain.getCommandStack().execute(createDocumentModelCommand); + IProject project = getCurrentProject(); + TranscriptionEngine engine= new TranscriptionEngine((Model)getSelection(), project, new WikiTranscription()); + engine.traduce(); + return null; + } + + + private IProject getCurrentProject() { + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + IWorkspaceRoot root = workspace.getRoot(); + IProject project = root.getProject(); + String path=getSelection().eResource().getURI().path(); + for(IProject currentProject : root.getProjects()) { + if( path.contains(currentProject.getName())){ + project=currentProject; + } + } + return project; + } + + + + @Override + public boolean isEnabled() { + if(getSelection() instanceof Model){ + if(((Model)getSelection()).getAppliedStereotype(I_DeveloperIDMStereotype.PROJECT_STEREOTYPE)!=null){ + return true; + } + + } + return false; + } + +} diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java index 2b44a662f49..2563a0c77e3 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/handler/IDMAbstractHandler.java @@ -61,7 +61,7 @@ public abstract class IDMAbstractHandler extends AbstractHandler { papyrusEditor =(PapyrusMultiDiagramEditor)ServiceUtilsForHandlers.getInstance().getService(IMultiDiagramEditor.class, event); transactionalEditingDomain =ServiceUtilsForHandlers.getInstance().getService(org.eclipse.emf.transaction.TransactionalEditingDomain.class, event); } catch (Exception e) { - System.err.println("impossible to get the Transactional Editing Domain "+e); + System.err.println("impossible to get the Transactional Editing Domain "+e); //$NON-NLS-1$ } return null; } diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/HTMLTranscription.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/HTMLTranscription.java index 3ee084c9aaa..c491c395c07 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/HTMLTranscription.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/HTMLTranscription.java @@ -35,9 +35,8 @@ public class HTMLTranscription implements ITranscription { * @param out */ - @Override public void writeEndingDocument(StringBuffer out) { - out.append(""); + out.append(""); //$NON-NLS-1$ } @@ -45,13 +44,12 @@ public class HTMLTranscription implements ITranscription { * @see org.eclipse.papyrus.uml.developper.mde.transcription.ITranscription#writeBeginningDocument(java.lang.StringBuffer) * * @param out - * @return + * @return the string buffer after adding the prefix for the document */ - @Override public StringBuffer writeBeginningDocument(StringBuffer out) { - out.append(""); - out.append(""); + out.append(""); //$NON-NLS-1$ + out.append(""); //$NON-NLS-1$ return out; } @@ -63,9 +61,8 @@ public class HTMLTranscription implements ITranscription { * @param documentModel */ - @Override public void writeDocumentTitle(StringBuffer out, Model documentModel) { - out.append("

"+documentModel.getName()+"

"); + out.append("

"+documentModel.getName()+"

"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -79,9 +76,8 @@ public class HTMLTranscription implements ITranscription { * @param packageableElement */ - @Override public void writesectionTitle(StringBuffer out, int level, Element packageableElement) { - out.append(""+((Package)packageableElement).getName()+""); + out.append(""+((Package)packageableElement).getName()+""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } @@ -93,10 +89,10 @@ public class HTMLTranscription implements ITranscription { * @param imgRefStereotype */ - @Override public void writeImageRef(StringBuffer out, Element packageableElement, Stereotype imgRefStereotype) { - out.append("

+((Comment)packageableElement).getBody()+

"); - out.append("

"+((Comment)packageableElement).getBody()+"

"); + out.append("

+((Comment)packageableElement).getBody()+

"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + out.append("

"+((Comment)packageableElement).getBody()+"

"); //$NON-NLS-1$ //$NON-NLS-2$ + out.append("
"); //$NON-NLS-1$ } @@ -107,16 +103,14 @@ public class HTMLTranscription implements ITranscription { * @param packageableElement */ - @Override public void writeParagraph(StringBuffer out, Element packageableElement) { - out.append("

"+((Comment)packageableElement).getBody().replaceAll("\n", "
")+"

"); + out.append("
"+((Comment)packageableElement).getBody().replaceAll("\n", "
")+"
"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } - @Override public String getNameFile() { - return "DeveloperDoc.html"; + return "DeveloperDoc.html"; //$NON-NLS-1$ } diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/ITranscription.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/ITranscription.java index 4467c9d3eda..2a8c986e251 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/ITranscription.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/ITranscription.java @@ -33,6 +33,7 @@ public interface ITranscription { /** * init the document * @param out + * @return the string buffer after adding the prefix for the document */ public abstract StringBuffer writeBeginningDocument(StringBuffer out); @@ -54,7 +55,8 @@ public interface ITranscription { /** * write a image * @param out - * @param packageableElement form a comment that contains the ref to the image + * @param packageableElement form a comment that contains the ref to the + * @param imgRefStereotype the stereotype in charge to reference the image */ public abstract void writeImageRef(StringBuffer out, Element packageableElement, Stereotype imgRefStereotype); /** diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/TranscriptionEngine.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/TranscriptionEngine.java index b39d1b458a3..c763cdb7205 100644 --- a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/TranscriptionEngine.java +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/TranscriptionEngine.java @@ -30,12 +30,24 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.PackageableElement; import org.eclipse.uml2.uml.Stereotype; - +/*** + * This class is an engine to traduce a document model into files + * + */ public class TranscriptionEngine { + protected static final String INTERNAL_DIRECTORY = "doc/"; //$NON-NLS-1$ Model model=null; IProject project; ITranscription transcription=null; + /** + * + * Constructor. + * + * @param model the root model + * @param project the project where we want to put the new file + * @param transcription the object in charge to do the transcription + */ public TranscriptionEngine(Model model, IProject project, ITranscription transcription) { super(); this.model = model; @@ -43,8 +55,11 @@ public class TranscriptionEngine { this.transcription = transcription; } + /** + * execute the transcription + */ public void traduce() { - IFile file = project.getFile(transcription.getNameFile()); + IFile file = project.getFile(INTERNAL_DIRECTORY+transcription.getNameFile()); //at this point, no resources have been created if (!project.isOpen()) try { @@ -71,6 +86,11 @@ public class TranscriptionEngine { } } + /** + * + * @param model that will be traduced + * @return the stringBuffer that will be obtained from the transcription + */ public StringBuffer getText(Model model){ StringBuffer out = new StringBuffer(); @@ -91,6 +111,12 @@ public class TranscriptionEngine { return out; } + /** + * create a content from a package + * @param out the result + * @param documentModel the package where its content will be translated + * @param level the depth of the current package + */ public void writeContent(StringBuffer out, Package documentModel, int level) { for(Iterator iteComment = (documentModel).getOwnedElements().iterator(); iteComment.hasNext();) { Element packageableElement = (Element)iteComment.next(); diff --git a/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/WikiTranscription.java b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/WikiTranscription.java new file mode 100644 index 00000000000..ec3b3ec9a8a --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.uml.developer.mde/src/org/eclipse/papyrus/uml/developper/mde/transcription/WikiTranscription.java @@ -0,0 +1,118 @@ +/***************************************************************************** + * Copyright (c) 2014 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.developper.mde.transcription; + +import org.eclipse.papyrus.uml.developper.mde.I_DocumentStereotype; +import org.eclipse.uml2.uml.Comment; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Model; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.Stereotype; + +/** + * this class is a specialization to generate mediawiki files. + * + */ +public class WikiTranscription implements ITranscription { + + + + /** + * @see org.eclipse.papyrus.uml.developper.mde.transcription.ITranscription#writeEndingDocument(java.lang.StringBuffer) + * + * @param out + */ + + public void writeEndingDocument(StringBuffer out) { + } + + + /** + * @see org.eclipse.papyrus.uml.developper.mde.transcription.ITranscription#writeBeginningDocument(java.lang.StringBuffer) + * + * @param out + * @return the string buffer after adding the prefix for the document + */ + + public StringBuffer writeBeginningDocument(StringBuffer out) { + out.append("\n__TOC__"); //$NON-NLS-1$ + return out; + } + + + /** + * @see org.eclipse.papyrus.uml.developper.mde.transcription.ITranscription#writeDocumentTitle(java.lang.StringBuffer, org.eclipse.uml2.uml.Model) + * + * @param out + * @param documentModel + */ + + public void writeDocumentTitle(StringBuffer out, Model documentModel) { + out.append("\n= "+documentModel.getName()+" ="); //$NON-NLS-1$ //$NON-NLS-2$ + } + + + + + /** + * @see org.eclipse.papyrus.uml.developper.mde.transcription.ITranscription#writesectionTitle(java.lang.StringBuffer, int, org.eclipse.uml2.uml.Element) + * + * @param out + * @param level + * @param packageableElement + */ + + public void writesectionTitle(StringBuffer out, int level, Element packageableElement) { + if(level==2){ + out.append("\n=="+((Package)packageableElement).getName()+"==");} //$NON-NLS-1$ //$NON-NLS-2$ + if(level==3){ + out.append("\n==="+((Package)packageableElement).getName()+"===");} //$NON-NLS-1$ //$NON-NLS-2$ + if(level==4){ + out.append("\n===="+((Package)packageableElement).getName()+"====");} //$NON-NLS-1$ //$NON-NLS-2$ + + } + + + /** + * @see org.eclipse.papyrus.uml.developper.mde.transcription.ITranscription#writeImageRef(java.lang.StringBuffer, org.eclipse.uml2.uml.Element, org.eclipse.uml2.uml.Stereotype) + * + * @param out + * @param packageableElement + * @param imgRefStereotype + */ + + public void writeImageRef(StringBuffer out, Element packageableElement, Stereotype imgRefStereotype) { + out.append("\n[[Image:"+((Element)packageableElement).getValue(imgRefStereotype, I_DocumentStereotype.IMAGEREF_REF_ATT)+"|"+((Comment)packageableElement).getBody()+"]]
"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + + + /** + * @see org.eclipse.papyrus.uml.developper.mde.transcription.ITranscription#writeParagraph(java.lang.StringBuffer, org.eclipse.uml2.uml.Element) + * + * @param out + * @param packageableElement + */ + + public void writeParagraph(StringBuffer out, Element packageableElement) { + out.append("\n"+((Comment)packageableElement).getBody()); //$NON-NLS-1$ + } + + + public String getNameFile() { + + return "DeveloperDoc.mediawiki"; //$NON-NLS-1$ + } + + +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/ClassDiagram.png b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/ClassDiagram.png new file mode 100644 index 00000000000..33d684e2204 Binary files /dev/null and b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/ClassDiagram.png differ diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/UseCaseDiagram.png b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/UseCaseDiagram.png new file mode 100644 index 00000000000..33d684e2204 Binary files /dev/null and b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/imgDOC/UseCaseDiagram.png differ diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.di b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.di index 4ac742d546b..752c68f5774 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.di +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.di @@ -4,9 +4,7 @@ - - - + @@ -15,10 +13,13 @@ - + + + + - + diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.notation b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.notation index 32ce346b230..2261d6da6a3 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.notation +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.notation @@ -1,5 +1,5 @@ - + @@ -9,257 +9,29 @@ - - - -
-
-
-
-
- - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - -
-
-
-
-
- - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - -
-
-
-
-
- - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - -
-
-
-
-
- - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - -
-
-
-
-
- - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - -
-
-
-
-
- - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml index 35cedd02933..949dc0d554c 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/model/GenericDiagramFucntion.uml @@ -1,5 +1,5 @@ - + The purpose of this document is to explain basic functionalities intra diagram, i.e. how element in the diagram can be manipulated without taking in account link with model explorer, and properties view @@ -7,7 +7,7 @@ - + @@ -17,12 +17,99 @@ + + + + + + The purpose of this document is to explain basic functionalities intra diagram, i.e. how element in the diagram can be manipulated without taking in account link with model explorer, and properties view + + + + - DisplayElementAtFirstLevel (id=Req_001): + Papyrus shall let display every elements at first layer even if the namespace is not respected + + + - DisplayElementAtFirstLevel_+1 (id=Req_002): + Papyrus shall display element by respected namespace when they are contained graphically by other elements + + + - MoveElementIntoAnother (id=Req_003): + When an element is moved into another element, the container has to change, i.e. the qualified name change + + + - MoveElementIntoADiagram (id=Req_004): + When an element move from an element to the diagram, two options can be applied: +- The container change and the namespace has to be adapted, so a clean into diagrams has to be done to respect Req_002 +- The container does not change; this is only a graphical move, as described by the req_001 + + + - Edit Grid and Ruler Property (id=Req_005): + The user must be able to change the Diagram Viewer properties (Snap To Grid/To Geometry, Show Rulers, Show Grid, Grid Style, Grid Color, Grid Order, Ruler Units, Grid Spacing ) + + + - Snap To Grid Behavior (id=Req_005): + Snap To Grid must be able to snap on : +- 4 corners of rectangle +- 4 middles of side of a rectangle +- anchors of link +- bendpoints + + + - DropDromModelExplorer (id=Req006): + Its possible to drop the seame element several time on the canva + + + - DiagramVersion (id=Req007): + Each diagram must have a version inorder to able possble migration + + + + + UseCaseDiagram + + + + + ClassDiagram + + + + + UseCaseDiagram + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -32,4 +119,26 @@ + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3