blob: d8649b9a4732002ef9cf7927f9a5046c5e575d27 [file] [log] [blame]
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
<title>Eclipse client - Eclipse Hawk</title>
<link rel="stylesheet" href="../../assets/stylesheets/application.30686662.css">
<link rel="stylesheet" href="../../assets/stylesheets/application-palette.a8b3c06d.css">
<meta name="theme-color" content="#7e57c2">
<script src="../../assets/javascripts/modernizr.74668098.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=fallback">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="../../assets/fonts/material-icons.css">
<link rel="manifest" href="../../assets/images/site.webmanifest">
<link rel="stylesheet" href="../../stylesheets/extra.css">
<!-- FAVICON -->
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel="manifest" href="/img/site.webmanifest">
<link rel="mask-icon" href="/img/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/img/favicon.ico">
<meta name="msapplication-TileColor" content="#b91d47">
<meta name="msapplication-config" content="/img/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
</head>
<body dir="ltr" data-md-color-primary="deep-purple" data-md-color-accent="deep-purple">
<svg class="md-svg">
<defs>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#managing-remote-hawk-indexers" tabindex="1" class="md-skip">
Skip to content
</a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="../.." title="Eclipse Hawk" class="md-header-nav__button md-logo">
<img src="../../assets/images/hawk-logo-white.svg" width="24" height="24">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
Eclipse Hawk
</span>
<span class="md-header-nav__topic">
Eclipse client
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://git.eclipse.org/c/hawk/hawk.git/" title="Go to repository" class="md-source" data-md-source="">
<div class="md-source__repository">
Git repository @ Eclipse
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="../.." title="Eclipse Hawk" class="md-nav__button md-logo">
<img src="../../assets/images/hawk-logo-white.svg" width="48" height="48">
</a>
Eclipse Hawk
</label>
<div class="md-nav__source">
<a href="https://git.eclipse.org/c/hawk/hawk.git/" title="Go to repository" class="md-source" data-md-source="">
<div class="md-source__repository">
Git repository @ Eclipse
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../.." title="Home" class="md-nav__link">
Home
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2">
<label class="md-nav__link" for="nav-2">
Basic use
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-2">
Basic use
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../basic-use/installation/" title="Installation" class="md-nav__link">
Installation
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/core-concepts/" title="Core concepts" class="md-nav__link">
Core concepts
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/examples-xmi/" title="Examples (XMI)" class="md-nav__link">
Examples (XMI)
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/examples-modelio/" title="Examples (Modelio)" class="md-nav__link">
Examples (Modelio)
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/papyrus/" title="Papyrus UML support" class="md-nav__link">
Papyrus UML support
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
<label class="md-nav__link" for="nav-3">
Advanced use
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-3">
Advanced use
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../advanced-use/graph-as-emf/" title="Graph as EMF model" class="md-nav__link">
Graph as EMF model
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/advanced-props/" title="Advanced properties" class="md-nav__link">
Advanced properties
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/meta-queries/" title="Meta-level queries" class="md-nav__link">
Meta-level queries
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/temporal-queries/" title="Temporal queries" class="md-nav__link">
Temporal queries
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/oomph/" title="Oomph and Hawk" class="md-nav__link">
Oomph and Hawk
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" checked>
<label class="md-nav__link" for="nav-4">
Server
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-4">
Server
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../architecture/" title="Architecture" class="md-nav__link">
Architecture
</a>
</li>
<li class="md-nav__item">
<a href="../api/" title="Thrift API" class="md-nav__link">
Thrift API
</a>
</li>
<li class="md-nav__item">
<a href="../api-security/" title="Thrift API security" class="md-nav__link">
Thrift API security
</a>
</li>
<li class="md-nav__item">
<a href="../deployment/" title="Deployment" class="md-nav__link">
Deployment
</a>
</li>
<li class="md-nav__item">
<a href="../cli/" title="Console client" class="md-nav__link">
Console client
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
Eclipse client
</label>
<a href="./" title="Eclipse client" class="md-nav__link md-nav__link--active">
Eclipse client
</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#managing-remote-hawk-indexers" class="md-nav__link">
Managing remote Hawk indexers
</a>
</li>
<li class="md-nav__item">
<a href="#editor-for-remote-model-access-descriptors" class="md-nav__link">
Editor for remote model access descriptors
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#main-tab" class="md-nav__link">
Main tab
</a>
</li>
<li class="md-nav__item">
<a href="#effective-metamodel-tab" class="md-nav__link">
Effective metamodel tab
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../file-config/" title="File-based configuration" class="md-nav__link">
File-based configuration
</a>
</li>
<li class="md-nav__item">
<a href="../logging/" title="Logging" class="md-nav__link">
Logging
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
<label class="md-nav__link" for="nav-5">
Developers
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-5">
Developers
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../developers/run-from-source/" title="Run GUI from source" class="md-nav__link">
Run GUI from source
</a>
</li>
<li class="md-nav__item">
<a href="../../developers/server-from-source/" title="Run Server from source" class="md-nav__link">
Run Server from source
</a>
</li>
<li class="md-nav__item">
<a href="../../developers/plain-maven/" title="Build with plain Maven" class="md-nav__link">
Build with plain Maven
</a>
</li>
<li class="md-nav__item">
<a href="../../developers/website/" title="Work on the website" class="md-nav__link">
Work on the website
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
<label class="md-nav__link" for="nav-6">
Community
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-6">
Community
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="https://www.eclipse.org/forums/index.php/f/442/" title="Forum" class="md-nav__link">
Forum
</a>
</li>
<li class="md-nav__item">
<a href="https://gitlab.eclipse.org/eclipse/hawk/hawk/-/issues/new" title="File a bug" class="md-nav__link">
File a bug
</a>
</li>
<li class="md-nav__item">
<a href="https://gitlab.eclipse.org/eclipse/hawk/hawk/-/issues" title="Open bugs" class="md-nav__link">
Open bugs
</a>
</li>
<li class="md-nav__item">
<a href="https://ci.eclipse.org/hawk/" title="Builds" class="md-nav__link">
Builds
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../additional-resources/" title="Additional resources" class="md-nav__link">
Additional resources
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#managing-remote-hawk-indexers" class="md-nav__link">
Managing remote Hawk indexers
</a>
</li>
<li class="md-nav__item">
<a href="#editor-for-remote-model-access-descriptors" class="md-nav__link">
Editor for remote model access descriptors
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#main-tab" class="md-nav__link">
Main tab
</a>
</li>
<li class="md-nav__item">
<a href="#effective-metamodel-tab" class="md-nav__link">
Effective metamodel tab
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<h1>Eclipse client</h1>
<p>Hawk includes multiple optional features to integrate the <a href="../api/">Thrift APIs</a> with regular Eclipse-based tooling:</p>
<ul>
<li>A custom Hawk instance type that operates over the Thrift API instead of locally.</li>
<li>An EMF abstraction that allows for treating remote models as local ones.</li>
<li>An editor for the <code>.hawkmodel</code> model access descriptors used by the above EMF resource abstraction.</li>
</ul>
<p>This page documents how these different features can be used.</p>
<h2 id="managing-remote-hawk-indexers">Managing remote Hawk indexers<a class="headerlink" href="#managing-remote-hawk-indexers" title="Permanent link">&para;</a></h2>
<p>When creating a Hawk instance for the first time (using the dialog shown below), users can specify which factory will be used. The name of the selected factory will be saved into the configuration of the instance, allowing Hawk to recreate the instance in later executions without asking again. Hawk provides a default <code>LocalHawkFactory</code> whose <code>LocalHawk</code> instances operate in the current Java virtual machine. Users can also specify which Hawk components should be enabled.</p>
<p><img alt="New instance dialog" src="../img/hawk-new-remote.png" /></p>
<p>A factory can also be used to "import" instances that already exist but Hawk does not know about. For the local case, these would be instances that were previously removed from Eclipse but whose folders were not deleted. The Eclipse import dialog looks like this:</p>
<p><img alt="Import instance dialog" src="../img/hawk-import-remote.png" /></p>
<p>The "Thrift API integration for Hawk GUI" feature provides a plugin that contributes a new indexer factory, ThriftRemoteHawkFactory, which produces ThriftRemoteHawk instances that use ThriftRemoteModelIndexer indexers. When creating a new instance, the factory will use the createInstance operation to add the instance to the server. When used to "import", the remote factory retrieves the list of Hawk instances available on the
server through the listInstances operation of the Thrift API. Management actions (such as starting
or stopping the instance) and their results are likewise translated between the user interface and the
Thrift API.</p>
<p>The Hawk user interface provides live updates on the current state of each indexer, with short status
messages and an indication of whether the indexer is stopped, running or updating. Management actions and queries are disabled during an update, to prevent data consistency issues. The Hawk indexer in the remote server talks to the client through an Artemis queue: please make sure Artemis has been set up correctly in the server (see <a href="../deployment/">the setup guide</a>).</p>
<p>All these aspects are transparent to the user: the only difference is selecting the appropriate "Instance type" in the new instance or import dialogs and entering the URL to the Hawk Thrift endpoint. If the remote instance type is chosen, Hawk will only list the Hawk components that are installed in the server, which may differ from those installed in the client.</p>
<h2 id="editor-for-remote-model-access-descriptors">Editor for remote model access descriptors<a class="headerlink" href="#editor-for-remote-model-access-descriptors" title="Permanent link">&para;</a></h2>
<p>There are many different use cases for retrieving models over the network, each with their own requirements. The EMF model abstraction uses a <code>.hawkmodel</code> model access descriptor to specify the exact configuration we want to use when fetching the model over the network. <code>.hawkmodel</code> files can be opened by any EMF-compatible tool and operate just like a regular model.</p>
<p>To simplify the creation and maintenance of these <code>.hawkmodel</code> files, an Eclipse-based editor is provided in the "Remote Hawk EMF Model UI Feature". The editor is divided into three tabs: a form-based tab for editing most aspects of the descriptor in a controlled manner, another form-based tab for editing the effective metamodel to limit the contents of the model, and a text-based tab for editing the descriptor directly.</p>
<h3 id="main-tab">Main tab<a class="headerlink" href="#main-tab" title="Permanent link">&para;</a></h3>
<p>Here is a screenshot of the main tab:</p>
<p><img alt=".hawkmodel editor" src="../img/hawk-descriptor-editor.png" /></p>
<p>The main form-based tab is divided into three sections:</p>
<ul>
<li>
<p>The "Instance" section provides connection details for the remote Hawk
instance: the URL of the Thrift endpoint, the Thrift protocol to use (more
details in D5.6) and the name of the Hawk instance within the server.
"Instance name" can be clicked to open a selection dialog with all the
available instances.</p>
<p>The "Username" and "Password" fields only need to be filled in if using the
<code>.hawkmodel</code> file outside Eclipse. When using the <code>.hawkmodel</code> inside
Eclipse, the remote EMF abstraction will fall back on the credentials stored
in the Eclipse secure store if needed.</p>
</li>
<li>
<p>The "Contents" section allows for filtering the contents of the Hawk index to
be read and changing how they should be loaded:</p>
<ul>
<li>By default, the entire index is retrieved (repository URL is '*', file pattern is '*'
and no query is used). The "Repository URL", "File pattern(s)" and "Query language"
labels can be clicked to open selection dialogs with the appropriate options.</li>
<li>The default loading mode is "GREEDY" (send the entire contents of the model in one
message), but various lazy loading modes are available.</li>
<li>The contents of the index can be split over the different source files or not. While
splitting by file is useful for browsing, some EMF-based tools may not be compatible with it.</li>
<li>The "Default namespaces" field makes it possible to resolve ambiguous type names. For instance,
both the IFC2x3 and the IFC4 metamodels have a type called <code>IfcActor</code>. Without this field, the
query would need to specify which one of the two metamodels should be used on every reference to
<code>IfcActor</code>, which is unwieldy and prone to mistakes. With this field filled, the query will be
told to resolve ambiguous type references to those of the IFC2x3 metamodel.</li>
<li>The "Page size for initial load" field can be set to a value other than 0, indicating that during
the initial load of the model, its contents should not be sent in one response message, but rather
divided into "pages" of a certain size. It was observed that a GREEDY loading mode with an adequate
page size can be faster to load than a lazy loading mode, while still keeping server memory and
bandwidth requirements under control.</li>
</ul>
</li>
<li>The "Subscription" section allows users to enable live updates in the opened model through the
<code>watchGraphChanges</code> operation and an Apache Artemis queue of a certain durability. In order to
allow the server to recognize users that reconnect after a connection loss, a unique client ID
should be provided.</li>
</ul>
<h3 id="effective-metamodel-tab">Effective metamodel tab<a class="headerlink" href="#effective-metamodel-tab" title="Permanent link">&para;</a></h3>
<p>The effective metamodel editor tab presents a table that lists all the metamodels registered in the selected remote Hawk instance, their types, and their features (called "slots" by the Hawk API). It is structured as a tree with three levels, with the metamodels at the root level, the types inside the metamodels, and their slots inside the types.</p>
<p><img alt="Effective metamodel editor" src="../img/hawk-emm-editor.png" /></p>
<p>The implicit default is that all metamodels are completely included, but users can manually include or exclude certain metamodels, types or slots within the types. This can be done through drop-down selection lists on the "State" column of the table, or through the buttons on the right of the table:</p>
<ul>
<li>"Include all" resets the entire table to the default state of implicitly including everything.</li>
<li>"Exclude all" resets the entire table to excluding all metamodels.</li>
<li>"Exclude" and "Include" only change the state of the currently selected element.</li>
<li>"Reset" returns the currently selected element to the "Default" state.</li>
</ul>
<p>The effective metamodel is saved as part of the <code>.hawkmodel</code> file, and uses both inclusion and exclusion rules to remain as compact as possible (as it will need to be sent over the network). The rules work as follows:</p>
<ul>
<li>A metamodel is included if it is "Included", or if it has the "Default" state and no metamodels are explicitly "Included".</li>
<li>A type is included if it is not "Excluded" and its metamodel is included.</li>
<li>A slot is included if it is not "Excluded" and its type is included.</li>
</ul>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="../cli/" title="Console client" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
Console client
</span>
</div>
</a>
<a href="../file-config/" title="File-based configuration" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
File-based configuration
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
Copyright © Eclipse Foundation, Inc. All Rights Reserved.
</div>
powered by
<a href="https://www.mkdocs.org">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/">Material for MkDocs</a>
</div>
<div class="md-footer-copyright hawk-eclipse-links">
<ul>
<li><a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
</ul>
</div>
</div>
</div>
</footer>
</div>
<script src="../../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"../.."}})</script>
</body>
</html>