Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMazen Faraj2005-05-06 20:09:16 +0000
committerMazen Faraj2005-05-06 20:09:16 +0000
commit37f50728823eb269c9b6c1b6ee5043d564584264 (patch)
tree83f3e27af7823c1b72daac1f2b3a9bc971538db6 /org.eclipse.ui.intro
parent5aff4dba5739d4b17c9a9868c067c03c18a53ac1 (diff)
downloadeclipse.platform.ua-37f50728823eb269c9b6c1b6ee5043d564584264.tar.gz
eclipse.platform.ua-37f50728823eb269c9b6c1b6ee5043d564584264.tar.xz
eclipse.platform.ua-37f50728823eb269c9b6c1b6ee5043d564584264.zip
Embedding Help Topic support
Diffstat (limited to 'org.eclipse.ui.intro')
-rw-r--r--org.eclipse.ui.intro/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.intro/schema/IntroContent.exsd11
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IIntroHTMLConstants.java3
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java441
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java41
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java14
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java80
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java1
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java1
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java1
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java1
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java1
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java1
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java44
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java3
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarElement.java4
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarShortcutElement.java4
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/ModelLoaderUtil.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java (renamed from org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURL.java)68
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURLParser.java (renamed from org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLParser.java)7
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/ShowHelpActionHandler.java130
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/BundleUtil.java (renamed from org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/BundleUtil.java)4
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/ModelUtil.java (renamed from org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/ModelUtil.java)11
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java4
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Log.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroURLFactory.java4
34 files changed, 772 insertions, 135 deletions
diff --git a/org.eclipse.ui.intro/META-INF/MANIFEST.MF b/org.eclipse.ui.intro/META-INF/MANIFEST.MF
index c6132ada3..f19404ad8 100644
--- a/org.eclipse.ui.intro/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.intro/META-INF/MANIFEST.MF
@@ -11,6 +11,8 @@ Export-Package: org.eclipse.ui.intro.config,
org.eclipse.ui.internal.intro.impl.html;x-internal:=true,
org.eclipse.ui.internal.intro.impl.model;x-internal:=true,
org.eclipse.ui.internal.intro.impl.model.loader;x-internal:=true,
+ org.eclipse.ui.internal.intro.impl.model.url;x-internal:=true,
+ org.eclipse.ui.internal.intro.impl.model.util;x-internal:=true,
org.eclipse.ui.internal.intro.impl.model.viewer;x-internal:=true,
org.eclipse.ui.internal.intro.impl.parts;x-internal:=true,
org.eclipse.ui.internal.intro.impl.presentations;x-internal:=true,
diff --git a/org.eclipse.ui.intro/schema/IntroContent.exsd b/org.eclipse.ui.intro/schema/IntroContent.exsd
index fcafd89be..f8ef922b5 100644
--- a/org.eclipse.ui.intro/schema/IntroContent.exsd
+++ b/org.eclipse.ui.intro/schema/IntroContent.exsd
@@ -280,9 +280,14 @@ no parameters required<br>
<i>direction = ("backward" | "forward" | "home")</i> - specifies the direction to navigate<br>
<br>
-<b>openBrowser</b> - open the url in an external browser<br>
+<b>openBrowser</b> - open the url in an external browser, using the workbench Browser support.<br>
<i>url</i> - a valid URL to an external web site or a static HTML file<br>
-<i>pluginId (optional)</i> - only required if a static HTML file is specified. This is the id of the plug-in containing the file.<br>
+<i>pluginId (optional)</i> - only required if the url is a relative to a static HTML file is specified. This is the id of the plug-in containing the file.<br>
+<br>
+
+<b>openURL</b> - open the url embedded in the current welcome page. The page pointed to by the url occupies the full size of the intro page.<br>
+<i>url</i> - a valid URL to an external web site or a static HTML file<br>
+<i>pluginId (optional)</i> - only required if the url is a relative to a static HTML file is specified. This is the id of the plug-in containing the file.<br>
<br>
<b>runAction</b> - runs the specified action<br>
@@ -303,6 +308,8 @@ no parameters required<br>
<b>showHelpTopic</b> - Open a help topic.<br>
<i>id</i> - the URL of the help resource. (See Javadoc for <code>org.eclipse.ui.help.WorkbenchHelp.displayHelpResource</code><br>
+<i>embed</i> - if true, indicates that the Help topic needs to be displayed embedded in the current page. This is equivalent to openURL() command, but for Help System topics. The embedded URL occupies the full real-estate of the current page.<br>
+<i>embedTarget</i> - if specified, then <i>embed</i> is true by default and the embedded URL is inserted inside the div with the specified path. The path is relative to the page and so it should not start with the page id. The children of the div are replaced by the content of the URL. Only one div per page can be used as an embed target.<br>
<br>
<b>showMessage</b> - Displays a message to the user using a standard information dialog.<br>
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IIntroHTMLConstants.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IIntroHTMLConstants.java
index 2c03f25bf..5331479bd 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IIntroHTMLConstants.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IIntroHTMLConstants.java
@@ -42,6 +42,7 @@ public interface IIntroHTMLConstants {
String ELEMENT_H4 = "H4"; //$NON-NLS-1$
String ELEMENT_PARAGRAPH = "P"; //$NON-NLS-1$
String ELEMENT_STYLE = "STYLE"; //$NON-NLS-1$
+ String ELEMENT_IFrame = "iFrame"; //$NON-NLS-1$
/* HTML attribute names */
String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
@@ -53,6 +54,8 @@ public interface IIntroHTMLConstants {
String ATTRIBUTE_TYPE = "type"; //$NON-NLS-1$
String ATTRIBUTE_DATA = "data"; //$NON-NLS-1$
String ATTRIBUTE_ALT = "alt"; //$NON-NLS-1$
+ String ATTRIBUTE_FRAMEBORDER = "frameborder"; //$NON-NLS-1$
+ String ATTRIBUTE_SCROLLING = "scrolling"; //$NON-NLS-1$
/* HTML attribute values */
String LINK_REL = "stylesheet"; //$NON-NLS-1$
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 a704c21fd..92d57b982 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
@@ -23,16 +23,17 @@ import org.eclipse.ui.internal.intro.impl.IntroPlugin;
import org.eclipse.ui.internal.intro.impl.model.AbstractBaseIntroElement;
import org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement;
import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPage;
-import org.eclipse.ui.internal.intro.impl.model.BundleUtil;
import org.eclipse.ui.internal.intro.impl.model.IntroContentProvider;
import org.eclipse.ui.internal.intro.impl.model.IntroGroup;
import org.eclipse.ui.internal.intro.impl.model.IntroHTML;
import org.eclipse.ui.internal.intro.impl.model.IntroHead;
import org.eclipse.ui.internal.intro.impl.model.IntroImage;
+import org.eclipse.ui.internal.intro.impl.model.IntroInjectedIFrame;
import org.eclipse.ui.internal.intro.impl.model.IntroLink;
import org.eclipse.ui.internal.intro.impl.model.IntroPageTitle;
import org.eclipse.ui.internal.intro.impl.model.IntroText;
import org.eclipse.ui.internal.intro.impl.model.loader.ContentProviderManager;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.eclipse.ui.intro.config.IIntroContentProvider;
import org.eclipse.ui.intro.config.IIntroContentProviderSite;
@@ -40,6 +41,7 @@ import org.eclipse.ui.intro.config.IIntroContentProviderSite;
public class IntroHTMLGenerator {
private AbstractIntroPage introPage;
+
private IIntroContentProviderSite providerSite;
/**
@@ -78,14 +80,32 @@ public class IntroHTMLGenerator {
* <pre>
*
*
- * &lt;HTML&gt;
- * &lt;HEAD&gt;
- * head content
- * &lt;/HEAD&gt;
- * &lt;BODY&gt;
- * body content
- * &lt;/BODY&gt;
- * &lt;/HTML&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;HTML&gt;
+ * &lt;HEAD&gt;
+ * head content
+ * &lt;/HEAD&gt;
+ * &lt;BODY&gt;
+ * body content
+ * &lt;/BODY&gt;
+ * &lt;/HTML&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
* </pre>
*
@@ -109,14 +129,32 @@ public class IntroHTMLGenerator {
* <pre>
*
*
- * &lt;HEAD&gt;
- * &lt;BASE href=&quot;base_plugin_location&gt;
- * &lt;style type=&quot;text/css&quot;&gt;HTML, IMG { border: 0px; } &lt;/style&gt;
- * &lt;TITLE&gt;page title &lt;/TITLE&gt;
- * &lt;LINK href=&quot;style sheet&quot;&gt;
- * additional head content, if specified
- * &lt;/HEAD&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
+ *
+ * &lt;HEAD&gt;
+ * &lt;BASE href=&quot;base_plugin_location&gt;
+ * &lt;style type=&quot;text/css&quot;&gt;HTML, IMG { border: 0px; } &lt;/style&gt;
+ * &lt;TITLE&gt;page title &lt;/TITLE&gt;
+ * &lt;LINK href=&quot;style sheet&quot;&gt;
+ * additional head content, if specified
+ * &lt;/HEAD&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
* </pre>
*
@@ -190,11 +228,29 @@ public class IntroHTMLGenerator {
*
* <pre>
*
- * &lt;BODY&gt;
- * &lt;DIV id=&quot;pageId&quot; class=&quot;pageClass&quot;&gt;
- * page content
- * &lt;/DIV&gt;
- * &lt;/BODY&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;BODY&gt;
+ * &lt;DIV id=&quot;pageId&quot; class=&quot;pageClass&quot;&gt;
+ * page content
+ * &lt;/DIV&gt;
+ * &lt;/BODY&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
* </pre>
@@ -263,6 +319,9 @@ public class IntroHTMLGenerator {
return generateIntroText((IntroText) element, indentLevel);
case AbstractIntroElement.PAGE_TITLE:
return generateIntroTitle((IntroPageTitle) element, indentLevel);
+ case AbstractIntroElement.INJECTED_IFRAME:
+ return generateIntroInjectedIFrame((IntroInjectedIFrame) element,
+ indentLevel);
default:
return null;
}
@@ -273,12 +332,30 @@ public class IntroHTMLGenerator {
*
* <pre>
*
+ *
+ *
+ *
+ *
*
- * &lt;div id=&quot;attrvalue&quot;&gt;
- * &lt;h4&gt;&lt;span class=&quot;div-label&quot;&gt;attrvalue&lt;/span&gt;&lt;h4&gt;
- * any defined divs, links, html, images, text, includes
- * &lt;/div&gt;
*
+ *
+ *
+ *
+ *
+ * &lt;div id=&quot;attrvalue&quot;&gt;
+ * &lt;h4&gt;&lt;span class=&quot;div-label&quot;&gt;attrvalue&lt;/span&gt;&lt;h4&gt;
+ * any defined divs, links, html, images, text, includes
+ * &lt;/div&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
*
@@ -324,12 +401,30 @@ public class IntroHTMLGenerator {
*
* <pre>
*
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;A id=linkId class=&quot;link&quot; href=linkHref&gt;
+ * &lt;IMG src=&quot;blank.gif&quot;&gt;
+ * &lt;SPAN class=&quot;link-label&quot;&gt;linkLabel &lt;/SPAN&gt;
+ * &lt;P&gt;&lt;SPAN&gt;text&lt;/SPAN&gt;&lt;/P&gt;
+ * &lt;/A&gt;
+ *
+ *
+ *
+ *
+ *
*
- * &lt;A id=linkId class=&quot;link&quot; href=linkHref&gt;
- * &lt;IMG src=&quot;blank.gif&quot;&gt;
- * &lt;SPAN class=&quot;link-label&quot;&gt;linkLabel &lt;/SPAN&gt;
- * &lt;P&gt;&lt;SPAN&gt;text&lt;/SPAN&gt;&lt;/P&gt;
- * &lt;/A&gt;
+ *
+ *
+ *
*
* </pre>
*
@@ -398,7 +493,8 @@ public class IntroHTMLGenerator {
*
* <pre>
*
- * &lt;IMG src=imageSrc id=imageId&gt;
+ * &lt;IMG src=imageSrc id=imageId&gt;
+ *
*
*
* </pre>
@@ -427,7 +523,25 @@ public class IntroHTMLGenerator {
*
* <pre>
*
- * &lt;P&gt;&lt;SPAN&gt;spanContent&lt;/SPAN&gt;&lt;/P&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;P&gt;&lt;SPAN&gt;spanContent&lt;/SPAN&gt;&lt;/P&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
* </pre>
@@ -453,6 +567,17 @@ public class IntroHTMLGenerator {
* @param indentLevel
* @return
*/
+ private HTMLElement generateIntroInjectedIFrame(
+ IntroInjectedIFrame element, int indentLevel) {
+ HTMLElement iframe = generateIFrameElement(element.getIFrameURL(), "0", "auto", indentLevel);
+ return iframe;
+ }
+
+ /**
+ * @param element
+ * @param indentLevel
+ * @return
+ */
private HTMLElement generateIntroTitle(IntroPageTitle element,
int indentLevel) {
HTMLElement titleElement = generateHeaderDiv(element.getId(), element
@@ -468,10 +593,28 @@ public class IntroHTMLGenerator {
*
* <pre>
*
+ *
+ *
+ *
+ *
*
- * &lt;div id=&quot;attrvalue&quot; class=&quot;attrvalue2&quot;&gt;
- * content from file specified in src attribute
- * &lt;/div&gt;
+ *
+ *
+ *
+ *
+ *
+ * &lt;div id=&quot;attrvalue&quot; class=&quot;attrvalue2&quot;&gt;
+ * content from file specified in src attribute
+ * &lt;/div&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
* </pre>
*
@@ -560,11 +703,23 @@ public class IntroHTMLGenerator {
* <pre>
*
*
- * &lt;OBJECT type=&quot;text/html&quot; data=&quot;attrvalue&quot;&gt;
- * alternative text in case the object can not be rendered
- * &lt;/OBJECT&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;OBJECT type=&quot;text/html&quot; data=&quot;attrvalue&quot;&gt;
+ * alternative text in case the object can not be rendered
+ * &lt;/OBJECT&gt;
+ *
+ *
+ *
*
+ *
*
+ *
+ *
*
* </pre>
*
@@ -591,7 +746,7 @@ public class IntroHTMLGenerator {
objectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS,
element.getStyleId());
// The alternative content is added in case the browser can not render
- // the specified content
+ // the specified content.
IntroText htmlText = element.getIntroText();
if (htmlText != null && htmlText.getText() != null) {
String textClass = (htmlText.getStyleId() != null) ? htmlText
@@ -618,9 +773,27 @@ public class IntroHTMLGenerator {
* <pre>
*
*
- * &lt;BASE href=baseURL&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;BASE href=baseURL&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
+ *
+ *
*
* </pre>
*
@@ -642,8 +815,26 @@ public class IntroHTMLGenerator {
* <pre>
*
*
- * &lt;style type=&quot;text/css&quot;&gt;HTML, IMG { border: 0px; } &lt;/style&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;style type=&quot;text/css&quot;&gt;HTML, IMG { border: 0px; } &lt;/style&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
+ *
+ *
*
* </pre>
*
@@ -667,8 +858,26 @@ public class IntroHTMLGenerator {
* <pre>
*
*
- * &lt;TITLE&gt;intro title&lt;/TITLE&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;TITLE&gt;intro title&lt;/TITLE&gt;
+ *
+ *
+ *
+ *
+ *
*
+ *
+ *
+ *
+ *
*
* </pre>
*
@@ -693,9 +902,27 @@ public class IntroHTMLGenerator {
* <pre>
*
*
+ *
+ *
+ *
*
- * &lt;LINK rel=&quot;stylesheet&quot; style=&quot;text/css&quot; href=&quot;style sheet&quot;&gt;
*
+ *
+ *
+ *
+ *
+ *
+ * &lt;LINK rel=&quot;stylesheet&quot; style=&quot;text/css&quot; href=&quot;style sheet&quot;&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
* </pre>
*
@@ -724,9 +951,27 @@ public class IntroHTMLGenerator {
* <pre>
*
*
+ *
+ *
+ *
*
- * &lt;A id=linkId class=linkClass href=linkHref&gt; &lt;/A&gt;
*
+ *
+ *
+ *
+ *
+ *
+ * &lt;A id=linkId class=linkClass href=linkHref&gt; &lt;/A&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
* </pre>
@@ -762,12 +1007,30 @@ public class IntroHTMLGenerator {
* <pre>
*
*
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;DIV id=divId&gt;
+ * &lt;H&gt;&lt;SPAN&gt;spanContent &lt;/SPAN&gt; &lt;/H&gt;
+ * &lt;/DIV&gt;
+ *
+ *
+ *
+ *
+ *
*
- * &lt;DIV id=divId&gt;
- * &lt;H&gt;&lt;SPAN&gt;spanContent &lt;/SPAN&gt; &lt;/H&gt;
- * &lt;/DIV&gt;
*
*
+ *
+ *
+ *
*
* </pre>
*
@@ -803,9 +1066,27 @@ public class IntroHTMLGenerator {
* <pre>
*
*
- * &lt;P&gt;&lt;SPAN&gt;spanContent&lt;/SPAN&gt;&lt;/P&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;P&gt;&lt;SPAN&gt;spanContent&lt;/SPAN&gt;&lt;/P&gt;
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
+ *
+ *
*
* </pre>
*
@@ -882,9 +1163,27 @@ public class IntroHTMLGenerator {
*
*
*
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * &lt;IMG src=imageSrc alt=altText&gt;
+ *
+ *
+ *
+ *
+ *
*
- * &lt;IMG src=imageSrc alt=altText&gt;
*
+ *
+ *
+ *
*
*
* </pre>
@@ -913,12 +1212,7 @@ public class IntroHTMLGenerator {
* Generate a span element
*
* <pre>
- *
- *
- *
- * &lt;SPAN class=spanClass&gt; &lt;/SPAN&gt;
- *
- *
+ * &lt;SPAN class=spanClass&gt; &lt;/SPAN&gt;
* </pre>
*
* @param spanClass
@@ -934,6 +1228,36 @@ public class IntroHTMLGenerator {
span.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS, spanClass);
return span;
}
+
+ /**
+ * Generate a span element
+ *
+ * <pre>
+ * &lt;iframe src="localPage1.xhtml" frameborder="1" scrolling="auto" longdesc="localPage1.xhtml"&gt;
+ * </pre>
+ *
+ * @param spanClass
+ * the value to be supplied to the class attribute
+ * @param indentLevel
+ * the number of indents to insert before the element when it is
+ * printed
+ * @return a span HTMLElement
+ */
+ private HTMLElement generateIFrameElement(String src, String frameborder, String scrolling,
+ int indentLevel) {
+ HTMLElement iframe = new FormattedHTMLElement(
+ IIntroHTMLConstants.ELEMENT_IFrame, indentLevel, false);
+ if(src!=null)
+ iframe.addAttribute(IIntroHTMLConstants.ATTRIBUTE_SRC, src);
+ if(frameborder!=null)
+ iframe.addAttribute(IIntroHTMLConstants.ATTRIBUTE_FRAMEBORDER, frameborder);
+ if(scrolling!=null)
+ iframe.addAttribute(IIntroHTMLConstants.ATTRIBUTE_SCROLLING, scrolling);
+ return iframe;
+ }
+
+
+
private boolean filteredFromPresentation(AbstractIntroElement element) {
if (element.isOfType(AbstractIntroElement.BASE_ELEMENT))
@@ -942,7 +1266,6 @@ public class IntroHTMLGenerator {
return false;
}
-
/**
* Reads the content of the file referred to by the <code>src</code>
* parameter and returns the content in the form of a StringBuffer. If the
@@ -1037,11 +1360,15 @@ public class IntroHTMLGenerator {
*/
private static class PluginIdParser {
private BufferedReader reader;
+
private static final char SUBSTITUTION_BEGIN = '$';
+
private static final char SUBSTITUTION_END = '$';
+
// tokenContent will contain all characters read by the parser, starting
// with and including the initial $ token.
private StringBuffer tokenContent;
+
// pluginId will contain the content between the "$plugin:" segment
// and the closing "$" token
private StringBuffer pluginId;
@@ -1103,7 +1430,6 @@ public class IntroHTMLGenerator {
reader.reset();
return tokenContent.toString();
-
} catch (IOException exception) {
Log.error("Error reading from file", exception); //$NON-NLS-1$
return tokenContent.toString();
@@ -1213,5 +1539,4 @@ public class IntroHTMLGenerator {
}
}
-
}
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 66cc21d25..84bc0ca23 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
@@ -365,22 +365,24 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
/**
* Finds the child element that corresponds to the given path in the passed
- * model.
+ * model.<br>
+ * ps: This method could be a static method, but left as instance for model
+ * enhancements.
*
* @param model
* @param path
* @return
*/
- public AbstractIntroElement findTarget(IntroModelRoot model, String path) {
+ public AbstractIntroElement findTarget(AbstractIntroContainer container,
+ String path) {
// extract path segments. Get first segment to start search.
String[] pathSegments = path.split("/"); //$NON-NLS-1$
- if (model == null)
- // if the target config was not found, return.
+ if (container == null)
return null;
- AbstractIntroElement target = model.findChild(pathSegments[0]);
+ AbstractIntroElement target = container.findChild(pathSegments[0]);
if (target == null)
- // there is no element with the specified path.
+ // there is no direct child with the specified first path segment.
return null;
// found parent segment. now find each child segment.
@@ -398,6 +400,12 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
}
+ public AbstractIntroElement findTarget(String path) {
+ return findTarget(this, path);
+ }
+
+
+
/*
* searches direct children for the first child with the given id. The type
* of the child can be any model element that has an id. ie:
@@ -571,4 +579,25 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
return base;
}
+
+ /*
+ * Clears this container. This means emptying the children, and resetting
+ * flags.
+ */
+ public void clearChildren() {
+ this.children.clear();
+ }
+
+
+ /**
+ * Adds a model element as a child. Caller is responsible for inserting
+ * model elements that rea valid as children.
+ *
+ * @param child
+ */
+ public void addChild(AbstractIntroElement child) {
+ children.add(child);
+ }
+
+
} \ No newline at end of file
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 df7ae1710..a18d1e381 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
@@ -12,6 +12,7 @@
package org.eclipse.ui.internal.intro.impl.model;
import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
@@ -134,6 +135,13 @@ public abstract class AbstractIntroElement implements Cloneable {
public static final int LAUNCH_BAR_SHORTCUT = 1 << 16;
/**
+ * Type constant which identifies am injected IFrame model element.
+ */
+ public static final int INJECTED_IFRAME = 1 << 17;
+
+
+
+ /**
* Type constant which identifies the AbstractText element.
*/
public static final int ABSTRACT_TEXT = HTML | LINK | CONTENT_PROVIDER;
@@ -155,7 +163,7 @@ public abstract class AbstractIntroElement implements Cloneable {
* Type constant which identifies any element in the Intro Model.
*/
public static final int ELEMENT = ID_ELEMENT | CONTAINER_EXTENSION | HEAD
- | INCLUDE | PRESENTATION;
+ | INCLUDE | PRESENTATION | LAUNCH_BAR | LAUNCH_BAR_SHORTCUT;
@@ -192,8 +200,8 @@ public abstract class AbstractIntroElement implements Cloneable {
* resources relative to the xml content file. The base is set to point to
* the relative location of the parent folder that holds the content file.
* In the case of a configExtension, it is set to point to the relative
- * position of the parent folder that holds the extension. The base field is
- * not stored in each model element to save memory.
+ * position of the parent folder that holds the extension. Only when needed,
+ * the base field is stored in a model element. This saves memory.
*
* @param element
* @param pd
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java
index 216fc6a09..7ee4e81a2 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java
@@ -21,6 +21,8 @@ import org.eclipse.ui.internal.intro.impl.IntroPlugin;
import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager;
import org.eclipse.ui.internal.intro.impl.model.loader.IntroContentParser;
import org.eclipse.ui.internal.intro.impl.model.loader.ModelLoaderUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.ModelUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.osgi.framework.Bundle;
import org.w3c.dom.Document;
@@ -35,6 +37,13 @@ import org.w3c.dom.NodeList;
* <li>support for page styles, and style inheritance</li>
* <li>support for XHTML via a DOM instance var. Resolving the page is also
* handled here.</li>
+ * <li>a pge has the concept of being an IFramePage. This is indicated by the
+ * isIFrame flag. A page is an IFramePage when it is not defined in any content
+ * file, but instead is actually created at runtime. This is done to display a
+ * Help System topic embedded in any given div. The current page is cloned, its
+ * id is mangled with "_embedDivId", the content of the div pointed to by
+ * embedDivId is replaced with an IFrame that loads the Help System topic.</li>
+ * </ul>
*/
public abstract class AbstractIntroPage extends AbstractIntroContainer {
@@ -49,6 +58,15 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
private IntroPageTitle title;
private String content;
+ // if true, indicates that this page was cloned at runtime from another page
+ // with id=originalId.
+ private boolean isIFramePage;
+
+ private IntroInjectedIFrame iframe;
+
+ // id of page from which this page was cloned.
+ private String originalId;
+
// DOM representing XHTML content. DOM is only cached in the case of XHTML
// content.
private Document dom;
@@ -706,4 +724,66 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
return clone;
}
+ /**
+ * Used when cloning pages to assign a unique id. Cache original id before
+ * setting.
+ *
+ * @param id
+ */
+ public void setId(String id) {
+ this.originalId = this.id;
+ this.id = id;
+ }
+
+ /*
+ * Creates an IFrame and injects it as the only child of the specified path.
+ */
+ public boolean injectIFrame(String url, String embedTarget) {
+ // embed url as IFrame in target div. We need to find target div in
+ // this cloned page not in the original page.
+ IntroGroup divToReplace = (IntroGroup) findTarget(embedTarget);
+ if (divToReplace == null) {
+ // we failed to find embed div, log and exit.
+ Log.warning("Failed to find embedTarget: " + embedTarget
+ + " in page " + getId());
+ return false;
+ }
+
+ this.iframe = new IntroInjectedIFrame(getElement(), getBundle());
+ this.iframe.setParent(divToReplace);
+ this.iframe.setIFrameURL(url);
+ divToReplace.clearChildren();
+ divToReplace.addChild(iframe);
+ return true;
+ }
+
+ /**
+ * Return true if this page is a cloned page that has an IFrame.
+ *
+ * @return
+ */
+ public boolean isIFramePage() {
+ return (iframe != null) ? true : false;
+ }
+
+
+ public String getUnmangledId() {
+ if (isIFramePage)
+ return originalId;
+ return id;
+ }
+
+
+ /**
+ * Set the url of the embedded IFrame, if this page is an IFrame page.
+ *
+ * @param url
+ */
+ public void setIFrameURL(String url) {
+ if (!isIFramePage())
+ return;
+ this.iframe.setIFrameURL(url);
+ }
+
+
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java
index 5a8a4ac2a..1ecb1d52f 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java
@@ -25,6 +25,7 @@ import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.internal.intro.impl.IIntroConstants;
import org.eclipse.ui.internal.intro.impl.IntroPlugin;
import org.eclipse.ui.internal.intro.impl.Messages;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
import org.eclipse.ui.internal.intro.impl.model.viewer.IntroModelContentProvider;
import org.eclipse.ui.internal.intro.impl.model.viewer.IntroModelLabelProvider;
import org.eclipse.ui.internal.intro.impl.util.ImageUtil;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java
index 570d69421..bb1bcd100 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java
@@ -14,6 +14,7 @@ package org.eclipse.ui.internal.intro.impl.model;
import java.util.Vector;
import org.eclipse.ui.internal.intro.impl.model.loader.IntroContentParser;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.osgi.framework.Bundle;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java
index c4e5ade74..a23666faf 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java
@@ -11,6 +11,7 @@
package org.eclipse.ui.internal.intro.impl.model;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java
index c8c42f862..089dd5b2c 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java
@@ -12,6 +12,7 @@
package org.eclipse.ui.internal.intro.impl.model;
import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
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 fe2ce035a..0f4e403a2 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
@@ -13,6 +13,7 @@ package org.eclipse.ui.internal.intro.impl.model;
import java.util.Vector;
+import org.eclipse.ui.internal.intro.impl.model.util.ModelUtil;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java
index cf368d9ce..edf594a29 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java
@@ -11,6 +11,7 @@
package org.eclipse.ui.internal.intro.impl.model;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java
new file mode 100644
index 000000000..53009dc61
--- /dev/null
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.intro.impl.model;
+
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Element;
+
+
+/**
+ * An Intro IFrame element that has been injected at runtime to embed a url. It
+ * is placed as the only child of a target div to display the content of a url.
+ * The URL can be any valid URL.
+ */
+public class IntroInjectedIFrame extends AbstractIntroIdElement {
+
+ private String url;
+
+ public IntroInjectedIFrame(Element element, Bundle bundle) {
+ super(element, bundle);
+ }
+
+ public void setIFrameURL(String url) {
+ this.url = url;
+ }
+
+ public String getIFrameURL() {
+ return this.url;
+ }
+
+
+ public int getType() {
+ return AbstractIntroElement.INJECTED_IFRAME;
+ }
+
+
+}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java
index 4ee04088e..dcafcb0a7 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java
@@ -11,6 +11,9 @@
package org.eclipse.ui.internal.intro.impl.model;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURL;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
+import org.eclipse.ui.internal.intro.impl.model.util.ModelUtil;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
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 b32a6d764..f18829a75 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
@@ -21,6 +21,8 @@ import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.internal.intro.impl.model.loader.IntroContentParser;
import org.eclipse.ui.internal.intro.impl.model.loader.ModelLoaderUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.ModelUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.osgi.framework.Bundle;
import org.w3c.dom.Document;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java
index 319ee63ac..88c046215 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java
@@ -20,6 +20,7 @@ import org.eclipse.swt.SWTError;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.internal.intro.impl.model.loader.ModelLoaderUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.ModelUtil;
import org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation;
import org.eclipse.ui.internal.intro.impl.presentations.FormIntroPartImplementation;
import org.eclipse.ui.internal.intro.impl.presentations.TextIntroPartImplementation;
@@ -63,8 +64,8 @@ public class IntroPartPresentation extends AbstractIntroElement {
protected static final String ATT_HOME_PAGE_ID = "home-page-id"; //$NON-NLS-1$
protected static final String ATT_STANDBY_PAGE_ID = "standby-page-id"; //$NON-NLS-1$
- protected static final String BROWSER_IMPL_KIND = "html"; //$NON-NLS-1$
- protected static final String FORMS_IMPL_KIND = "swt"; //$NON-NLS-1$
+ public static final String BROWSER_IMPL_KIND = "html"; //$NON-NLS-1$
+ public static final String FORMS_IMPL_KIND = "swt"; //$NON-NLS-1$
// this implementation kind if not public api. Only used internally for
// debugging.
private static final String TEXT_IMPL_KIND = "text"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarElement.java
index 5369cc71f..834c6c794 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarElement.java
@@ -38,7 +38,7 @@ public class LaunchBarElement extends AbstractIntroElement {
private ArrayList shortcuts;
- public LaunchBarElement(IConfigurationElement element) {
+ LaunchBarElement(IConfigurationElement element) {
super(element);
}
@@ -47,7 +47,7 @@ public class LaunchBarElement extends AbstractIntroElement {
* Returns LAUNCH_BAR.
*/
public int getType() {
- return LAUNCH_BAR;
+ return AbstractIntroElement.LAUNCH_BAR;
}
/**
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarShortcutElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarShortcutElement.java
index f73557590..0fad23227 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarShortcutElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/LaunchBarShortcutElement.java
@@ -24,13 +24,13 @@ public class LaunchBarShortcutElement extends AbstractIntroElement {
private static final String ATT_ICON = "icon"; //$NON-NLS-1$
private static final String ATT_URL = "url"; //$NON-NLS-1$
- public LaunchBarShortcutElement(IConfigurationElement element) {
+ LaunchBarShortcutElement(IConfigurationElement element) {
super(element);
}
public int getType() {
- return LAUNCH_BAR_SHORTCUT;
+ return AbstractIntroElement.LAUNCH_BAR_SHORTCUT;
}
/**
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java
index 7f530038f..61ec4ac6b 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java
@@ -28,7 +28,7 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.ui.internal.intro.impl.IIntroConstants;
-import org.eclipse.ui.internal.intro.impl.model.BundleUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/ModelLoaderUtil.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/ModelLoaderUtil.java
index 9b847225d..6a30ad188 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/ModelLoaderUtil.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/ModelLoaderUtil.java
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.internal.intro.impl.model.AbstractBaseIntroElement;
import org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement;
import org.eclipse.ui.internal.intro.impl.model.AbstractIntroIdElement;
-import org.eclipse.ui.internal.intro.impl.model.BundleUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.eclipse.ui.internal.intro.impl.util.StringUtil;
import org.osgi.framework.Bundle;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURL.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
index 71e40c5b6..a1846ef32 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURL.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.intro.impl.model;
+package org.eclipse.ui.internal.intro.impl.model.url;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
@@ -31,13 +31,22 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.RectangleAnimation;
import org.eclipse.ui.internal.intro.impl.IIntroConstants;
import org.eclipse.ui.internal.intro.impl.IntroPlugin;
+import org.eclipse.ui.internal.intro.impl.Messages;
+import org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement;
+import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPage;
+import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
+import org.eclipse.ui.internal.intro.impl.model.IntroPartPresentation;
+import org.eclipse.ui.internal.intro.impl.model.IntroURLAction;
+import org.eclipse.ui.internal.intro.impl.model.LaunchBarElement;
import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager;
import org.eclipse.ui.internal.intro.impl.model.loader.ModelLoaderUtil;
+import org.eclipse.ui.internal.intro.impl.model.util.ModelUtil;
import org.eclipse.ui.internal.intro.impl.parts.StandbyPart;
import org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation;
import org.eclipse.ui.internal.intro.impl.presentations.IntroLaunchBar;
import org.eclipse.ui.internal.intro.impl.util.DialogUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
+import org.eclipse.ui.internal.intro.impl.util.StringUtil;
import org.eclipse.ui.internal.intro.impl.util.Util;
import org.eclipse.ui.intro.IIntroPart;
import org.eclipse.ui.intro.IIntroSite;
@@ -89,6 +98,7 @@ public class IntroURL implements IIntroURL {
public static final String KEY_URL = "url"; //$NON-NLS-1$
public static final String KEY_DIRECTION = "direction"; //$NON-NLS-1$
public static final String KEY_EMBED = "embed"; //$NON-NLS-1$
+ public static final String KEY_EMBED_TARGET = "embedTarget"; //$NON-NLS-1$
public static final String VALUE_BACKWARD = "backward"; //$NON-NLS-1$
@@ -129,6 +139,11 @@ public class IntroURL implements IIntroURL {
}
protected boolean doExecute() {
+ if (Log.logInfo) {
+ String msg = StringUtil.concat("Running Introl URL with Action: ",
+ action, " and Parameters: ", parameters.toString()).toString();
+ Log.info(msg);
+ }
// check for all supported Intro actions first.
if (action.equals(CLOSE))
@@ -151,7 +166,8 @@ public class IntroURL implements IIntroURL {
// display a Help System Topic. It can be displayed in the Help
// system window, or embedded as an intro page.
// return showHelpTopic(getParameter(KEY_ID));
- return showHelpTopic(getParameter(KEY_ID), getParameter(KEY_EMBED));
+ return showHelpTopic(getParameter(KEY_ID), getParameter(KEY_EMBED),
+ getParameter(KEY_EMBED_TARGET));
else if (action.equals(OPEN_BROWSER))
// display url in external browser
@@ -180,6 +196,7 @@ public class IntroURL implements IIntroURL {
else if (action.equals(SWITCH_TO_LAUNCH_BAR))
return switchToLaunchBar();
+
else
return handleCustomAction();
}
@@ -282,39 +299,15 @@ public class IntroURL implements IIntroURL {
/**
* Open a help topic. If embed="true", open the help href as an intro page.
- * If false, open the href in the Help system window. In the case of SWT
- * presentation, embedd flag is ignored and the topic is opened in the Help
- * system window.
+ * If false, open the href in the Help system window. If embedTarget is set,
+ * then the Help System topic is embedded instead of the content of the
+ * specified div.<br>
+ * In the case of SWT presentation, embedd flag is ignored and the topic is
+ * opened in the Help system window.
*/
- private boolean showHelpTopic(String href, String embed) {
- if (href == null)
- return false;
-
- boolean isEmbedded = (embed != null && embed.equals(VALUE_TRUE)) ? true
- : false;
- IntroModelRoot model = IntroPlugin.getDefault().getIntroModelRoot();
- String presentationStyle = model.getPresentation()
- .getImplementationKind();
-
- if (isEmbedded
- && presentationStyle
- .equals(IntroPartPresentation.BROWSER_IMPL_KIND)) {
- // we want embedded and we have HTML presentation, show href
- // embedded.
- BrowserIntroPartImplementation impl = (BrowserIntroPartImplementation) model
- .getPresentation().getIntroParttImplementation();
- // INTRO: maybe add support for navigation
- href = PlatformUI.getWorkbench().getHelpSystem()
- .resolve(href, true).toExternalForm();
- impl.getBrowser().setUrl(href);
- return true;
- }
-
- // show href in Help window. SWT presentation is handled here.
- // WorkbenchHelp takes care of error handling.
- PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
- return true;
-
+ private boolean showHelpTopic(String href, String embed, String embedTarget) {
+ return new ShowHelpActionHandler(this).showHelpTopic(href, embed,
+ embedTarget);
}
@@ -386,7 +379,7 @@ public class IntroURL implements IIntroURL {
* <p>
* INTRO: revisit picking first page.
*/
- private boolean showPage(String pageId, String standbyState) {
+ boolean showPage(String pageId, String standbyState) {
// set the current page id in the model. This will triger appropriate
// listener event to the UI. If setting the page in the model fails (ie:
// the page was not found in the current model, look for it in loaded
@@ -459,7 +452,7 @@ public class IntroURL implements IIntroURL {
if (targetSharedStyle != null)
// add target model shared style.
clonedPage.insertStyle(targetSharedStyle, 0);
- model.children.add(clonedPage);
+ model.addChild(clonedPage);
return model.setCurrentPageId(clonedPage.getId());
}
@@ -533,7 +526,8 @@ public class IntroURL implements IIntroURL {
IntroURLAction command = ExtensionPointManager.getInst()
.getSharedConfigExtensionsManager().getCommand(action);
if (command == null) {
- DialogUtil.displayInfoMessage(null, "IntroURL.badCommand", //$NON-NLS-1$
+ String message = Messages.IntroURL_badCommand;
+ DialogUtil.displayInfoMessage(null, message,
new Object[] { action });
return false;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLParser.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURLParser.java
index c575914e9..56bcdf081 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLParser.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURLParser.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.intro.impl.model;
+package org.eclipse.ui.internal.intro.impl.model.url;
import java.net.MalformedURLException;
import java.net.URL;
@@ -32,7 +32,6 @@ public class IntroURLParser {
* Constructor that gets the URL to parse.
*/
public IntroURLParser(String url) {
- // url_string = url;
// create a URL instance, and parser it for parameters.
parseUrl(url);
}
@@ -51,7 +50,7 @@ public class IntroURLParser {
if (url_inst.getProtocol() != null) {
// URL has some valid protocol. Check to see if it is an intro url.
hasProtocol = true;
- isIntroUrl = isIntoUrl(url_inst);
+ isIntroUrl = isIntroUrl(url_inst);
return;
}
@@ -83,7 +82,7 @@ public class IntroURLParser {
* @param url
* @return true if url is an intro URL.
*/
- private boolean isIntoUrl(URL url) {
+ private boolean isIntroUrl(URL url) {
if (!url.getProtocol().equalsIgnoreCase(IntroURL.INTRO_PROTOCOL))
// quick exit. If it is not http, url is not an Intro url.
return false;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/ShowHelpActionHandler.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/ShowHelpActionHandler.java
new file mode 100644
index 000000000..96274b63f
--- /dev/null
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/ShowHelpActionHandler.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+
+package org.eclipse.ui.internal.intro.impl.model.url;
+
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.intro.impl.IntroPlugin;
+import org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement;
+import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPage;
+import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
+import org.eclipse.ui.internal.intro.impl.model.IntroPartPresentation;
+import org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation;
+import org.eclipse.ui.internal.intro.impl.util.Log;
+
+public class ShowHelpActionHandler {
+ private IntroURL introURL = null;
+
+ ShowHelpActionHandler(IntroURL url) {
+ this.introURL = url;
+ }
+
+
+
+ public boolean showHelpTopic(String href, String embed, String embedTarget) {
+ if (href == null)
+ return false;
+
+ boolean isEmbedded = (embed != null && embed
+ .equals(IntroURL.VALUE_TRUE)) ? true : false;
+ if (isEmbedded == false)
+ // still false, check the embedTarget. If embedTarget is set, then
+ // we
+ // have embedded by default.
+ isEmbedded = (embedTarget != null) ? true : false;
+
+ IntroPartPresentation presentation = IntroPlugin.getDefault()
+ .getIntroModelRoot().getPresentation();
+ String presentationStyle = presentation.getImplementationKind();
+
+ if (isEmbedded
+ && presentationStyle
+ .equals(IntroPartPresentation.BROWSER_IMPL_KIND)) {
+
+ // Embedded is true and we have HTML presentation, show href
+ // embedded, either in full page, or in div.
+ BrowserIntroPartImplementation impl = (BrowserIntroPartImplementation) presentation
+ .getIntroParttImplementation();
+ // INTRO: maybe add support for navigation
+ href = PlatformUI.getWorkbench().getHelpSystem()
+ .resolve(href, true).toExternalForm();
+
+ if (embedTarget == null)
+ return impl.getBrowser().setUrl(href);
+
+ // embedded in Div case.
+ IntroModelRoot model = IntroPlugin.getDefault().getIntroModelRoot();
+ return handleEmbedURLInDiv(href, embedTarget, model
+ .getCurrentPage());
+ }
+
+ // show href in Help window. SWT presentation is handled here.
+ // WorkbenchHelp takes care of error handling.
+ PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
+ return true;
+ }
+
+
+ /*
+ * Handles the embedded url case. Clone page and insert an IFrame in the
+ * target embed div. Note that only one div per page can be specified as an
+ * embed div. This is because we need to mangle the name for the cloned
+ * page, and the mangled name id pageId_embedTarget.
+ */
+ private boolean handleEmbedURLInDiv(String href, String embedTarget,
+ AbstractIntroPage currentPage) {
+
+ // re-use a runtime generated page, if found. Create the mangled id for
+ // the page and check if page exists first. If not, create one.
+ IntroModelRoot model = (IntroModelRoot) currentPage.getParentPage()
+ .getParent();
+ String currentPageId = null;
+ if (currentPage.isIFramePage())
+ currentPageId = currentPage.getUnmangledId();
+ else
+ currentPageId = currentPage.getId();
+ String mangledPageId = currentPageId + "_" + "WITH_IFRAME";
+
+ // get current standby state.
+ boolean standby = IntroPlugin.isIntroStandby();
+ String standbyAsString = standby ? IntroURL.VALUE_TRUE : "false";
+
+ AbstractIntroPage pageWithIFrame = (AbstractIntroPage) model.findChild(
+ mangledPageId, AbstractIntroElement.ABSTRACT_PAGE);
+ if (pageWithIFrame != null) {
+ pageWithIFrame.setIFrameURL(href);
+ return introURL.showPage(mangledPageId, standbyAsString);
+ }
+
+ // Page never generated, clone and create.
+ AbstractIntroPage clonedPage = null;
+ try {
+ clonedPage = (AbstractIntroPage) currentPage.clone();
+ } catch (CloneNotSupportedException ex) {
+ // should never be here.
+ Log.error("Failed to clone Intro page: " + currentPage.getId(), ex); //$NON-NLS-1$
+ return false;
+ }
+
+ // embed url as IFrame in target div. We need to find target div in
+ // cloned page not in the original page.
+ boolean canInjectFrame = clonedPage.injectIFrame(href, embedTarget);
+ if (!canInjectFrame)
+ // Called method handles error.
+ return false;
+
+ clonedPage.setId(mangledPageId);
+ model.addChild(clonedPage);
+ return introURL.showPage(clonedPage.getId(), standbyAsString);
+ }
+
+}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/BundleUtil.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/BundleUtil.java
index 74bd5786e..69b2a614e 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/BundleUtil.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/BundleUtil.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.intro.impl.model;
+package org.eclipse.ui.internal.intro.impl.model.util;
import java.io.IOException;
import java.net.URL;
@@ -186,7 +186,7 @@ public class BundleUtil {
/** *** used by Intro parser ***** */
/*
- * Uti method to return an URL to a plugin relative resource.
+ * Util method to return an URL to a plugin relative resource.
*/
public static URL getResourceAsURL(String resource, String pluginId) {
Bundle bundle = Platform.getBundle(pluginId);
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/ModelUtil.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/ModelUtil.java
index bb70aa6ba..828ab19d4 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/ModelUtil.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/ModelUtil.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.intro.impl.model;
+package org.eclipse.ui.internal.intro.impl.model.util;
import java.net.URL;
import java.util.Vector;
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.eclipse.ui.internal.intro.impl.util.StringUtil;
import org.eclipse.ui.internal.intro.impl.util.Util;
@@ -62,7 +63,7 @@ public class ModelUtil {
* @param pluginDesc
* @return returns the URL as is if it had a protocol.
*/
- protected static String resolveURL(String url, String pluginId) {
+ public static String resolveURL(String url, String pluginId) {
Bundle bundle = null;
if (pluginId != null)
// if pluginId is not null, use it.
@@ -82,7 +83,7 @@ public class ModelUtil {
* @param pluginDesc
* @return returns the URL as is if it had a protocol.
*/
- protected static String resolveURL(String url, IConfigurationElement element) {
+ public static String resolveURL(String url, IConfigurationElement element) {
Bundle bundle = BundleUtil.getBundleFromConfigurationElement(element);
return resolveURL("", url, bundle); //$NON-NLS-1$
}
@@ -92,7 +93,7 @@ public class ModelUtil {
/**
* @see resolveURL(String url, IConfigurationElement element)
*/
- protected static String resolveURL(String base, String url, Bundle bundle) {
+ public static String resolveURL(String base, String url, Bundle bundle) {
// quick exit
if (url == null)
return null;
@@ -111,7 +112,7 @@ public class ModelUtil {
*
* @param resource
*/
- protected static void extractParentFolder(Bundle bundle, String contentFile) {
+ public static void extractParentFolder(Bundle bundle, String contentFile) {
try {
long start = 0;
if (Log.logPerformance)
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java
index 9d8bc41fc..7fdf5816f 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java
@@ -41,11 +41,14 @@ public class EmptyStandbyContentPart implements IStandbyContentPart {
public void createPartControl(Composite parent, FormToolkit toolkit) {
contentComposite = toolkit.createComposite(parent);
contentComposite.setLayout(new GridLayout());
+ // Util.highlight(contentComposite, SWT.COLOR_YELLOW);
+
String text = Messages.EmptyStandbyContentPart_text;
- Label label = toolkit.createLabel(contentComposite, text, SWT.NULL);
+ Label label = toolkit.createLabel(contentComposite, text, SWT.WRAP);
label.setFont(PageStyleManager.getBannerFont());
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
label.setLayoutData(gd);
+
contentText = toolkit.createText(contentComposite, " ", SWT.MULTI
| SWT.WRAP);
GridData textGd = new GridData(GridData.FILL_BOTH);
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
index 5771a04ce..3a29a12c9 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
@@ -33,9 +33,9 @@ import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation;
import org.eclipse.ui.internal.intro.impl.model.IntroContentProvider;
import org.eclipse.ui.internal.intro.impl.model.IntroHomePage;
import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
-import org.eclipse.ui.internal.intro.impl.model.ModelUtil;
import org.eclipse.ui.internal.intro.impl.model.loader.ContentProviderManager;
import org.eclipse.ui.internal.intro.impl.model.loader.IntroContentParser;
+import org.eclipse.ui.internal.intro.impl.model.util.ModelUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
import org.eclipse.ui.internal.intro.impl.util.Util;
import org.eclipse.ui.intro.config.IIntroContentProvider;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java
index b7b5fdd3b..46e36e9ab 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java
@@ -13,8 +13,8 @@ package org.eclipse.ui.internal.intro.impl.presentations;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.LocationEvent;
import org.eclipse.swt.browser.LocationListener;
-import org.eclipse.ui.internal.intro.impl.model.IntroURL;
-import org.eclipse.ui.internal.intro.impl.model.IntroURLParser;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURL;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
/**
* A Location Listener that knows how to intercept OOBE action URLs. It also
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java
index 7394cea25..fadc5472d 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java
@@ -24,7 +24,7 @@ import org.eclipse.ui.internal.intro.impl.IIntroConstants;
import org.eclipse.ui.internal.intro.impl.Messages;
import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPage;
import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
-import org.eclipse.ui.internal.intro.impl.model.IntroURLParser;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
import org.eclipse.ui.internal.intro.impl.util.DialogUtil;
import org.eclipse.ui.internal.intro.impl.util.Util;
import org.eclipse.ui.intro.config.IIntroContentProviderSite;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java
index 9d3587df3..ff55d3386 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java
@@ -36,8 +36,8 @@ import org.eclipse.ui.internal.intro.impl.model.IntroHTML;
import org.eclipse.ui.internal.intro.impl.model.IntroImage;
import org.eclipse.ui.internal.intro.impl.model.IntroLink;
import org.eclipse.ui.internal.intro.impl.model.IntroText;
-import org.eclipse.ui.internal.intro.impl.model.IntroURLParser;
import org.eclipse.ui.internal.intro.impl.model.loader.ContentProviderManager;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
import org.eclipse.ui.internal.intro.impl.util.DialogUtil;
import org.eclipse.ui.internal.intro.impl.util.ImageUtil;
import org.eclipse.ui.internal.intro.impl.util.Log;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java
index 58a082940..5619784c9 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java
@@ -35,7 +35,7 @@ import org.eclipse.ui.internal.intro.impl.model.IntroGroup;
import org.eclipse.ui.internal.intro.impl.model.IntroHomePage;
import org.eclipse.ui.internal.intro.impl.model.IntroLink;
import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
-import org.eclipse.ui.internal.intro.impl.model.IntroURLParser;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
import org.eclipse.ui.internal.intro.impl.util.DialogUtil;
import org.eclipse.ui.internal.intro.impl.util.ImageUtil;
import org.eclipse.ui.internal.intro.impl.util.StringUtil;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Log.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Log.java
index 944422c54..24f50abfe 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Log.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Log.java
@@ -34,7 +34,7 @@ public class Log implements IIntroConstants {
* Used to compile out developement debug messages. <br>
* Compiler compiles out code warpped wit this flag as an optimization.
*/
- public static final boolean DEBUG = true;
+ public static final boolean DEBUG = false;
// Use these flags to filter out code that may be a performance hit.
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroURLFactory.java b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroURLFactory.java
index e6125f4c2..c5a303d84 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroURLFactory.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroURLFactory.java
@@ -11,8 +11,8 @@
package org.eclipse.ui.intro.config;
-import org.eclipse.ui.internal.intro.impl.model.IntroURL;
-import org.eclipse.ui.internal.intro.impl.model.IntroURLParser;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURL;
+import org.eclipse.ui.internal.intro.impl.model.url.IntroURLParser;
/**
* Factory class used to create instances of an Intro URL. Instances of intro

Back to the top