blob: e713e925ec9a95fa50c44fdc712ca807c0a2f44f [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" HREF="../html_bootstrap/css/bootstrap.css" TYPE="text/css"/><link rel="stylesheet" HREF="../html_bootstrap/style_customization.css" TYPE="text/css"/></head><body><h1 id="IntentUserGuideGettingStarted">Intent User Guide &#8211; Getting Started</h1><p>This <em>Getting started</em> guide will give you an overview of the Intent features on a simple example.</p><h2 id="GeneraloverviewWhatisIntent">General overview: What is Intent?</h2><p>In a nutshell, Intent is a documentation environment providing tooling to:</p><ul><li>efficiently write documentation within the Eclipse IDE</li><li>keep this documentation up-to-date by linking pieces of docs with technical artifacts (Java or C++ code, models, Manifests...)</li><li>export the documentation (in HTML, Latex, PDF...)</li></ul><h2 id="CreateanIntentProject">Create an Intent Project</h2><ol><li>Open the <code>Project Explorer</code> view (<code>Alt + Shift + Q / Q</code> and select <code>Project Explorer</code> or <code>Window &gt; Show View... &gt; Project Explorer</code>)</li><li>Open the <code>Create New</code> Wizard (<code>Ctrl + N</code> or right-click in the project explorer and select <code>New..</code>)</li><li>Select the <code>Intent Project</code> Wizard and click <em>Next</em></li><li>Enter your Intent Project name (e.g. <em>"com.my.company.project.idoc"</em>), choose a working set (or leave to default). By clicking on <code>Finish</code> now, an empty Intent document will be created.</li><li>If you select <code>Next</code>, you will be able to choose between a set of documentation templates. The <strong>Standard Software Documentation Template</strong> has been created to help you writing meaningful documentation. By clicking on <code>Finish</code> now, an Intent document initialized with the template you selected will be created.</li></ol><h2 id="ActionsavailablefromanIntentproject">Actions available from an Intent project</h2><p>Close the Intent editor thas has been automatically opened. Let&#8217;s first focus on the Intent project in itself.</p><h3 id="OpenIntenteditors">Open Intent editors</h3><p>As you can see, an Intent project is structured as any documentation: it contains chapters, sections and sub-sections. Notice that you can open an Intent editor on any-sub part of the documentation, no matter how small. The idea is that you have above the eyes only the pieces of doc which are relevant in your current context, without having to handle an hundred of pages long document. Consequently, <strong>we strongly advice you to open Intent editors on sub-parts of the doc</strong> instead of the whole Intent document. To do so, simply double-click on an Intent element inside the project explorer view (e.g. the chapter <em>"1 Functional"</em>).</p><p>Now that the chapter 1 is opened, if you double-click on one of its sub-sections (e.g. <em>"1.6 Significant Scenarios"</em>, the sub-section will be selected inside the current editor. If you want to open a specific editor on this section, right-click on it and select the <code>Open in a new Intent editor</code> action.</p><p><img border="0" src="images/intent_01.png"/></p><p><img src="images/img-info.png" style="float:left;box-shadow:none;padding-bottom:10px;padding-right:10px"/> <p style="padding-top:17px"> Notice that there are other ways to open Intent editors (e.g. from the <a href="#Dealwithsynchronizationissues">Problem View</a> ), that will be detailed later in this guide.</p> <div style="clear:both"/></p><h3 id="Exportdocumentation">Export documentation</h3><p>By right-clicking on the Intent Project and selecting <code>Export documentation as HTML</code>, you will be able to export your Intent documentation as an HTML Bootstrap document.</p><p><img src="images/img-info.png" style="float:left;box-shadow:none;padding-bottom:10px;padding-right:10px"/> <p style="padding-top:17px">Many other formats will soon be available, please do not hesitate to make requests on the <a href="http://www.eclipse.org/forums/index.php?t=thread&amp;frm_id=219">Intent forum</a> if you want a specific export format to be supported by Intent.</p> <div style="clear:both"/></p><h2 id="WritedocumentationwithIntent">Write documentation with Intent</h2><p>This section will show how you can use Intent to write <em>"traditional"</em> documentation, i.e. explanations in natural language. As we will see <a href="#LinkdocumentationJavacode">later</a> , you will be able to <strong>link pieces of this documentation with technical artifacts</strong>.</p><p>You can customize the appearance of the Intent editor (line wrapping, bracket matching, colors...) by using the <a href="#IntentPreferences">Intent Preferences Page</a> .</p><h3 id="UsetheIntentPreviewView">Use the Intent Preview View</h3><p>As explained <a href="#OpenIntenteditors">earlier</a> , open an Intent Editor on the Section 1.6 entitled <em>"Significant Scenarios"</em>.</p><p>Intent offers a real-time HTML preview of the documentation you are currently writing. You can access to this preview by:</p><ul><li>selecting the <em>"Preview tab"</em> at the bottom of your Intent editor</li><li>or opening the <em>"Intent Preview"</em> View (<code>Alt + Shift + Q / Q</code> and select <code>Intent Preview</code> or <code>Window &gt; Show View... &gt; Intent &gt; Intent Preview</code>)</li></ul><p>This view can be useful to quickly make sure that the documentation you are writing is correctly rendered. It is refreshed any time you save an Intent editor or when you bring to top a new Intent editor.</p><p>Notice that you can disable this real-time preview mechanism from the <a href="#Appearance">Intent Preferences Page</a> , especially if you are dealing huge documents (live preview can impact Intent performances).</p><h3 id="Createnewsubsections">Create new sub-sections</h3><p>From the 1.6 Section you have just opened, you can create a new sub-section by:</p><ul><li>typing <code>Section MyNewSubSection { some text }</code></li><li>use the completion (<code>Ctrl + space</code>) and select <code>Section</code></li></ul><p>Save your document, and you will see the new sub-section appear under the Intent project.</p><p><img border="0" src="images/intent_02_subsection.png"/></p><h3 id="Writepuredocumentation">Write pure documentation</h3><p>Intent uses the <strong>Textile</strong> syntax in pure documentation zones. For example, you can put a sentence in bold by using <code>*sentence in bold*</code>, insert images using <code>!imgPath!</code>, links by using <code>"link text":http://linktarget</code>... Use the completion (<code>Ctrl + space</code>) to see all available instructions.</p><p>Any textile effect will be rendered in the <a href="#UsetheIntentPreviewView">Intent Preview View</a>.</p><p><img border="0" src="images/intent_03_preview.png"/></p><p>Please refer to the <a href="../../../org.eclipse.mylyn.wikitext.help.ui/help/Textile-Syntax.html">Textile Syntax reference</a> for further details about the textile syntax.</p><h2 id="LinkdocumentationJavacode">Link documentation &amp; Java code</h2><h3 id="DragandDroptechnicalartifacts">Drag and Drop technical artifacts</h3><p>Open an Intent Editor on the Section 1.6 entitled <em>"Significant Scenarios"</em>. Let&#8217;s write a new section presenting a functional scenario detailing a requirement of our system : </p><p><img border="0" src="images/intent_04_sectionexample.png"/></p><p>Now let&#8217;s create a Java test to test the described scenario:</p><ul><li>create a Java project entitled <code>com.my.company.project.test</code></li><li>create a Java test inside this project containing a <code>testScenario001()</code> test method</li></ul><p><img border="0" src="images/intent_05_javatest.png"/></p><p>To link this <code>testScenario001</code> test method with the related piece of documentation, simply drop the method inside the Intent document. This drag &amp; drop mechanism is extensible and works for any kind of technical artifact (Java files, model elements, MANIFEST files...).</p><p><img border="0" src="images/intent_06_dropjava.png"/></p><p>You can see that a <strong>reference</strong> has been automatically created, and that an image showing the method and its javadoc is displayed inside the editor. Notice that this image rendering mechanism is extensible.</p><h3 id="Usehyperlinkstonavigatefromdocumentationtocode">Use hyperlinks to navigate from documentation to code</h3><p>Once the Intent editor is saved, your scenario in the documentation and the java test method become linked. By typing <code>ctrl + click</code> or <code>F3</code> on the reference (<strong>@ref</strong> instruction), you can open a Java editor on the corresponding artifact. Notice that this hyperlink mechanism is extensible.</p><h3 id="Usethequickoutlinetomakesemanticsearchesonyourdocumentation">Use the quick-outline to make semantic searches on your documentation</h3><p>By typing <code>ctrl + O</code>, you can use the Intent <strong>quick-outline</strong> to query your documentation to get all the documentation parts related to some Java class, model element... </p><p>For example, if you type <code>ctrl + O</code> and search for <code>*Test.java</code>, you will get all the documentation parts related to a java test. The default scope of this search is the currently opened editor, but by typing <code>ctrl + O</code> again you will search through the whole Intent document.</p><p><img border="0" src="images/intent_7_quickoutline.png"/></p><h2 id="Dealwithsynchronizationissues">Deal with synchronization issues</h2><p>Now that you have linked a java method with a piece of documentation, any time you will modify this java method, Intent will display synchronization issues indicating the pieces of documentation that need to be updated.</p><p>Modify the method of your Scenario01 test (e.g. by adding a comment). You will see a <strong>Synchronization warning</strong> appear in the <em>Problems</em> view and on the Intent project. From this warning, you can use the <code>Intent &gt; Show in Intent editor</code> action to open an Intent editor on the documentation parts that needs to be updated.</p><p>You are free to update the outdated documentation parts whenever you want. It is up to you: <strong>choose the most efficient way of updating documentation according to your process</strong>. The Disciplined Agile Delivery describes several processes for updating your documentation: you may want to update it right away (“document continuously”), wait for the code to stabilize (e.g. the issue is closed), update the documentation just before a release (“document late”) or when people complain (“document only when it hurts”)...</p><h3 id="Visualizedifferences">Visualize differences</h3><p>You can graphically visualize the differences between the documentation and the technical artifacts by:</p><ul><li>clicking on a synchronization issue</li><li>typing <code>Ctrl + 1</code> (or right-clicking and select <code>Quick fix</code>)</li><li>selecting the <code>See all difference in compare editor</code> action</li></ul><p>A pop-up displaying all changes that occurred in the workspace and were not documented is opened, allowing you to determine how you should update your textual documentation.</p><p><img border="0" src="images/intent_08_seediffs.png"/><br/>In this example, a comment has been added to the referenced java test method.</p><h3 id="Fixasynchronizationissue">Fix a synchronization issue</h3><p>To fix a synchronization, first <strong>update your textual documentation</strong>, and :</p><ul><li>click on the synchronization issue</li><li>type <code>Ctrl + 1</code> (or right-clicking and select <code>Quick fix</code>)</li><li>select the <code>Mark documentation as updated</code> action</li><li>Save your Intent editor</li></ul><p>The synchronization issue has now disappeared from your problem view, so now your documentation is up-to-date in regards to the changes you made on your software.</p><h2 id="IntentPreferences">Intent Preferences</h2><p>The Intent preference page (<code>Window &gt; Preferences &gt; Mylyn &gt; Intent</code>) allows you to customize the behavior and appearance of Intent according to your own preferences.</p><h3 id="Appearance">Appearance</h3><ul><li><strong>Autowrap</strong>: indicates whether the Intent editor should automatically wrap lines or not. Default value is true. If deactivated, then you will have horizontal scrollbars if a line length exceeds the editor size.</li><li><strong>Show HTML Preview page</strong>: indicates whether the Intent editor should display a <em>'Preview'</em> tab, and if the Intent Preview view should be refreshed in real time. Default value is true.</li><li><strong>Collapse Modeling Units</strong>: indicates whether Modeling Units (\@M M\@ zones should be collapsed by default when opening a new Intent editor. Default value is false.</li><li><strong>Backets matching</strong>: indicates whether Bracket matching should be activated on the Intent editor. Default value is true.</li></ul><h3 id="Colors">Colors</h3><p>This preference tab allows you to customize the Intent editor appearance. Notice that you can also:</p><ul><li>change the Font used by Intent to display Titles, Modeling Units &amp; paragraphs through the <code>General &gt; Appearance &gt; Colors and Fonts &gt; Intent</code> preference page</li><li>change the Intent annotations (synchronization &amp; validation issues...) through the <code>General &gt; Editors &gt; Text Editors &gt; Annotations</code> preference page</li></ul><h3 id="Export">Export</h3><ul><li><strong>Display references inline</strong>: indicates whether export should render @ref instructions on a single line or not. Default value is false.</li></ul><h3 id="Other">Other</h3><ul><li><strong>Show Getting Started guide on project creation</strong>: indicates whether <em>'Getting Started'</em> Cheat Sheet should be automatically opened when creating a new Intent Project. Default value is true.</li></ul><ul><li><strong>Activate back-up mechanism</strong>: indicates whether the Intent document should be backed-up in an hidden &#171;.intentbackup&#187; file in the Intent project. Default value is false.</li></ul><ul><li><strong>Advanced logging</strong>: this option is only used in debug, and makes each intent component (compiler, synchronizer...) log its activity.</li></ul></body></html>