diff options
author | Wim Jongman | 2018-06-06 21:01:43 +0000 |
---|---|---|
committer | Wim Jongman | 2018-06-06 21:24:32 +0000 |
commit | fc642f4828ef7b226439b06755aec79ea85dbd11 (patch) | |
tree | bee6559ad6e0c770f780872addae6b8853ddf6a2 | |
parent | b0171bc227aaecb42aca8aa068cd9a37ab20542b (diff) | |
download | eclipse.platform.ua-fc642f4828ef7b226439b06755aec79ea85dbd11.tar.gz eclipse.platform.ua-fc642f4828ef7b226439b06755aec79ea85dbd11.tar.xz eclipse.platform.ua-fc642f4828ef7b226439b06755aec79ea85dbd11.zip |
Bug 535566: [Tips] Tips should consider different UX then startup dialogI20180607-2000
## CS2
i18n
## CS1
Tips as view
Change-Id: I96e1213bbb8b6d993074b6b67db9516ac7d78e67
Signed-off-by: Wim Jongman <wim.jongman@remainsoftware.com>
-rw-r--r-- | org.eclipse.tips.ide/OSGI-INF/l10n/bundle.properties | 8 | ||||
-rw-r--r-- | org.eclipse.tips.ide/plugin.xml | 118 | ||||
-rw-r--r-- | org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/TipPart.java | 20 |
3 files changed, 43 insertions, 103 deletions
diff --git a/org.eclipse.tips.ide/OSGI-INF/l10n/bundle.properties b/org.eclipse.tips.ide/OSGI-INF/l10n/bundle.properties index a9b3df1ff..ab135eb36 100644 --- a/org.eclipse.tips.ide/OSGI-INF/l10n/bundle.properties +++ b/org.eclipse.tips.ide/OSGI-INF/l10n/bundle.properties @@ -1,3 +1,9 @@ #Properties file for org.eclipse.tips.ide Bundle-Name = IDE Enablement for Tip of the Day -Bundle-Vendor = Eclipse.org
\ No newline at end of file +Bundle-Vendor = Eclipse.org +command.name = Tip of the Day +command.name.0 = Tip of the Day +command.label = Tip of the Da&y +toolbar.label = Tip of the Day Toolbar +command.label.0 = Tip of the Day +e4view.name = Tip of the Day
\ No newline at end of file diff --git a/org.eclipse.tips.ide/plugin.xml b/org.eclipse.tips.ide/plugin.xml index 59c48f265..f14785f87 100644 --- a/org.eclipse.tips.ide/plugin.xml +++ b/org.eclipse.tips.ide/plugin.xml @@ -23,11 +23,11 @@ <command defaultHandler="org.eclipse.tips.ide.internal.TipsHandler" id="org.eclipse.tips.ide.command.open" - name="Tip of the Day"> + name="%command.name"> </command> <command id="org.eclipse.tips.ide.command.trim.open" - name="Tip of the Day"> + name="%command.name.0"> </command> </extension> <extension @@ -39,7 +39,7 @@ commandId="org.eclipse.tips.ide.command.open" icon="platform:/plugin/org.eclipse.tips.ui/icons/lightbulb.png" id="org.eclipse.tips.ide.tip.menu" - label="Tip of the Da&y" + label="%command.label" style="push"> variable="newtips"> </command> </menuContribution> @@ -48,12 +48,12 @@ locationURI="toolbar:org.eclipse.ui.trim.status"> <toolbar id="org.eclipse.tips.ide.toolbar.status" - label="Tip of the Day Toolbar"> + label="%toolbar.label"> <command commandId="org.eclipse.tips.ide.command.trim.open" icon="platform:/plugin/org.eclipse.tips.ui/icons/lightbulb.png" id="org.eclipse.tips.ide.tip.tool" - label="Tip of the Day" + label="%command.label.0" style="push"> <visibleWhen checkEnabled="false"> @@ -69,103 +69,6 @@ </menuContribution> </extension> <extension - point="org.eclipse.ui.themes"> - <themeElementCategory - id="org.eclipse.tips.presentation" - label="Tip of the Day"> - </themeElementCategory> - <fontDefinition - categoryId="org.eclipse.tips.presentation" - defaultsTo="org.eclipse.jface.textfont" - id="org.eclipse.tips.browser.font" - label="Browser font"> - <description> - The browser font (may be overridden by HTML and CSS) - </description> - </fontDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.browser.background.color" - label="Browser background color" - value="COLOR_WHITE"> - <description> - The browser background color (may be overridden by HTML and CSS) - </description> - </colorDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.browser.foreground.color" - label="Browser foreground color" - value="COLOR_BLACK"> - <description> - The browser foreground color (may be overridden by HTML and CSS) - </description> - </colorDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.slider.hover.color" - label="Slider button hover color" - value="COLOR_GRAY"> - <description> - The background color of the button when the mouse hovers over the button. - </description> - </colorDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.slider.selection.color" - label="Slider button selection color" - value="COLOR_TITLE_BACKGROUND"> - <description> - The color of the button when this is the selected button. - </description> - </colorDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.slider.unreadTipCount.background.color" - label="Unread tip counter background color" - value="COLOR_RED"> - <description> - The background color of the tip counter badge when in unread mode. - </description> - </colorDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.slider.unreadTipCount.foreground.color" - label="Unread tip counter foreground color" - value="COLOR_WHITE"> - <description> - The foreground color of the tip counter badge when in unread mode. - </description> - </colorDefinition> - <fontDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.slider.badge.font" - label="Slider badge font" - value="Sans-bold-10"> - <description> - The counter badge font. - </description> - </fontDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.slider.tipCount.background.color" - label="Tip counter background color" - value="COLOR_DARK_GREEN"> - <description> - The background color of the counter badge when not in unread mode. - </description> - </colorDefinition> - <colorDefinition - categoryId="org.eclipse.tips.presentation" - id="org.eclipse.tips.slider.tipCount.foreground.color" - label="Tip counter foreground color" - value="COLOR_WHITE"> - <description> - The background color of the tip counter badge when not in unread mode. - </description> - </colorDefinition> - </extension> - <extension point="org.eclipse.ui.handlers"> <handler class="org.eclipse.tips.ide.internal.TipsHandler" @@ -207,4 +110,15 @@ </enablement> </provider> </extension> + <extension + point="org.eclipse.ui.views"> + <e4view + category="org.eclipse.help.ui" + class="org.eclipse.tips.ide.internal.TipPart" + icon="platform:/plugin/org.eclipse.tips.ui/icons/lightbulb.png" + id="org.eclipse.tips.ide.tipPart" + name="%e4view.name" + restorable="true"> + </e4view> + </extension> </plugin> diff --git a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/TipPart.java b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/TipPart.java new file mode 100644 index 000000000..e4a34e53e --- /dev/null +++ b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/TipPart.java @@ -0,0 +1,20 @@ +package org.eclipse.tips.ide.internal; + +import javax.annotation.PostConstruct; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.tips.ui.internal.TipComposite; + +public class TipPart { + + @PostConstruct + public void createPartControl(Composite pParent) { + Composite composite = new Composite(pParent, SWT.NONE); + composite.setLayout(new FillLayout()); + IDETipManager manager = (IDETipManager) IDETipManager.getInstance(); + Startup.loadProviders(); + new TipComposite(composite, SWT.NONE).setTipManager(manager); + } +}
\ No newline at end of file |