Home > Store

Eclipse Modeling Framework

Register your product to gain access to bonus material or receive a coupon.

Eclipse Modeling Framework

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2004
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-142542-0
  • ISBN-13: 978-0-13-142542-2

A new edition of this title is available, ISBN-10: 0321331885 ISBN-13: 9780321331885

Downloads

Downloads

To aid in your work with Eclipse Modeling Framework: A Developer's Guide, we are making available all the example code and models appearing in the book. You can import the code and models into a project in your Eclipse workspace for easy access.

Once you have downloaded and decompressed the code archive, please see the file examples/readme.txt for information on generating and running the examples. This file, as well as the readme files in the subfolders, provide the necessary information for working with the code and models.

Download the archive (ZIP, 136 kb).

Sample Content

Downloadable Sample Chapter

Download the Sample Chapter related to this title.

Table of Contents



Foreword by Sridhar Iyengar.


Foreword by Dr. Lee R. Nackman.


Preface.


References.

I. EMF OVERVIEW.

1. Eclipse.

The Projects. The Eclipse Platform. More Information.

2. Introducing EMF.

Unifying Java, XML, and UML. Modeling vs Programming. Defining the Model. Generating Code. The EMF Framework. EMF and Modeling Standards.

3. Model Editing with EMF.Edit.

Displaying and Editing EMF Models. Item Providers. Command Framework. Generating EMF.Edit Code.

4. Using EMF—A Simple Overview.

Example Model: The Primer Purchase Order. Creating EMF Models and Projects. Generating Code. Running the Application. Continuing Development.

II. DEFINING EMF MODELS.

5. Ecore Modeling Concepts.

Core Model Uses. The Ecore Kernel. Structural Features. Behavioral Features. Classifiers. Packages and Factories. Annotations. Modeled Data Types.

6. Java Source Code.

Java Specification for Packages. Java Specification for Classes. Java Specification for Enumerations. Java Specification for Data Types. Java Specification for Maps.

7. XML Schema.

Schema Definition of Packages. Schema Definition of Classes. Schema Definition of Attributes. Schema Definition of References. Schema Simple Types.

8. UML.

UML Packages. UML Specification for Classifiers. UML Specification for Attributes. UML Specification for References. UML Specification for Operations.

III. USING THE EMF GENERATOR.

9. EMF Generator Patterns.

Modeled Classes. Attributes. References. Operations. Class Inheritance. Reflective Methods. Factories and Packages. Switch Classes and Adapter Factories. Customizing Generated Classes.

10. EMF.Edit Generator Patterns.

Item Providers. Item Provider Adapter Factories. Editor. Action Bar Contributor. Wizard. Plug-Ins.

11. Running the Generators.

EMF Code Generation. The Generator GUI. The Command-Line Generator Tools. The Template Format.

12. Example—Implementing a Model and Editor.

Getting Started. Generating the Model. Implementing Volatile Features. Implementing Data Types. Running the ExtendedPO2 Editor. Restricting Reference Targets. Splitting the Model into Multiple Packages. Editing Multiple Resources Concurrently.

IV. PROGRAMMING WITH EMF.

13. EMF Client Programming.

Packages and Factories. The EMF Persistence API. EMF Resource Implementations. Adapters. Working with EMF Objects. Dynamic EMF.

14. EMF.Edit Programming.

Overriding Commands. Customizing Views.

V. EMF API.

15. The org.eclipse.emf.common Plug-In.

The org.eclipse.emf.common Package. The org.eclipse.emf.common.command Package. The org.eclipse.emf.common.notify Package. The org.eclipse.emf.common.util Package.

16. The org.eclipse.emf.common.ui Plug-In.

The org.eclipse.emf.common.ui Package. The org.eclipse.emf.common.ui.celleditor Package. The org.eclipse.emf.common.ui.viewer Package.

17. The org.eclipse.emf.ecore Plug-In.

The org.eclipse.emf.ecore Package. The org.eclipse.emf.ecore.plugin Package. The org.eclipse.emf.ecore.resource Package. The org.eclipse.emf.ecore.util Package.

18. The org.eclipse.emf.ecore.xmi Plug-In.

The org.eclipse.emf.ecore.xmi Package.

VI. EMF.EDIT API.

19. The org.eclipse.emf.edit Plug-In.

The org.eclipse.emf.edit Package. The org.eclipse.emf.edit.command Package. The org.eclipse.emf.edit.domain Package. The org.eclipse.emf.edit.provider Package. The org.eclipse.emf.edit.provider.resource Package. The org.eclipse.emf.edit.tree Package. The org.eclipse.emf.edit.tree.provider Package. The org.eclipse.emf.edit.tree.util Package.

20. The org.eclipse.emf.edit.ui Plug-In.

The org.eclipse.emf.edit.ui Package. The org.eclipse.emf.edit.ui.action Package. The org.eclipse.emf.edit.ui.celleditor Package. The org.eclipse.emf.edit.ui.dnd Package. The org.eclipse.emf.edit.ui.provider Package.

Appendix A: UML Notation.

Classes and Interfaces. Enumerations and Data Types. Class Relationships.

