Skip to content

Commit

Permalink
feat: Improve snippet (#77)
Browse files Browse the repository at this point in the history
* feat: Improve snippet

* feat: Add aboutImage

* feat: Improve pom

* feat: Improve product

* feat: Add config

* feat: Improve about

* feat: Improve about

* feat: Add config

* feat: Improve layout
  • Loading branch information
unknowIfGuestInDream committed Jun 11, 2024
1 parent 115ea2c commit 978885d
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 32 deletions.
7 changes: 6 additions & 1 deletion examples/org.eclipse.swt.snippets/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
source..=src/
source..=src/
bin.includes = META-INF/,\
previews/,\
plugin.xml,\
plugin.properties,\
about.html
19 changes: 2 additions & 17 deletions examples/org.eclipse.swt.snippets/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="window"
label="Window">
<command
commandId="org.eclipse.swt.snippets.launcher"
label="SWT Snippets"
style="push">
</command>
</menu>
</menuContribution>
</extension>
<extension

<extension
point="org.eclipse.ui.commands">
<command
id="org.eclipse.swt.snippets.launcher"
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-dependency-plugin.version>3.6.1</maven-dependency-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<maven-help-plugin.version>3.4.0</maven-help-plugin.version>
<maven-help-plugin.version>3.4.1</maven-help-plugin.version>
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
<maven.wagon.http.ssl.insecure>true</maven.wagon.http.ssl.insecure>
<maven.wagon.http.ssl.allowall>true</maven.wagon.http.ssl.allowall>
Expand All @@ -44,7 +44,7 @@
<jaxen.version>2.0.0</jaxen.version>
<commons-lang3.version>3.14.0</commons-lang3.version>
<commons-io.version>2.16.1</commons-io.version>
<commons-configuration2.version>2.10.1</commons-configuration2.version>
<commons-configuration2.version>2.11.0</commons-configuration2.version>
<commons-beanutils.version>1.9.4</commons-beanutils.version>
<commons-csv.version>1.11.0</commons-csv.version>
<commons-compress.version>1.26.2</commons-compress.version>
Expand Down Expand Up @@ -72,8 +72,8 @@
<jakarta.xml.bind-api.version>4.0.2</jakarta.xml.bind-api.version>
<jaxb-runtime.version>4.0.5</jaxb-runtime.version>
<asm.version>9.7</asm.version>
<classgraph.version>4.8.172</classgraph.version>
<checker-qual.version>3.43.0</checker-qual.version>
<classgraph.version>4.8.173</classgraph.version>
<checker-qual.version>3.44.0</checker-qual.version>
</properties>

<!--
Expand Down
3 changes: 2 additions & 1 deletion releng/com.tlcsdm.tlstudio.examples.swt.rcp/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ bin.includes = plugin.xml,\
icons/,\
splash.bmp,\
OSGI-INF/,\
plugin_customization.ini
plugin_customization.ini,\
product_lg.gif
17 changes: 17 additions & 0 deletions releng/com.tlcsdm.tlstudio.examples.swt.rcp/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@
</command>
</menu>
</menuContribution>

<menuContribution
locationURI="menu:window">
<command
commandId="org.eclipse.swt.snippets.launcher"
label="SWT Snippets"
style="push">
</command>
</menuContribution>
</extension>
<extension
id="product"
Expand All @@ -121,6 +130,14 @@
value="SWT Examples Product">
</property>
<property
name="aboutText"
value="SWT Example Project&#x0A;&#x0A;Open source SWT examples.&#x0A;(c) Copyright 2024 the original author or authors.&#x0A; * @https://github.com/unknowIfGuestInDream/tlstudio&#x0A;Licensed under the EPL-2.0 (the &quot;License&quot;);&#x0A;you may not use this file except in compliance with the License.&#x0A;You may obtain a copy of the License at&#x0A; https://www.eclipse.org/legal/epl-2.0/&#x0A;THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE&#x0A;PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR DISTRIBUTION&#x0A;OF THE PROGRAM CONSTITUTES RECIPIENT&apos;S ACCEPTANCE OF THIS AGREEMENT.">
</property>
<property
name="aboutImage"
value="product_lg.gif">
</property>
<property
name="startupForegroundColor"
value="4B4848">
</property>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(false);
layout.createFolder("left", IPageLayout.LEFT, 0.5f, layout.getEditorArea());
layout.createFolder("leftTop", IPageLayout.TOP, 0.2f, "left").addView(CUSTOM_CONTROL_VIEWID);
layout.createFolder("leftTop1", IPageLayout.TOP, 0.5f, "left").addView(LAUNCHER_VIEWID);
layout.createFolder("leftBottom", IPageLayout.TOP, 0.3f, "left").addView(LAYOUT_VIEWID);
layout.createFolder("leftTop", IPageLayout.TOP, 0.5f, "left").addView(CONTROL_VIEWID);
layout.createFolder("leftTop1", IPageLayout.TOP, 0.4f, "left").addView(LAUNCHER_VIEWID);
layout.createFolder("leftBottom", IPageLayout.TOP, 0.1f, "left").addView(LAYOUT_VIEWID);
layout.createFolder("right", IPageLayout.LEFT, 0.5f, layout.getEditorArea());
layout.createFolder("rightTop", IPageLayout.TOP, 0.25f, "right").addView(CONTROL_VIEWID);
layout.createFolder("rightTop1", IPageLayout.TOP, 0.6f, "right").addView(PAINT_VIEWID);
layout.createFolder("rightBottom", IPageLayout.TOP, 0.15f, "right").addView(CONSOLEVIEWID);
layout.createFolder("rightTop", IPageLayout.TOP, 0.65f, "right").addView(CUSTOM_CONTROL_VIEWID);
layout.createFolder("rightTop1", IPageLayout.TOP, 0.35f, "right").addView(PAINT_VIEWID);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@

<product name="SWT Examples Product" uid="com.tlcsdm.tlstudio.examples.swt.rcp.product" id="com.tlcsdm.tlstudio.examples.swt.rcp.product" application="com.tlcsdm.tlstudio.examples.swt.rcp.application" version="1.0.0.qualifier" type="bundles" includeLaunchers="true" autoIncludeRequirements="true">

<aboutInfo>
<image path="/com.tlcsdm.tlstudio.examples.swt.rcp/product_lg.gif"/>
<text>
SWT Example Project

Open source SWT examples.
(c) Copyright 2024 the original author or authors.
* @https://github.com/unknowIfGuestInDream/tlstudio
Licensed under the EPL-2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.eclipse.org/legal/epl-2.0/
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR DISTRIBUTION
OF THE PROGRAM CONSTITUTES RECIPIENT&apos;S ACCEPTANCE OF THIS AGREEMENT.
</text>
</aboutInfo>

<configIni use="default">
</configIni>
Expand Down Expand Up @@ -419,9 +436,11 @@ version(s), and exceptions or additional permissions here}.&quot;
<plugin id="org.eclipse.swt.examples.layouts"/>
<plugin id="org.eclipse.swt.examples.paint"/>
<plugin id="org.eclipse.swt.examples.watchdog"/>
<plugin id="org.eclipse.swt.snippets"/>
<plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
<plugin id="org.eclipse.text"/>
<plugin id="org.eclipse.ui"/>
<plugin id="org.eclipse.ui.console"/>
<plugin id="org.eclipse.ui.editors"/>
<plugin id="org.eclipse.ui.ide"/>
<plugin id="org.eclipse.ui.navigator"/>
Expand All @@ -442,9 +461,6 @@ version(s), and exceptions or additional permissions here}.&quot;
<plugin id="org.w3c.dom.svg"/>
</plugins>

