Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMazen Faraj2004-05-12 17:40:53 +0000
committerMazen Faraj2004-05-12 17:40:53 +0000
commit27d2c798f6720ee94ec80827c203e9c97412684b (patch)
treeb6aedf57198b59090f05a8b5a8ea23860c17c7f5
parente64b65252667f3ee622b69fbf3c38ee1b70a92f3 (diff)
downloadeclipse.platform.ua-27d2c798f6720ee94ec80827c203e9c97412684b.tar.gz
eclipse.platform.ua-27d2c798f6720ee94ec80827c203e9c97412684b.tar.xz
eclipse.platform.ua-27d2c798f6720ee94ec80827c203e9c97412684b.zip
SWT update
-rw-r--r--org.eclipse.ui.intro/schema/IntroContent.exsd536
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java44
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java18
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java4
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java (renamed from org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroDiv.java)8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java6
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java6
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/FormsWidgetFactory.java6
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/PageStyleManager.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java28
12 files changed, 610 insertions, 74 deletions
diff --git a/org.eclipse.ui.intro/schema/IntroContent.exsd b/org.eclipse.ui.intro/schema/IntroContent.exsd
new file mode 100644
index 000000000..e62903cc8
--- /dev/null
+++ b/org.eclipse.ui.intro/schema/IntroContent.exsd
@@ -0,0 +1,536 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="test">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="test" id="test" name="test"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="introContent">
+ <complexType>
+ <sequence>
+ <element ref="page" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="group" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="extensionContent" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="page">
+ <complexType>
+ <choice>
+ <element ref="group"/>
+ <element ref="link"/>
+ <element ref="text"/>
+ <element ref="head"/>
+ <element ref="img"/>
+ <element ref="include"/>
+ <element ref="html"/>
+ <element ref="title"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="alt-style" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="url" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="standby-url" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="standby-style" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="standby-alt-style" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style-id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="filteredFrom">
+ <annotation>
+ <documentation>
+ an optional attribute that allows for filtering a given element out of a specific presentation. For example, if a group has filteredFrom = swt, it means that this group will not appear as content in the swt presentation.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="swt">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="group">
+ <complexType>
+ <choice>
+ <element ref="text"/>
+ <element ref="img"/>
+ <element ref="include"/>
+ <element ref="html"/>
+ <element ref="link"/>
+ <element ref="group"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ unique identifier of the division
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style-id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="filteredFrom">
+ <annotation>
+ <documentation>
+ an optional attribute that allows for filtering a given element out of a specific presentation. For example, if a group has filteredFrom = swt, it means that this group will not appear as content in the swt presentation.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="swt">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="link">
+ <complexType>
+ <sequence>
+ <element ref="text" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="url" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style-id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="filteredFrom">
+ <annotation>
+ <documentation>
+ an optional attribute that allows for filtering a given element out of a specific presentation. For example, if a group has filteredFrom = swt, it means that this group will not appear as content in the swt presentation.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="swt">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="html">
+ <annotation>
+ <documentation>
+ direct HTML to include in the page either by embedding the entire document, or inlining a snippet of HTML in-place. A fallback image or text must be defined for alternative rendering.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="img"/>
+ <element ref="text"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ unique identifier of this HTML element
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="src" type="string" use="required">
+ <annotation>
+ <documentation>
+ relative or absolute URL to a file containing HTML
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="type" use="required">
+ <annotation>
+ <documentation>
+ if &apos;inline&apos;, value of &apos;src&apos; will be treated as a snippet of HTML to emit &apos;in-place&apos;. If &apos;embed&apos;, a valid (full) HTML document will be embedded using HTML &apos;OBJECT&apos; tag. (if type is not specified, this html object is ignored by the intro configuration).
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="inline">
+ </enumeration>
+ <enumeration value="embed">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="style-id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="filteredFrom">
+ <annotation>
+ <documentation>
+ an optional attribute that allows for filtering a given element out of a specific presentation. For example, if a group has filteredFrom = swt, it means that this group will not appear as content in the swt presentation.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="swt">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="title">
+ <annotation>
+ <documentation>
+ a snippet of text that can optionally contain escaped HTML tags. It is used as the page Title.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ unique identifier of this title.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style-id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="filteredFrom">
+ <annotation>
+ <documentation>
+ an optional attribute that allows for filtering a given element out of a specific presentation. For example, if a group has filteredFrom = swt, it means that this group will not appear as content in the swt presentation.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="swt">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="text">
+ <annotation>
+ <documentation>
+ a snippet of text that can optionally contain escaped HTML tags.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ unique identifier of this text.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style-id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="filteredFrom">
+ <annotation>
+ <documentation>
+ an optional attribute that allows for filtering a given element out of a specific presentation. For example, if a group has filteredFrom = swt, it means that this group will not appear as content in the swt presentation.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="swt">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="include">
+ <annotation>
+ <documentation>
+ expands an element targeted by the given path, and optional configId attributes. Path should uniquely address an element within the specified configuration. It could point to a div defined at the configuration level, or any element in a page.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="configId" type="string">
+ <annotation>
+ <documentation>
+ identifier of a configuration where the included element is defined. If specified, it is assumed that the element to be included is specified in another configuration, and not the enclosing configuration. In this case, that external config is loaded and the element is resolved from that new config. If not specified, enclosing (parent) configuration of this include is assumed.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="path" type="string" use="required">
+ <annotation>
+ <documentation>
+ the path that uniquely represents the target element within the configuration (e.g. page/div1/div2). It may be a div element, or any element that may be contained in a div. You can not include a page.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="merge-style" type="boolean">
+ <annotation>
+ <documentation>
+ if &lt;code&gt;true&lt;/code&gt;, style belonging to the page that owns the included element will be added to list of styles of the including page. If &lt;code&gt;false&lt;/code&gt; (the default), the including page is responsible for controling properties of the included element.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="head">
+ <annotation>
+ <documentation>
+ direct HTML to include in a page&apos;s HEAD content area. This markup is only to be used with an SWT Based intro part implementation. It is simply ignored in the case of a UI Forms implementation (aka swt). A page can have more than one head element. An implementation can have one and only one head element (since it is a shared head content, it makes sense to just define it in one file).
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="src" type="string" use="required">
+ <annotation>
+ <documentation>
+ relative or absolute URL to a file containing HTML
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="img">
+ <annotation>
+ <documentation>
+ an image that represents presentation content (as opposed to decoration images defined in styles).
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ unique identifier of this image
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="src" type="string" use="required">
+ <annotation>
+ <documentation>
+ the file to load the image from
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="alt" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style-id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="filteredFrom">
+ <annotation>
+ <documentation>
+ an optional attribute that allows for filtering a given element out of a specific presentation. For example, if a group has filteredFrom = swt, it means that this group will not appear as content in the swt presentation.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="swt">
+ </enumeration>
+ <enumeration value="html">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="extensionContent">
+ <annotation>
+ <documentation>
+ The content to be added to the target page or div. Only one extensionContent is allowed in a given configExtension because if this extension could not be resolved (if the config could not be found, or the target element could not be found, for example) then the pages and/or divs in the extension need to be ingnored.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="text"/>
+ <element ref="group"/>
+ <element ref="link"/>
+ <element ref="html"/>
+ <element ref="include"/>
+ </choice>
+ <attribute name="style" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="alt-style" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="path" type="string" use="required">
+ <annotation>
+ <documentation>
+ the path that uniquely represents the element (e.g. page/div1/div2) within the target configuration to be extended. It can only be a page or a div, including shared divs at configuration level.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java
index aefe772c6..f5f00d7e8 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java
@@ -175,9 +175,9 @@ public class IntroHTMLGenerator {
? introPage.getId()
: IIntroHTMLConstants.DIV_ID_PAGE;
HTMLElement pageContentDiv = generateDivElement(pageId, indentLevel + 1);
- if (introPage.getClassId() != null)
+ if (introPage.getStyleId() != null)
pageContentDiv.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS,
- introPage.getClassId());
+ introPage.getStyleId());
// Add any children of the page, in the order they are defined
AbstractIntroElement[] children = introPage.getChildren();
for (int i = 0; i < children.length; i++) {
@@ -211,8 +211,8 @@ public class IntroHTMLGenerator {
if (element == null)
return null;
switch (element.getType()) {
- case AbstractIntroElement.DIV :
- return generateIntroDiv((IntroDiv) element, indentLevel);
+ case AbstractIntroElement.GROUP :
+ return generateIntroDiv((IntroGroup) element, indentLevel);
case AbstractIntroElement.LINK :
return generateIntroLink((IntroLink) element, indentLevel);
case AbstractIntroElement.HTML :
@@ -246,14 +246,14 @@ public class IntroHTMLGenerator {
* printed
* @return a div HTMLElement
*/
- private HTMLElement generateIntroDiv(IntroDiv element, int indentLevel) {
+ private HTMLElement generateIntroDiv(IntroGroup element, int indentLevel) {
// Create the outer div element
HTMLElement divElement = generateDivElement(element.getId(),
indentLevel);
// if a div class was specified, add it
- if (element.getClassId() != null)
+ if (element.getStyleId() != null)
divElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS,
- element.getClassId());
+ element.getStyleId());
// Create the div label, if specified
if (element.getLabel() != null) {
HTMLElement divLabel = generateTextElement(
@@ -311,8 +311,8 @@ public class IntroHTMLGenerator {
}
IntroText linkText = element.getIntroText();
if (linkText != null && linkText.getText() != null) {
- String classId = (linkText.getClassId() != null) ? linkText
- .getClassId() : IIntroHTMLConstants.SPAN_CLASS_TEXT;
+ String classId = (linkText.getStyleId() != null) ? linkText
+ .getStyleId() : IIntroHTMLConstants.SPAN_CLASS_TEXT;
HTMLElement text = generateTextElement(
IIntroHTMLConstants.ELEMENT_PARAGRAPH, linkText.getId(),
classId, element.getText(), indentLevel + 1);
@@ -362,9 +362,9 @@ public class IntroHTMLGenerator {
if (element.getId() != null)
imageElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_ID, element
.getId());
- if (element.getClassId() != null)
+ if (element.getStyleId() != null)
imageElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS,
- element.getClassId());
+ element.getStyleId());
return imageElement;
}
/**
@@ -387,8 +387,8 @@ public class IntroHTMLGenerator {
* @return a paragraph HTMLElement
*/
private HTMLElement generateIntroText(IntroText element, int indentLevel) {
- String spanClass = (element.getClassId() != null) ? element
- .getClassId() : IIntroHTMLConstants.SPAN_CLASS_TEXT;
+ String spanClass = (element.getStyleId() != null) ? element
+ .getStyleId() : IIntroHTMLConstants.SPAN_CLASS_TEXT;
HTMLElement textElement = generateTextElement(
IIntroHTMLConstants.ELEMENT_PARAGRAPH, element.getId(),
spanClass, element.getText(), indentLevel);
@@ -402,7 +402,7 @@ public class IntroHTMLGenerator {
private HTMLElement generateIntroTitle(IntroPageTitle element,
int indentLevel) {
HTMLElement titleElement = generateHeaderDiv(element.getId(), element
- .getClassId(), IIntroHTMLConstants.ELEMENT_H1, element
+ .getStyleId(), IIntroHTMLConstants.ELEMENT_H1, element
.getTitle(), indentLevel);
return titleElement;
}
@@ -432,8 +432,8 @@ public class IntroHTMLGenerator {
StringBuffer content = readFromFile(element.getSrc());
if (content != null && content.length() > 0) {
// Create the outer div element
- String divClass = (element.getClassId() != null) ? element
- .getClassId() : IIntroHTMLConstants.DIV_CLASS_INLINE_HTML;
+ String divClass = (element.getStyleId() != null) ? element
+ .getStyleId() : IIntroHTMLConstants.DIV_CLASS_INLINE_HTML;
HTMLElement divElement = generateDivElement(element.getId(),
divClass, indentLevel);
// add the content of the specified file into the div element
@@ -517,15 +517,15 @@ public class IntroHTMLGenerator {
if (element.getSrc() != null)
objectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_DATA,
element.getSrc());
- if (element.getClassId() != null)
+ if (element.getStyleId() != null)
objectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS,
- element.getClassId());
+ element.getStyleId());
// The alternative content is added in case the browser can not render
// the specified content
IntroText htmlText = element.getIntroText();
if (htmlText != null && htmlText.getText() != null) {
- String textClass = (htmlText.getClassId() != null) ? htmlText
- .getClassId() : IIntroHTMLConstants.SPAN_CLASS_TEXT;
+ String textClass = (htmlText.getStyleId() != null) ? htmlText
+ .getStyleId() : IIntroHTMLConstants.SPAN_CLASS_TEXT;
HTMLElement text = generateTextElement(
IIntroHTMLConstants.ELEMENT_PARAGRAPH, htmlText.getId(),
textClass, element.getText(), indentLevel);
@@ -656,9 +656,9 @@ public class IntroHTMLGenerator {
if (link.getUrl() != null)
anchor.addAttribute(IIntroHTMLConstants.ATTRIBUTE_HREF, link
.getUrl());
- if (link.getClassId() != null)
+ if (link.getStyleId() != null)
anchor.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS, link
- .getClassId());
+ .getStyleId());
else
anchor.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS,
IIntroHTMLConstants.ANCHOR_CLASS_LINK);
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java
index 73ad3927e..854566d7e 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java
@@ -17,7 +17,7 @@ import org.w3c.dom.*;
/**
- * An Intro Config component that has an id attribute and a class-id attribute.
+ * An Intro Config component that has an id attribute and a style-id attribute.
* It also has the notion of filtering. Only model elements that have meaning in
* the UI, and that are targettable can be filtered. HEAD, for example, only
* applied to HTML presentation, and so, it does not need filtering. When model
@@ -30,22 +30,22 @@ import org.w3c.dom.*;
*/
public abstract class AbstractBaseIntroElement extends AbstractIntroIdElement {
- private static final String ATT_CLASS_ID = "class-id"; //$NON-NLS-1$
+ private static final String ATT_STYLE_ID = "style-id"; //$NON-NLS-1$
private static final String ATT_FIlTERED_FROM = "filteredFrom";
- protected String class_id;
+ protected String style_id;
protected String filteredFrom;
private boolean isFiltered;
AbstractBaseIntroElement(IConfigurationElement element) {
super(element);
- class_id = element.getAttribute(ATT_CLASS_ID);
+ style_id = element.getAttribute(ATT_STYLE_ID);
filteredFrom = element.getAttribute(ATT_FIlTERED_FROM);
}
AbstractBaseIntroElement(Element element, Bundle bundle) {
super(element, bundle);
- class_id = getAttribute(element, ATT_CLASS_ID);
+ style_id = getAttribute(element, ATT_STYLE_ID);
filteredFrom = getAttribute(element, ATT_FIlTERED_FROM);
}
@@ -55,8 +55,8 @@ public abstract class AbstractBaseIntroElement extends AbstractIntroIdElement {
*/
private boolean checkFilterState() {
if (this.isOfType(AbstractIntroElement.MODEL_ROOT))
- // root element is not filtered.
- return false;
+ // root element is not filtered.
+ return false;
IntroModelRoot root = (IntroModelRoot) getParentPage().getParent();
return root.getPresentation().getImplementationKind().equals(
filteredFrom) ? true : false;
@@ -66,8 +66,8 @@ public abstract class AbstractBaseIntroElement extends AbstractIntroIdElement {
/**
* @return Returns the class id.
*/
- public String getClassId() {
- return class_id;
+ public String getStyleId() {
+ return style_id;
}
/**
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
index fe00f733d..29c131811 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
@@ -127,8 +127,8 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
Object[] src = null;
switch (elementMask) {
// homogenous vector.
- case AbstractIntroElement.DIV:
- src = new IntroDiv[size];
+ case AbstractIntroElement.GROUP:
+ src = new IntroGroup[size];
break;
case AbstractIntroElement.LINK:
src = new IntroLink[size];
@@ -225,8 +225,8 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
Bundle bundle) {
AbstractIntroElement child = null;
- if (childElement.getNodeName().equalsIgnoreCase(IntroDiv.TAG_DIV))
- child = new IntroDiv(childElement, bundle);
+ if (childElement.getNodeName().equalsIgnoreCase(IntroGroup.TAG_GROUP))
+ child = new IntroGroup(childElement, bundle);
else if (childElement.getNodeName()
.equalsIgnoreCase(IntroLink.TAG_LINK))
child = new IntroLink(childElement, bundle);
@@ -271,7 +271,7 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
if (target == null)
// target could not be found.
return;
- if (target.isOfType(AbstractIntroElement.DIV
+ if (target.isOfType(AbstractIntroElement.GROUP
| AbstractIntroElement.ABSTRACT_TEXT
| AbstractIntroElement.IMAGE | AbstractIntroElement.TEXT))
insertTarget(include, target);
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java
index af40b7e90..fbcec3ee0 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java
@@ -59,12 +59,12 @@ public abstract class AbstractIntroElement {
/**
* Type constant which identifies an IntroDiv element.
*/
- public static final int DIV = 1 << 4;
+ public static final int GROUP = 1 << 4;
/**
* Type constant which identifies the AbstractIntroContainer element.
*/
- public static final int ABSTRACT_CONTAINER = ABSTRACT_PAGE | DIV
+ public static final int ABSTRACT_CONTAINER = ABSTRACT_PAGE | GROUP
| MODEL_ROOT;
/**
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroDiv.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java
index bb959a4e7..916d0d8b2 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroDiv.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java
@@ -17,9 +17,9 @@ import org.w3c.dom.*;
/**
* An intro div.
*/
-public class IntroDiv extends AbstractIntroContainer {
+public class IntroGroup extends AbstractIntroContainer {
- protected static final String TAG_DIV = "div"; //$NON-NLS-1$
+ protected static final String TAG_GROUP = "group"; //$NON-NLS-1$
private static final String ATT_LABEL = "label"; //$NON-NLS-1$
private String label;
@@ -27,7 +27,7 @@ public class IntroDiv extends AbstractIntroContainer {
/**
* @param element
*/
- IntroDiv(Element element, Bundle bundle) {
+ IntroGroup(Element element, Bundle bundle) {
super(element, bundle);
label = getAttribute(element, ATT_LABEL);
}
@@ -45,7 +45,7 @@ public class IntroDiv extends AbstractIntroContainer {
* @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
*/
public int getType() {
- return AbstractIntroElement.DIV;
+ return AbstractIntroElement.GROUP;
}
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java
index 68754ba86..754c09555 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java
@@ -116,7 +116,7 @@ public class IntroHomePage extends AbstractIntroPage {
// root page does not have any links, append all links off non-filtered
// divs.
- IntroDiv[] rootPageDivs = (IntroDiv[]) getChildrenOfType(AbstractIntroElement.DIV);
+ IntroGroup[] rootPageDivs = (IntroGroup[]) getChildrenOfType(AbstractIntroElement.GROUP);
Vector linkVector = new Vector();
for (int i = 0; i < rootPageDivs.length; i++)
@@ -128,16 +128,16 @@ public class IntroHomePage extends AbstractIntroPage {
return links;
}
- private void addLinks(IntroDiv div, Vector linksVector) {
+ private void addLinks(IntroGroup div, Vector linksVector) {
linksVector.addAll(Arrays.asList(getLinks(div)));
- IntroDiv[] divs = (IntroDiv[]) div
- .getChildrenOfType(AbstractIntroElement.DIV);
+ IntroGroup[] divs = (IntroGroup[]) div
+ .getChildrenOfType(AbstractIntroElement.GROUP);
for (int i = 0; i < divs.length; i++)
addLinks(divs[i], linksVector);
}
- public IntroLink[] getLinks(IntroDiv div) {
+ public IntroLink[] getLinks(IntroGroup div) {
return (IntroLink[]) div.getChildrenOfType(AbstractIntroElement.LINK);
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java
index 06231d5bc..5ba026b98 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java
@@ -190,9 +190,9 @@ public class IntroModelRoot extends AbstractIntroContainer {
*/
private void loadSharedDivs(Document dom, Bundle bundle) {
Element[] divs = ModelLoaderUtil.getElementsByTagName(dom,
- IntroDiv.TAG_DIV);
+ IntroGroup.TAG_GROUP);
for (int i = 0; i < divs.length; i++) {
- IntroDiv div = new IntroDiv(divs[i], bundle);
+ IntroGroup div = new IntroGroup(divs[i], bundle);
div.setParent(this);
children.add(div);
}
@@ -307,7 +307,7 @@ public class IntroModelRoot extends AbstractIntroContainer {
IntroExtensionContent extension,
AbstractIntroElement targetContainer) {
- if (targetContainer.getType() == AbstractIntroElement.DIV
+ if (targetContainer.getType() == AbstractIntroElement.GROUP
&& targetContainer.getParent().getType() == AbstractIntroElement.MODEL_ROOT)
// if we are extending a shared div, defined under a config, we
// can not include styles.
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java
index ab9487156..a0cb6e752 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java
@@ -39,7 +39,7 @@ public class IntroModelLabelProvider extends LabelProvider {
int elementType = introElement.getType();
switch (elementType) {
- case AbstractIntroElement.DIV:
+ case AbstractIntroElement.GROUP:
case AbstractIntroElement.PAGE:
case AbstractIntroElement.HOME_PAGE:
image = ImageUtil.getImage(ImageUtil.INTRO_MODEL_CONTAINER);
@@ -63,8 +63,8 @@ public class IntroModelLabelProvider extends LabelProvider {
int elementType = introElement.getType();
switch (elementType) {
- case AbstractIntroElement.DIV:
- label = "DIV: " + ((IntroDiv) introElement).getLabel(); //$NON-NLS-1$
+ case AbstractIntroElement.GROUP:
+ label = "DIV: " + ((IntroGroup) introElement).getLabel(); //$NON-NLS-1$
break;
case AbstractIntroElement.LINK:
label = "DEFAULT_LINK: " + ((IntroLink) introElement).getLabel(); //$NON-NLS-1$
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/FormsWidgetFactory.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/FormsWidgetFactory.java
index 2565a55b2..cc4d41cf6 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/FormsWidgetFactory.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/FormsWidgetFactory.java
@@ -87,8 +87,8 @@ public class FormsWidgetFactory {
return;
switch (element.getType()) {
- case AbstractIntroElement.DIV:
- IntroDiv group = (IntroDiv) element;
+ case AbstractIntroElement.GROUP:
+ IntroGroup group = (IntroGroup) element;
Control c = createGroup(parent, group);
updateLayoutData(c, element);
// c must be a composite.
@@ -143,7 +143,7 @@ public class FormsWidgetFactory {
c.setLayoutData(td);
}
- private Composite createGroup(Composite parent, IntroDiv group) {
+ private Composite createGroup(Composite parent, IntroGroup group) {
String label = group.getLabel();
String description = styleManager.getDescription(group);
int numColumns = styleManager.getNumberOfColumns(group);
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/PageStyleManager.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/PageStyleManager.java
index dc26982c8..068583c1b 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/PageStyleManager.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/PageStyleManager.java
@@ -113,7 +113,7 @@ public class PageStyleManager extends SharedStyleManager {
}
- public int getNumberOfColumns(IntroDiv group) {
+ public int getNumberOfColumns(IntroGroup group) {
StringBuffer buff = createPathKey(group);
if (buff == null)
return 1;
@@ -170,7 +170,7 @@ public class PageStyleManager extends SharedStyleManager {
* @param group
* @return
*/
- public String getDescription(IntroDiv group) {
+ public String getDescription(IntroGroup group) {
StringBuffer buff = createPathKey(group);
if (buff == null)
return null;
@@ -260,10 +260,10 @@ public class PageStyleManager extends SharedStyleManager {
IntroText[] allText = (IntroText[]) parent
.getChildrenOfType(AbstractIntroElement.TEXT);
for (int i = 0; i < allText.length; i++) {
- if (allText[i].getClassId() == null)
+ if (allText[i].getStyleId() == null)
// not all elements have style id.
continue;
- if (allText[i].getClassId().equals(styleId)) {
+ if (allText[i].getStyleId().equals(styleId)) {
makeFiltered(allText[i]);
return allText[i].getText();
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java
index a98bed706..c001373b0 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java
@@ -57,7 +57,7 @@ public class IntroModelSerializer {
text.append("\nNumber of pages (not including Root Page) = " //$NON-NLS-1$
+ model.getPages().length);
text.append("\nNumber of shared divs = " //$NON-NLS-1$
- + model.getChildrenOfType(AbstractIntroElement.DIV).length);
+ + model.getChildrenOfType(AbstractIntroElement.GROUP).length);
text
.append("\nNumber of unresolved extensions = " //$NON-NLS-1$
+ model
@@ -81,7 +81,7 @@ public class IntroModelSerializer {
text.append("\n\tstandby alt-style = " + rootPage.getStandbyAltStyle()); //$NON-NLS-1$
text.append("\n\turl = " + rootPage.getUrl()); //$NON-NLS-1$
text.append("\n\tstandby-url = " + rootPage.getStandbyUrl()); //$NON-NLS-1$
- text.append("\n\tclass-id = " + rootPage.getClassId()); //$NON-NLS-1$
+ text.append("\n\tstyle-id = " + rootPage.getStyleId()); //$NON-NLS-1$
printPageStyles(rootPage, text);
}
@@ -121,8 +121,8 @@ public class IntroModelSerializer {
case AbstractIntroElement.ELEMENT:
text.append("SHOULD NEVER BE HERE"); //$NON-NLS-1$
break;
- case AbstractIntroElement.DIV:
- printDiv(text, (IntroDiv) children[i], indent);
+ case AbstractIntroElement.GROUP:
+ printDiv(text, (IntroGroup) children[i], indent);
break;
case AbstractIntroElement.LINK:
printLink(text, (IntroLink) children[i], indent);
@@ -151,12 +151,12 @@ public class IntroModelSerializer {
}
}
- private void printDiv(StringBuffer text, IntroDiv div, String indent) {
+ private void printDiv(StringBuffer text, IntroGroup div, String indent) {
text.append(indent + "DIV: id = " + div.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "label = " + div.getLabel()); //$NON-NLS-1$
text.append(indent + "children = " + div.getChildren().length); //$NON-NLS-1$
- text.append(indent + "class-id = " + div.getClassId()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + div.getStyleId()); //$NON-NLS-1$
printContainerChildren(div, text, indent + "\t\t"); //$NON-NLS-1$
}
@@ -165,14 +165,14 @@ public class IntroModelSerializer {
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "label = " + link.getLabel()); //$NON-NLS-1$
text.append(indent + "text = " + link.getText()); //$NON-NLS-1$
- text.append(indent + "class-id = " + link.getClassId()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + link.getStyleId()); //$NON-NLS-1$
}
private void printText(StringBuffer text, IntroText introText, String indent) {
text.append(indent + "TEXT: id = " + introText.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "text = " + introText.getText()); //$NON-NLS-1$
- text.append(indent + "class-id = " + introText.getClassId()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + introText.getStyleId()); //$NON-NLS-1$
}
private void printImage(StringBuffer text, IntroImage image, String indent) {
@@ -180,7 +180,7 @@ public class IntroModelSerializer {
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "src = " + image.getSrc()); //$NON-NLS-1$
text.append(indent + "alt = " + image.getAlt()); //$NON-NLS-1$
- text.append(indent + "class-id = " + image.getClassId()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + image.getStyleId()); //$NON-NLS-1$
}
private void printHtml(StringBuffer text, IntroHTML html, String indent) {
@@ -188,7 +188,7 @@ public class IntroModelSerializer {
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "src = " + html.getSrc()); //$NON-NLS-1$
text.append(indent + "isInlined = " + html.isInlined()); //$NON-NLS-1$
- text.append(indent + "class-id = " + html.getClassId()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + html.getStyleId()); //$NON-NLS-1$
if (html.getIntroImage() != null)
printImage(text, html.getIntroImage(), indent + "\t\t"); //$NON-NLS-1$
if (html.getIntroText() != null)
@@ -213,7 +213,7 @@ public class IntroModelSerializer {
text.append(indent + "TITLE: id = " + title.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "title = " + title.getTitle()); //$NON-NLS-1$
- text.append(indent + "class-id = " + title.getClassId()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + title.getStyleId()); //$NON-NLS-1$
}
/**
@@ -228,7 +228,7 @@ public class IntroModelSerializer {
text.append("\n\ttitle = " + pages[i].getTitle()); //$NON-NLS-1$
text.append("\n\tstyle = " + pages[i].getStyle()); //$NON-NLS-1$
text.append("\n\talt-style = " + pages[i].getAltStyle()); //$NON-NLS-1$
- text.append("\n\tclass-id = " + pages[i].getClassId()); //$NON-NLS-1$
+ text.append("\n\tstyle-id = " + pages[i].getStyleId()); //$NON-NLS-1$
printPageStyles(pages[i], text);
printPageChildren(pages[i], text);
}
@@ -244,7 +244,7 @@ public class IntroModelSerializer {
IntroPage firstPage = model.getPages()[0];
text.append("\n\t\tFirst page children are: "); //$NON-NLS-1$
text.append("\n\t\t\tDivs: " //$NON-NLS-1$
- + firstPage.getChildrenOfType(AbstractIntroElement.DIV).length);
+ + firstPage.getChildrenOfType(AbstractIntroElement.GROUP).length);
text
.append("\n\t\t\tLinks: " //$NON-NLS-1$
+ firstPage
@@ -291,7 +291,7 @@ public class IntroModelSerializer {
.getChildrenOfType(AbstractIntroElement.ABSTRACT_TEXT).length);
AbstractIntroElement[] linksAndDivs = (AbstractIntroElement[]) firstPage
- .getChildrenOfType(AbstractIntroElement.DIV
+ .getChildrenOfType(AbstractIntroElement.GROUP
| AbstractIntroElement.LINK);
text.append("\n\t\t\tDivs and Links: " + linksAndDivs.length); //$NON-NLS-1$
}

Back to the top