Appendix B: Summary of Example Models.

SimplePO. PrimerPO. ExtendedPO1. ExtendedPO2. ExtendedPO3.

Index.

Index

Download the Index file related to this title.

Updates

Errata

Typographic Errors

  • Page 52. In paragraph 3, "EMF.Edit Commands" should be "EMF.Edit commands".
  • Page 348. In paragraph 3, xsi.schemaLocation should be xsi:schemaLocation.
  • Page 361. The line of text following the first code fragment should be regular font.

EMF Design Changes

Because we strived to produce a book covering the most current release of EMF, we needed to write it concurrently with the ongoing design and development of EMF version 1.1. Although we tried our best to reflect every recent design change, we inevitably missed a few. The ones we know about are listed below.

  • Page 25. The EMF generator has been changed to allow greater control over how it merges extends and implements clauses, by recognizing an @extends Javadoc tag, which is described in Section 9.9. In the last paragraph, "and they will be" should be replaced by "and specify that they should be", to reflect this change. Also, "would be overwritten" should be replaced by "will always be overwritten".
  • Page 82. A late change in the EMF framework has eliminated the automatic creation of packages for data types that do not have corresponding types in Ecore. Therefore, in version 1.1 of EMF, the New Project wizard does not include the schema package as shown in Figure 4.16, and simply uses EString instead of the manufactured Date and Decimal data types described in the example (see also p. 140 erratum).
  • Page 140. In EMF version 1.1, all simple types that do not derive from any type in Table 7.1 do not map to a manufactured EDataType as described in the last paragraph, but instead map simply to the built-in Ecore type EString. In future releases, EMF will fully support data types created from schema simple types.
  • Page 212. The newly added @extends tag may be used on classes, as well as interfaces. Thus, the last paragraph should read as follows: "The user section of the Javadoc comment associated with an interface or class may also contain a special control directive used during merging: the @extends tag, followed by a comma-separated list of interfaces. The generated interface's extends clause (or class' implements clause) will be merged with this list. This allows you to add non-generated super-interfaces, without removing the @generated tag."
  • Page 238. When support for different character encodings was added to EMF, the generator pattern for the wizard class was affected. In the first code fragment, the last line shown of performFinish() should be replaced by the following:
      Map options = new HashMap();
      options.put(XMLResource.OPTION_ENCODING,
                  initialObjectCreationPage.getEncoding());
      resource.save(options);
    

    This uses the OPTION_ENCODING option (see p. 319) to set the character encoding for the persistent form that is created, as set by the user on the last page of the wizard.

  • Page 288. The code fragment is based on the wizard generator pattern that did not set the character encoding (see p. 238 erratum). The last line shown should be replaced by the following:
      Map options = new HashMap();
      options.put(XMLResource.OPTION_ENCODING,
                  initialObjectCreationPage.getEncoding());
      resource.save(options);
    

    In this example, we remove the last page from the wizard, which would make the generated call to initialObjectCreationPage.getEncoding() fail. So, we simply remove that, too, and the default encoding is used.

  • Page 363. The example in Section 14.2.1 assumes, again, that the wizard generator pattern does not set the character encoding (see p. 238 erratum). Since the last page of the wizard is removed, again we need to remove the line of code from performFinish() that attempts to set the encoding option based on it.
  • Page 366. In addition to adding interface ITableItemLabelProvider to the implements clause of PurchaseOrderItemProvider, we should also add an @extends tag to the Javadoc for the class, as follows:
      /**
       * This is the item provider adpater for a
       * {@link com.example.epo1.PurchaseOrder} object.
       * <!-- begin-user-doc -->
       * @extends ITableItemLabelProvider
       * <!-- end-user-doc -->
       * @generated
       */
      public class PurchaseOrderItemProvider
    

    This ensures that the change will be retained during regeneration (see p. 212 erratum).

  • Page 369. Section 14.2.2 should point out that, by default, the generated PurchaseOrderItemProvider class disables change notification for non-containment references. Because the customer reference in class PurchaseOrder is such a reference but is now displayed in our table viewer, we need to enable notification for it. We do this by simply setting the "Notify" property in the generator model (see p. 254) to true for the customer reference, before generating the model.
  • Page 375. Section 14.2.3 should describe one additional change that is required in SupplierItemProvider. Its notifyChanged() method should be modified as follows:
      /**
       * @generated NOT
       */
      public void notifyChanged(Notification notification)
      {
        switch (notification.getFeatureID(Supplier.class))
        {
          case EPO1Package.SUPPLIER__NAME:
          case EPO1Package.SUPPLIER__CUSTOMERS:
          case EPO1Package.SUPPLIER__ORDERS:
          {
            fireNotifyChanged(notification);
            return;
          }
        }
        super.notifyChanged(notification);
      }
    

    That is, it should not fire notifications for the orders or customers features, which now affect the "Customers" and "Orders" nodes, rather than the supplier, itself. The two new item providers already fire these notifications, substituting themselves for the actual notifier (see p. 372). Without the above change to SupplierItemProvider, the viewer would see the same notifications both from the appropriate non-modeled node and from the supplier.

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020