|
What this is
Other links
The source code<?xml version="1.0" encoding="UTF-8"?> <cheatsheet title="Define the Extension Point Schema"> <intro> <description> This tutorial will demonstrate how to define and preview an extension point schema. </description> </intro> <item title="Open the schema file" dialog="true" skip="true"> <description> Double-click on the "schema/htmlBrowsers.exsd" file to open it. </description> <command serialization="org.eclipse.ui.navigate.openResource(filePath=org.eclipse.browser/schema/htmlBrowsers.exsd)" confirm="false"> </command> </item> <item title="Add the "browser" element" dialog="true" skip="false"> <description> On the "Definition" page of the schema editor, press "New Element" in the "Extension Point Elements" section. </description> <subitem label="In the "Element Details" section, replace the content of the "Name" field with "browser"." skip="false"> </subitem> <subitem label="Select the "extension" element and choose "New > Compositor > Sequence" from its context menu." skip="false"> </subitem> <subitem label="From the context menu of the "Sequence" node, choose "New > Reference > browser"." skip="false"> </subitem> <subitem label="Make sure the 'browser' element reference is selected." skip="false"> </subitem> <subitem label="In the "Element Reference Details" section of 'browser', set the "Max Occurrences" to "unbounded"" skip="false"> </subitem> </item> <item title="Add the "id" attribute" dialog="true" skip="false"> <description> In the "Extension Point Elements" section, make sure the "browser" element is selected, and press "New Attribute". </description> <subitem label="In the "Attribute Details" section, replace the content of the "Name" field with "id"." skip="false"> </subitem> <subitem label="In the "Attribute Details" section, change the value of "Use" from "optional" to "required"." skip="false"> </subitem> <subitem label="In the "Description" section, input "a unique identifier for the browser."" skip="false"> </subitem> </item> <item title="Add the "name" attribute" dialog="true" skip="false"> <description> In the "Extension Point Elements" section, make sure the "browser" element is selected, and press "New Attribute". </description> <subitem label="In the "Attribute Details" section, replace the content of the "Name" field with "name"." skip="false"> </subitem> <subitem label="In the "Attribute Details" section, change the value of "Use" from "optional" to "required"." skip="false"> </subitem> <subitem label="In the "Attribute Details" section, change the value of "Translatable" from "false" to "true"." skip="false"> </subitem> <subitem label="In the "Description" section, input "a human-readable name for the browser"." skip="false"> </subitem> </item> <item title="Add the "class" attribute" dialog="true" skip="false"> <description> In the "Extension Point Elements" section, make sure the "browser" element is selected, and press "New Attribute". </description> <subitem label="In the "Attribute Details" section, replace the content of the "Name" field with "class"." skip="false"> </subitem> <subitem label="In the "Attribute Details" section, change the value of "Use" from "optional" to "required"." skip="false"> </subitem> <subitem label="In the "Attribute Details" section, change the value of "Type" from "string" to "java"." skip="false"> </subitem> <subitem label="In the "Attribute Details" section, set the value of the "Implements" field to "org.eclipse.browser.view.ui.actions.IHTMLBrowser"." skip="false"> </subitem> <subitem label="In the "Description" section, input (without the quotes): "This class is invoked to open a given URL. The class must implement <code>org.eclipse.browser.view.ui.actions.IHTMLBrowser</code>."" skip="false"> </subitem> </item> <item title="Add documentation" dialog="true" skip="false"> <description> Select the <b>Overview page of the schema editor and perform the following steps in the Documentation section: </description> <subitem label="Replace the content of the "Description" tab with: "This extension point is used to register different types of browsers that can be used to open the HTML documents in the Eclipse Browser view."" skip="false"> </subitem> <subitem label="Replace the content of the "Since" tab with: "1.0"" skip="false"> </subitem> <subitem label="Replace the content of the "Examples" section with: "<p> The following is an example of the extension point: <pre> <extension point="org.eclipse.browser.htmlBrowsers"> <browser id="org.eclipse.browser.builtin" name="Internal Browser" class="org.eclipse.browser.view.ui.actions.InternalBrowser"/> </extension> </pre> </p> "" skip="false"> </subitem> <subitem label="Replace the content of the "API Information" section with: "Each browser must provide a class that implements the <code>org.eclipse.browser.view.ui.actions.IHTMLBrowser</code> interface."" skip="false"> </subitem> <subitem label="Replace the content of the "Supplied Documentation" section with "The default implementation is to open the HTML documents with the internal browser."." skip="false"> </subitem> </item> <item title="Save the Schema" dialog="true" skip="false"> <description> Select "File > Save" from the main menu to save the schema. </description> </item> <item title="Preview the schema" dialog="true" skip="false"> <description> Right-click anywhere inside the schema editor and choose "Preview Reference Document" from the context menu. This will open transform the schema into an HTML document and open it into an internal browser. </description> </item> </cheatsheet> |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.