{"id":32464,"date":"2019-10-31T21:47:12","date_gmt":"2019-10-31T18:47:12","guid":{"rendered":"https:\/\/prohoster.info\/blog\/eclipse-kak-tehnologicheskaya-platforma-dlya-1c-enterprise-development-tools\/"},"modified":"2019-10-31T21:47:12","modified_gmt":"2019-10-31T18:47:12","slug":"eclipse-kak-tehnologicheskaya-platforma-dlya-1c-enterprise-development-tools","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/eclipse-kak-tehnologicheskaya-platforma-dlya-1c-enterprise-development-tools","title":{"rendered":"Eclipse as a technological platform for 1C:Enterprise Development Tools","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Probably, <noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/\">), and if development repositories are used, version control systems like Git. Most beginners do not need to worry if their configuration reports some missing optional ns-3 features, but for those who desire a complete installation, the project provides a wiki that includes pages with many useful tips and hints. One such page is the \"Installation\" page with installation instructions for various systems, available at:<\/a><\/noindex> it no longer needs any special introduction. Many are familiar with Eclipse thanks to Eclipse Java development tools (<noindex><a rel=\"nofollow\" href=\"http:\/\/www.eclipse.org\/jdt\/\">JDT<\/a><\/noindex>). This popular open-source Java IDE is associated with the term 'Eclipse' by most developers. However, Eclipse is also an extensible platform for integrating development tools (Eclipse Platform), and a whole range of IDEs built on top of it, including JDT. Eclipse encompasses the Eclipse Project, a top-level project coordinating the development of the Eclipse Platform and JDT, and the Eclipse SDK \u2013 the deliverable outcome of this development. Finally, Eclipse is an open-source Foundation with a vast community of projects, not all of which are written in Java or relate to development tools (for instance, the projects <noindex><a rel=\"nofollow\" href=\"https:\/\/iot.eclipse.org\/\">Eclipse IoT<\/a><\/noindex> and <noindex><a rel=\"nofollow\" href=\"https:\/\/science.eclipse.org\/\">Eclipse Science<\/a><\/noindex>). The world of Eclipse is very diverse.<\/p>\n<p>In this article, which is characteristically overview in nature, we will attempt to examine some basics of Eclipse architecture as a platform for building integrated development tools and provide an initial understanding of the components of Eclipse that form the foundation of the technology platform for the 'new Configurator' 1C: Enterprise, <noindex><a rel=\"nofollow\" href=\"http:\/\/v8.1c.ru\/overview\/release_IDE\/\">1C:Enterprise Development Tools<\/a><\/noindex>. Of course, such an examination will inevitably be somewhat superficial and quite limited, partly because we aim our content not only at Eclipse developers as the target audience. Nevertheless, we hope that even experienced Eclipse developers will find interesting information in this article. For example, we will discuss one of the 'secrets of Eclipse', a relatively new and still little-known project, <noindex><a rel=\"nofollow\" href=\"http:\/\/eclipse.org\/handly\/\">Eclipse Handly<\/a><\/noindex>, which was founded and is supported by 1C.<br \/>\n<img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/eb399a50bf86b6acce1df9e3d40848d4.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>Introduction to Eclipse Architecture<\/h2>\n<p>\nLet's first consider some general aspects of Eclipse architecture using <noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/jdt\/overview.php\">Eclipse Java development tools<\/a><\/noindex> (JDT) as an example. The choice of JDT as an example is not accidental. It was the first integrated development environment to appear in Eclipse. Other *DT projects of Eclipse, such as Eclipse C\/C++ Development Tooling (CDT), were created later and borrowed both the basic architectural principles and individual fragments of the source code from JDT. The architectural foundations laid in JDT remain relevant today for virtually any IDE built on top of the Eclipse Platform, including 1C:Enterprise Development Tools.<\/p>\n<p>First of all, it should be noted that Eclipse is characterized by a clear architectural layering, separating language-independent functionality from functionality designed to support specific programming languages, as well as separating UI-independent core components from those related to supporting the user interface.<\/p>\n<p>Thus, the Eclipse Platform defines a common, language-independent infrastructure, while Java development tools add a fully functional Java IDE to Eclipse. Both the Eclipse Platform and JDT consist of several components, each of which belongs either to the UI-independent core or to the UI layer (Fig. 1).<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/230825124962e721ecca7dfb7dee9a0c.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 1. Eclipse Platform and JDT<\/b><\/p>\n<p>Let\u2019s list the main components of the Eclipse Platform:<\/p>\n<ul>\n<li><b>Runtime<\/b> \u2014 Defines the plugin infrastructure. Eclipse is characterized by a modular architecture. Essentially, Eclipse is a collection of 'extension points' and 'extensions'.<\/li>\n<li><b>Workspace<\/b> \u2014 Manages one or more projects. A project consists of folders and files that are directly represented in the file system.<\/li>\n<li><b>Standard Widget Toolkit (SWT)<\/b> \u2014 Provides basic user interface elements integrated with the operating system.<\/li>\n<li><b>JFace<\/b> \u2014 Provides a set of UI frameworks built on top of SWT.<\/li>\n<li><b>Workbench<\/b> \u2014 Defines the UI paradigm of Eclipse: editors, views, perspectives.<\/li>\n<\/ul>\n<p>\nIt should be noted that the Eclipse Platform also provides many other useful components for building integrated development tools, among which are Debug, Compare, Search, and Team. It is worth mentioning JFace Text \u2014 the basis for building 'smart code editors'. Unfortunately, even a brief overview of these components, as well as the UI layer components, is not possible within the scope of this article, so in the remaining part of this section we will limit ourselves to reviewing the main core components of the Eclipse Platform and JDT.<\/p>\n<h4>Core Runtime<\/h4>\n<p>\nThe Eclipse plugin infrastructure is based on <noindex><a rel=\"nofollow\" href=\"https:\/\/www.osgi.org\/developer\/specifications\/\">OSGi<\/a><\/noindex> and is provided by the project <noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/equinox\/\">Eclipse Equinox<\/a><\/noindex>. Each Eclipse plugin is an OSGi bundle. The OSGi specification defines, among other things, the mechanisms for versioning and dependency resolution. In addition to these standard mechanisms, Equinox introduces the concept of <i>extension points<\/i>Each plugin can define its own extension points and also add additional functionality to the system (\"extensions\") using extension points defined by this or other plugins. A detailed description of the OSGi and Equinox mechanisms goes beyond the scope of this article. It is worth noting that modularization in Eclipse is absolute (any subsystem, including Runtime, consists of one or more plugins), and practically everything in Eclipse is an extension. Moreover, these principles were embedded in the architecture of Eclipse long before the implementation of OSGi (at that time, a proprietary technology similar to OSGi was used).<\/p>\n<h4>Core Workspace<\/h4>\n<p>\nAlmost any integrated development environment built on the Eclipse Platform works with an Eclipse workspace. The workspace typically contains the source code of the application being developed in the IDE. The workspace maps directly to the file system and consists of projects that contain folders and files. These projects, folders, and files are referred to as <i>resources<\/i> workspace. The implementation of the workspace in Eclipse acts as a cache relative to the file system, which significantly speeds up the traversal of the resource tree. Additionally, the workspace provides a number of extra services, including <noindex><a rel=\"nofollow\" href=\"https:\/\/eclipse.org\/articles\/Article-Resource-deltas\/resource-deltas.html\">a mechanism for resource change notifications<\/a><\/noindex> and <noindex><a rel=\"nofollow\" href=\"https:\/\/eclipse.org\/articles\/Article-Builders\/builders.html\">an infrastructure for incremental builders<\/a><\/noindex>.<\/p>\n<p>The Core Resources component (plugin org.eclipse.core.resources) is responsible for maintaining the workspace and its resources. In particular, this component provides programmatic access to the workspace in the form of <i>a resource model<\/i>. For effective work with this model, clients need a simple way to represent a reference to a resource. At the same time, it would be preferable to hide the object that directly holds the resource state in the model from client access. Otherwise, in the case, for example, of a file deletion, the client could continue to hold an object that no longer exists in the model, leading to subsequent problems. Eclipse addresses this issue using the so-called <i>handle<\/i> of the resource. The handle acts as a key (it only knows the path to the resource in the workspace) and fully controls access to the internal model object that directly holds the resource state information. This design is a variation of the <noindex><a rel=\"nofollow\" href=\"http:\/\/wiki.c2.com\/?HandleBodyPattern\">Handle\/Body<\/a><\/noindex>.<\/p>\n<p>Figure 2 illustrates the Handle\/Body idiom as applied to the resource model. The IResource interface represents the resource handle and acts as an API, in contrast to the Resource class that implements this interface, as well as the ResourceInfo class, which represents the body and is not an API. It is important to emphasize that the handle is only aware of the path to the resource relative to the workspace root and does not contain a reference to the resource info. Resource info objects form the so-called 'element tree.' This data structure is fully materialized in memory. To find a resource info instance corresponding to a certain handle, the element tree is traversed according to the path stored in that handle.<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/9d17cd95be3730ab6b5b9e6e3ed71ace.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Figure 2. IResource and ResourceInfo<\/b><\/p>\n<p>As we will see further, the basic design of the resource model (which can be termed handle-based) is used in Eclipse and for other models as well. Meanwhile, let's list some distinctive properties of this design:<\/p>\n<ul>\n<li>A handle is a value object. Value objects are immutable objects whose equality is not based on identity. Such objects can be safely used as keys in hashed containers. Multiple handle instances can refer to the same resource. To compare them, the equals(Object) method should be used.<\/li>\n<li>The handle defines the behavior of the resource but does not contain information about the state of the resource (the only data it holds is the 'key', the path to the resource).<\/li>\n<li>A handle can refer to a non-existent resource (either a resource that has not yet been created or one that has already been deleted). The existence of a resource can be checked using the IResource.exists() method.<\/li>\n<li>Some operations can be implemented based solely on the information stored in the handle itself (so-called handle-only operations). Examples include IResource.getParent(), getFullPath(), etc. The resource does not necessarily have to exist for such an operation to be successfully performed. Operations that require the resource to exist in order to execute successfully throw an exception (CoreException) if the resource does not exist.<\/li>\n<\/ul>\n<p>\nEclipse provides an efficient notification mechanism for changes in workspace resources (see Fig. 3). Resources can change as a result of actions taken within the Eclipse IDE or through synchronization with the file system. In both cases, clients subscribed to notifications receive detailed information about the changes in the form of 'resource deltas.' A delta describes the changes between two states of the workspace resource (sub-)tree and is, itself, a tree where each node describes a change of a specific resource and contains a list of deltas for the next level, describing changes to child resources.<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/8af412412ee97d205137ab70c8444a50.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 3. IResourceChangeEvent and IResourceDelta<\/b><\/p>\n<p>The notification mechanism based on resource deltas has the following characteristics:<\/p>\n<ul>\n<li>Single changes and multiple changes are described using the same structure, as the delta is built on the principle of recursive composition. Subscriber clients can handle notifications about resource changes through recursive descent down the delta tree.<\/li>\n<li>The delta contains complete information about the resource change, including its relocation and\/or modification of associated 'markers' (for example, compilation errors are represented as markers).<\/li>\n<li>As references to resources are made through handles, the delta can naturally refer to remote resources.<\/li>\n<\/ul>\n<p>\nAs we will soon see, the main components of the design of the resource change notification mechanism are relevant to other handle-based models as well.<\/p>\n<h4>JDT Core<\/h4>\n<p>\nThe Eclipse workspace resource model is a fundamental language-independent model. The JDT Core component (plugin org.eclipse.jdt.core) provides an API for navigating and analyzing the structure of the workspace from a Java perspective, known as the 'Java model' (<i>Java model<\/i>). This API is defined in terms of Java elements, as opposed to the underlying resource model API, which is defined in terms of folders and files. The main interfaces of the Java elements tree are depicted in Fig. 4.<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/67bfd31e93eaa66aa94b30281693a318.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 4. Java model elements<\/b><\/p>\n<p>The Java model uses the same handle\/body idiom as the resource model (see Fig. 5). IJavaElement acts as the handle, while JavaElementInfo serves as the body. The IJavaElement interface defines a protocol common to all Java elements. Some of its methods are handle-only: getElementName(), getParent(), etc. The JavaElementInfo object stores the state of the corresponding element: its structure and attributes.<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/5b473cccfc8f258d563033ce334cb94f.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 5. IJavaElement and JavaElementInfo<\/b><\/p>\n<p>The Java model has some differences in the implementation of the basic handle\/body design compared to the resource model. As noted above, the resource model's element tree, whose nodes are resource info objects, is fully stored in memory. However, in the Java model, there can be significantly more elements than in the resource tree, as it represents the internal structure of .java and .class files: types, fields, and methods.<\/p>\n<p>To avoid fully materializing the entire element tree in memory, the Java model implementation uses a limited-size LRU cache for element info, where the key is the IJavaElement handle. Element info objects are created on-demand as navigation occurs through the element tree. At the same time, the least frequently used elements are evicted from the cache, and the memory consumption of the model remains limited to the specified cache size. This is yet another advantage of the handle-based design, which completely hides such implementation details from client code.<\/p>\n<p>The notification mechanism for changes in Java elements is generally analogous to the resource workspace change tracking mechanism discussed above. A client wishing to track changes in the Java model subscribes to notifications, which are represented as an ElementChangedEvent object containing an IJavaElementDelta (see Fig. 6).<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/0402ec362078eaf50f47756e7f24de01.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 6. ElementChangedEvent and IJavaElementDelta<\/b><\/p>\n<p>The Java model does not contain information about method bodies or name resolution, so for detailed analysis of Java code, JDT Core provides an additional (non-handle-based) model: <noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/articles\/Article-JavaCodeManipulation_AST\/index.html\">abstract syntax tree<\/a><\/noindex> (abstract syntax tree, AST). The AST represents the result of parsing the source text. AST nodes correspond to the elements of the source module's structure (declarations, statements, expressions, etc.) and contain information about the coordinates of the corresponding element in the source text, as well as (optionally) name resolution information in the form of references to what are called <i>bindings<\/i>Bindings are objects representing named entities such as types, methods, and variables known to the compiler. Unlike AST nodes that form a tree, bindings support cross-references and generally form a graph. The abstract class ASTNode serves as a common base class for all AST nodes. Subclasses of ASTNode correspond to specific syntactic constructs of the Java language.<\/p>\n<p>Since syntax trees can consume significant amounts of memory, JDT caches only one AST for the active editor. Unlike the Java model, the AST is typically viewed as an 'intermediate', 'temporary' model, the elements of which clients should not hold references to outside the context of the operation that led to the AST creation.<\/p>\n<p>The three listed models (Java model, AST, bindings) together form the foundation for building 'smart development tools' in JDT, among which is a powerful Java editor with various 'assistants', different actions for processing source code (including organizing the import names list and formatting according to the configured style), search and refactoring tools. The Java model plays a special role, as it is used as the basis for visually presenting the structure of the developing application (for example, in Package Explorer, Outline, Search, Call Hierarchy, and Type Hierarchy).<\/p>\n<h2>Eclipse components used in 1C:Enterprise Development Tools.<\/h2>\n<p>\nFigure 7 shows the Eclipse components that form the foundation of the technological platform for 1C:Enterprise Development Tools.<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/248cceea47ee507b9ad22d6964738ee7.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Figure 7. Eclipse as a platform for 1C:Enterprise Development Tools.<\/b><\/p>\n<p><b>Eclipse Platform<\/b> provides the basic infrastructure. We examined some aspects of this infrastructure in the previous section.<\/p>\n<p><b><noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/modeling\/emf\/\">Eclipse Modeling Framework<\/a><\/noindex><\/b> (<b>EMF<\/b>) provides general tools for modeling structured data. EMF is integrated with the Eclipse Platform but can also be used separately in regular Java applications. Quite often, novice Eclipse developers are already familiar with EMF, even though they may not yet understand the nuances of the Eclipse Platform. One reason for this well-deserved popularity is the universal design, which includes a unified meta-level API that allows generalized work with any EMF model. The basic implementations provided by EMF for model objects and the model code generation subsystem based on the meta-model significantly increase development speed and reduce errors. EMF also includes mechanisms for model serialization, change tracking in the model, and much more. <\/p>\n<p>Like any truly universal tool, EMF is suitable for a wide range of modeling tasks, but some classes of models (for example, the handle-based models discussed above) may require more specialized modeling tools. Discussing EMF is a thankless task, especially within the limited scope of a single article, as it is the subject of a separate, quite thick book. It is worth noting that the solid system of generalizations underlying EMF has given rise to a whole range of modeling projects that fall within the umbrella project. <noindex><a rel=\"nofollow\" href=\"https:\/\/eclipse.org\/modeling\/\">Eclipse Modeling<\/a><\/noindex> alongside EMF itself. One such project is Eclipse Xtext.<\/p>\n<p><b><noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/Xtext\/\">Eclipse Xtext<\/a><\/noindex><\/b> provides the infrastructure for 'textual modeling'. Xtext uses <noindex><a rel=\"nofollow\" href=\"http:\/\/www.antlr.org\/\">ANTLR<\/a><\/noindex> for the syntactic analysis of source text and EMF for representing the resulting ASG (abstract semantic graph, which is essentially a combination of AST and bindings), also referred to as a 'semantic model'. The grammar of the language modeled with Xtext is described in its own Xtext language. This allows not only the generation of grammar descriptions for ANTLR but also provides a mechanism for AST serialization (i.e., Xtext offers both parser and unparser), contextual hints, and a range of other language components. On the other hand, the grammar description language used in Xtext is less flexible compared to, say, the grammar description language in ANTLR. Therefore, it is sometimes necessary to 'bend' the implemented language to fit Xtext, which is usually not a problem if it concerns a language developed from scratch, but may be unacceptable for languages with an already established syntax. Despite this, Xtext is currently the most mature, functionally complete, and versatile tool in Eclipse for building programming languages and development tools for them. In particular, it is the ideal tool for rapid prototyping. <noindex><a rel=\"nofollow\" href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D1%80%D0%B5%D0%B4%D0%BC%D0%B5%D1%82%D0%BD%D0%BE-%D0%BE%D1%80%D0%B8%D0%B5%D0%BD%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%8F%D0%B7%D1%8B%D0%BA\">domain-specific languages<\/a><\/noindex> (domain-specific language, DSL). In addition to the aforementioned 'language core' based on ANTLR and EMF, Xtext provides a multitude of useful higher-level components, including indexing mechanisms, incremental building, a 'smart editor', and much more, but leaves out language handle-based models. Like EMF, Xtext is a subject worthy of a separate book, and we are unlikely to be able to even briefly cover all its capabilities now.<\/p>\n<p>1C:Enterprise Development Tools actively utilize both EMF itself and a number of other Eclipse Modeling projects. In particular, Xtext is one of the foundations for development tools for such languages in 1C:Enterprise, including the embedded programming language and query language. Another foundation for these development tools is the Eclipse Handly project, which we will discuss in more detail (among the listed Eclipse components, it is currently the least known).<\/p>\n<p><b><noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/handly\/\">Eclipse Handly<\/a><\/noindex><\/b>, a subproject of the top-level Eclipse Technology project, emerged from the initial code contribution to the Eclipse Foundation made by the 1C company in 2014. Since then, 1C has continued to support the development of the project: Handly committers are employees of the company. The project is small but occupies a sufficiently unique niche in Eclipse: its main goal is to support the development of handle-based models.<\/p>\n<p>The main architectural principles of handle-based models, such as the handle\/body idiom, were discussed earlier using the resource model and the Java model as examples. It was noted that both the resource model and the Java model are important foundations for the Eclipse Java Development Tools (JDT). Since almost all *DT projects in Eclipse have an architecture similar to that of JDT, it would not be an exaggeration to say that handle-based models underlie many, if not all, IDEs built on the Eclipse Platform. For instance, in the Eclipse C\/C++ Development Tooling (CDT), there is a handle-based model for C\/C++, which plays the same role in the CDT architecture as the Java model does in JDT.<\/p>\n<p>Before Handly, Eclipse did not offer specialized libraries for building language handle-based models. Currently existing models were primarily created through direct adaptation of the Java model (a.k.a. copy\/paste), <i>wherever allowed<\/i> by the Eclipse Public License (EPL). (It is clear that, for example, for Eclipse projects themselves, this is usually not a legal issue, which cannot be said for products with closed source.) Besides its characteristic lack of systematization, such an approach leads to well-known problems: code duplication, errors introduced during adaptation, and so on. Even worse, the resulting models remain 'things in themselves' and do not leverage the existing potential for unification. After all, identifying common concepts and protocols for language handle-based models could lead to the creation of reusable components for working with them, similar to what happened with EMF.<\/p>\n<p>It cannot be said that there was no understanding of these issues within Eclipse. As early as 2005 <noindex><a rel=\"nofollow\" href=\"https:\/\/www.xing.com\/profile\/Martin_Aeschlimann\">Martin Aeschlimann<\/a><\/noindex>, summarizing the experience gained from developing the CDT prototype, <noindex><a rel=\"nofollow\" href=\"https:\/\/www.eclipse.org\/org\/langsymp\/position_paper_martin_aeschlimann.html\">argued<\/a><\/noindex> the need to create a common infrastructure for language models, including handle-based models. However, as is often the case, due to more pressing tasks, the implementation of these ideas was never realized. Meanwhile, the factorization of code for DT projects remains one of the inadequately developed topics in Eclipse.<\/p>\n<p>In a certain sense, the Handly project aims to address similar tasks as EMF, but for handle-based models, primarily linguistic ones (i.e., representing elements of a programming language structure). Below are the main goals set during the design of Handly:<\/p>\n<ul>\n<li>Identifying the key abstractions of the subject area.<\/li>\n<li>Reducing efforts and improving the quality of implementing language handle-based models through code reuse.<\/li>\n<li>Providing a unified API at the meta-level to the resulting models, enabling the creation of common IDE components that work with language handle-based models.<\/li>\n<li>Flexibility and scalability.<\/li>\n<li>Integration with Xtext (in a separate layer).<\/li>\n<\/ul>\n<p>\nTo highlight common concepts and protocols, existing implementations of language handle-based models were analyzed. The main interfaces and base implementations provided by Handly are shown in Fig. 8.<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/47f4bf74093245334b8d67b149734dfc.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 8. Common interfaces and base implementations of Handly elements<\/b><\/p>\n<p>The IElement interface represents the handle of an element and is common to elements of all models based on Handly. The abstract class Element implements a generalized handle\/body mechanism (Fig. 9).<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/0651c1f284b7edfa36313d4b51d72f08.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 9. IElement and generalized implementation of handle\/body<\/b><\/p>\n<p>Additionally, Handly provides a generalized notification mechanism for changes to model elements (Fig. 10). As can be seen, it is broadly similar to the notification mechanisms implemented in the resource model and Java model, using IElementDelta to provide a unified representation of information about element changes.<\/p>\n<p><img decoding=\"async\" alt=\"Eclipse as a technological platform for 1C:Enterprise Development Tools\" src=\"\/wp-content\/uploads\/2019\/04\/cbdec8cf874308e0fa9dd96d04f62703.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<b>Fig. 10. Common interfaces and base implementations of Handly's notification mechanism<\/b><\/p>\n<p>The part of Handly discussed above (Fig. 9 and 10) can be used to represent virtually any handle-based models. To create <i>language<\/i> models, the project offers additional functionality \u2013 in particular, common interfaces and base implementations for elements of the source text structure, known as <i>source elements<\/i> (Fig. 8). The ISourceFile interface represents the source file, while ISourceConstruct is an element within the source file. The abstract classes SourceFile and SourceConstruct implement generalized mechanisms to support working with source files and their elements, such as handling text buffers, binding to element coordinates in the original text, reconciling the model with the current content of the working copy buffer, etc. Implementing these mechanisms is generally quite complex, and Handly can significantly reduce the development effort for language handle-based models by providing quality base implementations.<\/p>\n<p>In addition to the core mechanisms mentioned above, Handly provides infrastructure for text buffers and snapshots, support for integration with source code editors (including built-in integration with the Xtext editor), as well as some common UI components that work with Handly-based models, such as the outline framework. To illustrate its capabilities, the project provides several examples, including the implementation of a Java model on Handly. (Compared to the full implementation of the Java model in JDT, this model is intentionally simplified for clarity.)<\/p>\n<p>As noted earlier, significant attention was paid during the initial design of Handly and continues to be paid to scalability and flexibility. <\/p>\n<p>In principle, handle-based models scale quite well \u201cby design.\u201d For example, the handle\/body idiom allows limiting the amount of memory consumed by the model. However, there are nuances. During scalability testing of Handly, a problem was discovered in the implementation of the notification mechanism \u2013 when a large number of elements changed, constructing deltas took too much time. It turned out that the same issue exists in the Java model of JDT, from which the corresponding code was adapted at one time. We fixed the bug in Handly and prepared a similar patch for JDT, which was gratefully accepted. This is just one example where the adoption of Handly in existing model implementations could potentially be beneficial, as in this case, the issue could have been fixed in just one place.<\/p>\n<p>To make the integration of Handly into existing model implementations technically feasible, the library must possess significant flexibility. The main challenge is to maintain backward compatibility with the model's API. This task was addressed in <noindex><a rel=\"nofollow\" href=\"https:\/\/wiki.eclipse.org\/Handly\/NewIn05\">Handly 0.5<\/a><\/noindex> by clearly separating the model-specific API, defined and fully controlled by the developer, from the unified meta-level API provided by the library. This not only makes it technically possible to integrate Handly into existing implementations but also grants the developer of a new model considerable freedom in designing the API.<\/p>\n<p>Flexibility has other aspects as well. For example, Handly imposes almost no restrictions on the model structure and can be used for both general-purpose language modeling and domain-specific languages. When constructing the source file structure, Handly does not prescribe a specific form for representing the AST and does not even require the existence of an AST, thus ensuring compatibility with virtually any parsing mechanism. Finally, Handly supports full integration with the Eclipse workspace, but it can also operate directly with file systems, thanks to its integration with <noindex><a rel=\"nofollow\" href=\"https:\/\/wiki.eclipse.org\/EFS\">Eclipse File System<\/a><\/noindex> (EFS).<\/p>\n<p>The current version <noindex><a rel=\"nofollow\" href=\"https:\/\/projects.eclipse.org\/projects\/technology.handly\/releases\/0.6\">Handly 0.6<\/a><\/noindex> was released in December 2016. Although the project is currently in incubation and the API has not yet been finalized, Handly is already being used in two major commercial products that have dared to be early adopters, and so far, they do not regret it.<\/p>\n<p>As mentioned earlier, one of these products is 1C:Enterprise Development Tools, where Handly has been used from the outset to model the high-level structure elements of languages like 1C:Enterprise, such as the built-in programming language and query language. The other product is less known to the general public. It is <noindex><a rel=\"nofollow\" href=\"https:\/\/www.codasip.com\/custom-processor\/\">Codasip Studio<\/a><\/noindex>, an integrated design environment for application-specific instruction-set processors (ASIP), used both within the Czech company Codasip and by its clients, including <noindex>AMD<\/noindex>, <noindex><a rel=\"nofollow\" href=\"http:\/\/www.avg.com\/\">AVG<\/a><\/noindex>, <noindex><a rel=\"nofollow\" href=\"http:\/\/www.mobileye.com\/\">Mobileye<\/a><\/noindex>, <noindex><a rel=\"nofollow\" href=\"http:\/\/www.sigmadesigns.com\/\">Sigma Designs<\/a><\/noindex>Codasip has been using Handly in production since 2015, starting from version Handly 0.2. The latest release of Codasip Studio currently uses version 0.5, which was released in June 2016. Ond\u0159ej Il\u010d\u00edk, leading the IDE development at Codasip, is in contact with the project, providing crucial feedback as an \"external adopter.\" He even managed to find some time to directly participate in the project's development by implementing a UI layer (~ 4000 lines of code) for one of the Handly examples, a Java model. More detailed \"first-hand\" information about Handly's use by adopters can be found on the page. <noindex><a rel=\"nofollow\" href=\"https:\/\/wiki.eclipse.org\/Handly\/Adopters\">Success Stories<\/a><\/noindex> the project.<\/p>\n<p>We hope that after the release of version 1.0 with guaranteed API stability and the project's transition out of incubation, Handly will attract new adopters. Meanwhile, the project continues to refine and improve the API, releasing two \"major\" updates each year \u2013 in June (on the same date as the simultaneous release of Eclipse) and December, ensuring a predictable schedule that adopters can rely on. Additionally, the project's bug rate remains consistently low, and Handly has reliably operated in the products of early adopters since its earliest versions. For further exploration of Eclipse Handly, you can use <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/pisv\/gethandly\/wiki\">Getting Started Tutorial<\/a><\/noindex> and <noindex><a rel=\"nofollow\" href=\"http:\/\/www.eclipse.org\/downloads\/download.php?file=\/handly\/docs\/handly-overview.pdf&amp;r=1\">Architectural Overview<\/a><\/noindex>.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/1c\/blog\/323508\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, Eclipse \u0434\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043e\u0431\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u041c\u043d\u043e\u0433\u0438\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 Eclipse \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Eclipse Java development tools (JDT). \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f open-source Java IDE \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e \u0441\u043b\u043e\u0432\u043e\u043c \u201cEclipse\u201d. \u041e\u0434\u043d\u0430\u043a\u043e Eclipse \u2013 \u044d\u0442\u043e \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (Eclipse Platform), \u0438 \u0446\u0435\u043b\u044b\u0439 \u0440\u044f\u0434 IDE, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0435\u0435 \u043e\u0441\u043d\u043e\u0432\u0435, \u0432 \u0442\u043e\u043c [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":24268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-32464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, Eclipse \u0434\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043e\u0431\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/eclipse-kak-tehnologicheskaya-platforma-dlya-1c-enterprise-development-tools\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Eclipse \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f 1C:Enterprise Development Tools | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, Eclipse \u0434\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043e\u0431\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/eclipse-kak-tehnologicheskaya-platforma-dlya-1c-enterprise-development-tools\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:47:12+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:47:12+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Eclipse as a Technology Platform for 1C:Enterprise Development Tools | ProHoster","description":"Eclipse has probably long since proven itself.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/eclipse-kak-tehnologicheskaya-platforma-dlya-1c-enterprise-development-tools","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Eclipse \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f 1C:Enterprise Development Tools | ProHoster","og:description":"\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, Eclipse \u0434\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043e\u0431\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/eclipse-kak-tehnologicheskaya-platforma-dlya-1c-enterprise-development-tools","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:47:12+00:00","article:modified_time":"2019-10-31T18:47:12+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"32464","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 11:00:20","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:58:24","updated":"2026-01-21 11:00:20","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/32464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=32464"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/32464\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/24268"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=32464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=32464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=32464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}