<features>
</features>

<configurations>
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true
# Make the default text editor a bit nicer
org.eclipse.ui.editors/lineNumberRuler=true
org.eclipse.ui.editors/showCarriageReturn=false
org.eclipse.ui.editors/showEnclosedIdeographicSpaces=false
org.eclipse.ui.editors/showLeadingIdeographicSpaces=false
org.eclipse.ui.editors/showLineFeed=false
org.eclipse.ui.editors/showTrailingIdeographicSpaces=false
org.eclipse.ui.editors/showWhitespaceCharacters=true
org.eclipse.ui.editors/whitespaceCharacterAlphaValue=35
10 changes: 10 additions & 0 deletions sites/plugin_customization.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true
# Make the default text editor a bit nicer
org.eclipse.ui.editors/lineNumberRuler=true
org.eclipse.ui.editors/showCarriageReturn=false
org.eclipse.ui.editors/showEnclosedIdeographicSpaces=false
org.eclipse.ui.editors/showLeadingIdeographicSpaces=false
org.eclipse.ui.editors/showLineFeed=false
org.eclipse.ui.editors/showTrailingIdeographicSpaces=false
org.eclipse.ui.editors/showWhitespaceCharacters=true
org.eclipse.ui.editors/whitespaceCharacterAlphaValue=35

0 comments on commit 978885d

Please sign in to comment.