├── PDEBuild
├── README
├── com.eclipsesource.maildemo.PDEBuild.feature
│ ├── .gitignore
│ ├── .project
│ ├── assembly.xml
│ ├── build.properties
│ ├── feature.properties
│ └── feature.xml
├── com.eclipsesource.maildemo.PDEBuild.releng
│ ├── .gitignore
│ ├── .project
│ ├── allElements.xml
│ ├── build.properties
│ ├── build.sh
│ ├── customTargets.xml
│ └── templates
│ │ └── WEB-INF
│ │ ├── CVS
│ │ ├── Entries
│ │ ├── Repository
│ │ ├── Root
│ │ └── Template
│ │ ├── eclipse
│ │ ├── .eclipseproduct
│ │ ├── CVS
│ │ │ ├── Entries
│ │ │ ├── Repository
│ │ │ ├── Root
│ │ │ └── Template
│ │ ├── configuration
│ │ │ ├── CVS
│ │ │ │ ├── Entries
│ │ │ │ ├── Repository
│ │ │ │ ├── Root
│ │ │ │ └── Template
│ │ │ └── config.ini
│ │ └── launch.ini
│ │ ├── lib
│ │ └── org.eclipse.equinox.servletbridge_1.2.0.v20091026.jar
│ │ └── web.xml
└── com.eclipsesource.maildemo.PDEBuild
│ ├── .classpath
│ ├── .gitignore
│ ├── .project
│ ├── .settings
│ └── org.eclipse.jdt.core.prefs
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── build.properties
│ ├── com.eclipsesource.maildemo.PDEBuild.launch
│ ├── icons
│ ├── sample.gif
│ ├── sample2.gif
│ └── sample3.gif
│ ├── plugin.properties
│ ├── plugin.xml
│ └── src
│ └── com
│ └── eclipsesource
│ └── maildemo
│ ├── AboutAction.java
│ ├── Application.java
│ ├── ApplicationActionBarAdvisor.java
│ ├── ApplicationWorkbenchAdvisor.java
│ ├── ApplicationWorkbenchWindowAdvisor.java
│ ├── ICommandIds.java
│ ├── MessagePopupAction.java
│ ├── NavigationView.java
│ ├── OpenViewAction.java
│ ├── PDEBuild
│ └── Activator.java
│ ├── Perspective.java
│ └── View.java
├── README
├── tycho
├── README
├── com.eclipsesource.maildemo.tycho.feature
│ ├── .gitignore
│ ├── .project
│ ├── assembly.xml
│ ├── build.properties
│ ├── feature.properties
│ ├── feature.xml
│ ├── pom.xml
│ └── templates
│ │ └── WEB-INF
│ │ ├── CVS
│ │ ├── Entries
│ │ ├── Repository
│ │ ├── Root
│ │ └── Template
│ │ ├── eclipse
│ │ ├── .eclipseproduct
│ │ ├── CVS
│ │ │ ├── Entries
│ │ │ ├── Repository
│ │ │ ├── Root
│ │ │ └── Template
│ │ ├── configuration
│ │ │ ├── CVS
│ │ │ │ ├── Entries
│ │ │ │ ├── Repository
│ │ │ │ ├── Root
│ │ │ │ └── Template
│ │ │ └── config.ini
│ │ └── launch.ini
│ │ ├── lib
│ │ └── org.eclipse.equinox.servletbridge_1.2.0.v20091026.jar
│ │ └── web.xml
├── com.eclipsesource.maildemo.tycho
│ ├── .classpath
│ ├── .gitignore
│ ├── .project
│ ├── .settings
│ │ └── org.eclipse.jdt.core.prefs
│ ├── META-INF
│ │ └── MANIFEST.MF
│ ├── build.properties
│ ├── com.eclipsesource.maildemo.tycho.launch
│ ├── icons
│ │ ├── sample.gif
│ │ ├── sample2.gif
│ │ └── sample3.gif
│ ├── plugin.properties
│ ├── plugin.xml
│ ├── pom.xml
│ └── src
│ │ └── com
│ │ └── eclipsesource
│ │ └── maildemo
│ │ ├── AboutAction.java
│ │ ├── Application.java
│ │ ├── ApplicationActionBarAdvisor.java
│ │ ├── ApplicationWorkbenchAdvisor.java
│ │ ├── ApplicationWorkbenchWindowAdvisor.java
│ │ ├── ICommandIds.java
│ │ ├── MessagePopupAction.java
│ │ ├── NavigationView.java
│ │ ├── OpenViewAction.java
│ │ ├── Perspective.java
│ │ ├── View.java
│ │ └── tycho
│ │ └── Activator.java
└── pom.xml
└── warproducts
├── README
└── com.eclipsesource.maildemo.warproducts
├── .classpath
├── .gitignore
├── .project
├── .settings
└── org.eclipse.jdt.core.prefs
├── META-INF
└── MANIFEST.MF
├── WEB-INF
├── launch.ini
└── web.xml
├── build.properties
├── com.eclipsesource.maildemo.warproducts.launch
├── icons
├── sample.gif
├── sample2.gif
└── sample3.gif
├── maildemo.warproduct
├── plugin.properties
├── plugin.xml
└── src
└── com
└── eclipsesource
└── maildemo
├── AboutAction.java
├── Application.java
├── ApplicationActionBarAdvisor.java
├── ApplicationWorkbenchAdvisor.java
├── ApplicationWorkbenchWindowAdvisor.java
├── ICommandIds.java
├── MessagePopupAction.java
├── NavigationView.java
├── OpenViewAction.java
├── Perspective.java
├── View.java
└── warproducts
└── Activator.java
/PDEBuild/README:
--------------------------------------------------------------------------------
1 | == RAP PDE Build build example ==
2 |
3 | This repository contains one bundle (which contains a RAP application) and one feature to
4 | demonstrate how to build a RAP application with PDE Build. The build will be done with the
5 | artifacts in the com.eclipsesource.maildemo.PDEBuild.releng project.
6 |
7 | === Usage ===
8 |
9 | * Clone the repository and switch to the repository/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng
10 | folder via the command line.
11 | * Run the build.sh script with the following arguments:
12 | --runtimeDir "Absolute path to an Eclipse installation containing the PDE Build Plug-In"
13 | --targetDir "Absolute path to a RAP Target Platform containing RAP and the Equinox SDK"
14 | * After the build has succeeded you will find a maildemo.war in the
15 | com.eclipsesource.maildemo.PDEBuild.releng/build/out folder.
16 | * Deploy the maildemo.war to the servlet container of your choice.
17 |
18 | === Support ===
19 |
20 | If you run into problems please use the RAP newsgroup to get help:
21 | http://www.eclipse.org/forums/index.php?t=thread&frm_id=34&S=7af935de3aca30bd299a973485307ada
22 |
23 | === Further information ===
24 |
25 | http://eclipse.org/rap
26 | http://eclipse.org/pde/pde-build/
27 |
28 | === License ===
29 |
30 | All files are published under the terms of the Eclipse Public License v1.0
31 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.feature/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.feature/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.eclipsesource.maildemo.PDEBuild.feature
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.FeatureBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.FeatureNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.feature/assembly.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 | war
13 |
14 | false
15 |
16 |
17 | ${output-directory}
18 | /WEB-INF
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.feature/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = feature.xml,\
2 | feature.properties
3 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.feature/feature.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2011 EclipseSource Inc. and others.
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # EclipseSource - initial API and implementation
10 | ###############################################################################
11 | # feature.properties
12 | # contains externalized strings for feature.xml
13 | # "%foo" in feature.xml corresponds to the key "foo" in this file
14 | # java.io.Properties file (ISO 8859-1 with "\" escapes)
15 | # This file should be translated.
16 |
17 | # "featureName" property - name of the feature
18 | featureName=RTP basic package feature
19 |
20 | # "providerName" property - name of the company that provides the feature
21 | providerName=EclipseSource
22 |
23 | description=This feature collects all necessary bundles to build a .war file for a RAP application.
24 |
25 | # "copyright" property - text of the "Feature Update Copyright"
26 | copyright=\
27 | Copyright (c) 2010 EclipseSource and others.\n\
28 | All rights reserved. This program and the accompanying materials\n\
29 | are made available under the terms of the Eclipse Public License v1.0\n\
30 | which accompanies this distribution, and is available at\n\
31 | http://www.eclipse.org/legal/epl-v10.html\n\
32 | \n\
33 | Contributors:\n\
34 | EclipseSource - initial API and implementation\n
35 | ################ end of copyright property ####################################
36 |
37 | # "licenseURL" property - URL of the "Feature License"
38 | # do not translate value - just change to point to a locale-specific HTML page
39 | licenseURL=license.html
40 |
41 | # "license" property - text of the "Feature Update License"
42 | # should be plain text version of license agreement pointed to be "licenseURL"
43 | license=\
44 | Eclipse Foundation Software User Agreement\n\
45 | April 14, 2010\n\
46 | \n\
47 | Usage Of Content\n\
48 | \n\
49 | THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
50 | OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
51 | USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
52 | AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
53 | NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
54 | AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
55 | AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
56 | OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
57 | TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
58 | OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
59 | BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
60 | \n\
61 | Applicable Licenses\n\
62 | \n\
63 | Unless otherwise indicated, all Content made available by the\n\
64 | Eclipse Foundation is provided to you under the terms and conditions of\n\
65 | the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
66 | provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
67 | For purposes of the EPL, "Program" will mean the Content.\n\
68 | \n\
69 | Content includes, but is not limited to, source code, object code,\n\
70 | documentation and other files maintained in the Eclipse Foundation source code\n\
71 | repository ("Repository") in software modules ("Modules") and made available\n\
72 | as downloadable archives ("Downloads").\n\
73 | \n\
74 | - Content may be structured and packaged into modules to facilitate delivering,\n\
75 | extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
76 | plug-in fragments ("Fragments"), and features ("Features").\n\
77 | - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
78 | in a directory named "plugins".\n\
79 | - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
80 | Each Feature may be packaged as a sub-directory in a directory named "features".\n\
81 | Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
82 | numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
83 | - Features may also include other Features ("Included Features"). Within a Feature, files\n\
84 | named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
85 | \n\
86 | The terms and conditions governing Plug-ins and Fragments should be\n\
87 | contained in files named "about.html" ("Abouts"). The terms and\n\
88 | conditions governing Features and Included Features should be contained\n\
89 | in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
90 | Licenses may be located in any directory of a Download or Module\n\
91 | including, but not limited to the following locations:\n\
92 | \n\
93 | - The top-level (root) directory\n\
94 | - Plug-in and Fragment directories\n\
95 | - Inside Plug-ins and Fragments packaged as JARs\n\
96 | - Sub-directories of the directory named "src" of certain Plug-ins\n\
97 | - Feature directories\n\
98 | \n\
99 | Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
100 | Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
101 | Update License") during the installation process. If the Feature contains\n\
102 | Included Features, the Feature Update License should either provide you\n\
103 | with the terms and conditions governing the Included Features or inform\n\
104 | you where you can locate them. Feature Update Licenses may be found in\n\
105 | the "license" property of files named "feature.properties" found within a Feature.\n\
106 | Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
107 | terms and conditions (or references to such terms and conditions) that\n\
108 | govern your use of the associated Content in that directory.\n\
109 | \n\
110 | THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
111 | TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
112 | SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
113 | \n\
114 | - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
115 | - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
116 | - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
117 | - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
118 | - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
119 | \n\
120 | IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
121 | TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
122 | is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
123 | govern that particular Content.\n\
124 | \n\
125 | \n\Use of Provisioning Technology\n\
126 | \n\
127 | The Eclipse Foundation makes available provisioning software, examples of which include,\n\
128 | but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
129 | the purpose of allowing users to install software, documentation, information and/or\n\
130 | other materials (collectively "Installable Software"). This capability is provided with\n\
131 | the intent of allowing such users to install, extend and update Eclipse-based products.\n\
132 | Information about packaging Installable Software is available at\n\
133 | http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
134 | \n\
135 | You may use Provisioning Technology to allow other parties to install Installable Software.\n\
136 | You shall be responsible for enabling the applicable license agreements relating to the\n\
137 | Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
138 | in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
139 | making it available in accordance with the Specification, you further acknowledge your\n\
140 | agreement to, and the acquisition of all necessary rights to permit the following:\n\
141 | \n\
142 | 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
143 | the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
144 | extending or updating the functionality of an Eclipse-based product.\n\
145 | 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
146 | Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
147 | 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
148 | govern the use of the Installable Software ("Installable Software Agreement") and such\n\
149 | Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
150 | with the Specification. Such Installable Software Agreement must inform the user of the\n\
151 | terms and conditions that govern the Installable Software and must solicit acceptance by\n\
152 | the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
153 | indication of agreement by the user, the provisioning Technology will complete installation\n\
154 | of the Installable Software.\n\
155 | \n\
156 | Cryptography\n\
157 | \n\
158 | Content may contain encryption software. The country in which you are\n\
159 | currently may have restrictions on the import, possession, and use,\n\
160 | and/or re-export to another country, of encryption software. BEFORE\n\
161 | using any encryption software, please check the country's laws,\n\
162 | regulations and policies concerning the import, possession, or use, and\n\
163 | re-export of encryption software, to see if this is permitted.\n\
164 | \n\
165 | Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
166 | ########### end of license property ##########################################
167 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.feature/feature.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | %description
10 |
11 |
12 |
13 | %copyright
14 |
15 |
16 |
17 | %license
18 |
19 |
20 |
26 |
27 |
33 |
34 |
40 |
41 |
47 |
48 |
54 |
55 |
61 |
62 |
68 |
69 |
75 |
76 |
82 |
83 |
89 |
90 |
96 |
97 |
103 |
104 |
110 |
111 |
117 |
118 |
124 |
125 |
131 |
132 |
138 |
139 |
145 |
146 |
152 |
153 |
160 |
161 |
167 |
168 |
174 |
175 |
181 |
182 |
188 |
189 |
195 |
196 |
202 |
203 |
209 |
210 |
216 |
217 |
223 |
224 |
230 |
231 |
237 |
238 |
244 |
245 |
252 |
253 |
254 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.eclipsesource.maildemo.PDEBuild.releng
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/allElements.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/build.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2011 EclipseSource and others.
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # EclipseSource - initial API and implementation
10 | ###############################################################################
11 |
12 | #The type of the top level element we are building, generally "feature"
13 | topLevelElementType = feature
14 | #The id of the top level element we are building
15 | topLevelElementId = com.eclipsesource.maildemo.PDEBuild.feature
16 |
17 | ############# PRODUCT/PACKAGING CONTROL #############
18 | runPackager=true
19 |
20 | # The prefix that will be used in the generated archive.
21 | archivePrefix=eclipse
22 |
23 | # The location underwhich all of the build output will be collected.
24 | collectingFolder=${archivePrefix}
25 |
26 | # The list of {os, ws, arch} configurations to build. This
27 | # value is a '&' separated list of ',' separate triples. For example,
28 | # configs=win32,win32,x86 & linux,motif,x86
29 | # By default the value is *,*,*
30 | configs = *, *, *
31 |
32 | ############## BUILD NAMING CONTROL ################
33 | # The directory into which the build elements are fetched and where
34 | # the build takes place.
35 | buildDirectory=${builder}/build/work
36 |
37 | # Type of build. Used in naming the build output. Typically this value is
38 | # one of I, N, M, S, ...
39 | buildType=N
40 |
41 | # ID of the build. Used in naming the build output.
42 | buildId=
43 |
44 | # Label for the build. Used in naming the build output
45 | buildLabel=${buildType}.${buildId}
46 |
47 | #The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
48 | #The value will only be applied to plugin or features indicating build.properties, qualifier = context
49 | forceContextQualifier=${buildId}
50 |
51 | ############# BASE CONTROL #############
52 | # Settings for the base Eclipse components and Java class libraries
53 | # against which you are building.
54 | # Base location for anything the build needs to compile against. For example,
55 | # in most RCP app or a plug-in, the baseLocation should be the location of a previously
56 | # installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
57 |
58 | # platform to build against
59 | baseLocation=
60 |
61 | #this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
62 | filteredDependencyCheck=false
63 |
64 | #this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
65 | resolution.devMode=false
66 |
67 | ############# MAP FILE CONTROL ################
68 | # This section defines CVS tags to use when fetching the map files from the repository.
69 | # If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
70 |
71 | skipMaps=true
72 | skipFetch=true
73 |
74 | # Specify the output format of the compiler log when eclipse jdt is used
75 | logExtension=.log
76 |
77 | # Whether or not to include debug info in the output jars
78 | javacDebugInfo=true
79 |
80 | # Whether or not to fail the build if there are compiler errors
81 | javacFailOnError=true
82 |
83 | # Enable or disable verbose mode of the compiler
84 | javacVerbose=false
85 |
86 | # Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
87 | javacSource=1.5
88 |
89 | # Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
90 | javacTarget=1.5
91 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | ###############################################################################
4 | # Copyright (c) 2011 EclipseSource and others.
5 | # All rights reserved. This program and the accompanying materials
6 | # are made available under the terms of the Eclipse Public License v1.0
7 | # which accompanies this distribution, and is available at
8 | # http://www.eclipse.org/legal/epl-v10.html
9 | #
10 | # Contributors:
11 | # EclipseSource - initial API and implementation
12 | ###############################################################################
13 | #
14 | #
15 | # This script is used to build a RAP Application using PDE build.
16 |
17 | runtimeDir=
18 | targetDir=
19 | builder=$(pwd)
20 |
21 | #Reading the command line arguments
22 | for i
23 | do
24 | case "$i" in
25 | --targetDir|-c) shift; targetDir=$1; shift;;
26 | --runtimeDir|-d) shift; runtimeDir=$1; shift;;
27 | esac
28 | done
29 |
30 | # Show informations
31 | echo "Starting build with the following settings:"
32 | echo " Runtime Inst.: $runtimeDir"
33 | echo " Target Platform Inst.: $targetDir"
34 | echo " Builder: $builder"
35 | echo ""
36 |
37 | # Find PDE build
38 | pdeBuild=`ls -1 $runtimeDir/plugins | grep pde.build_ | tail -n 1`
39 | echo "Using PDE Build: $pdeBuild"
40 |
41 | # Find Equinox launcher
42 | launcher=$runtimeDir/plugins/`ls -1 $runtimeDir/plugins | grep launcher_ | tail -n 1`
43 | echo "Using Equinox launcher: $launcher"
44 |
45 | java -cp $launcher org.eclipse.core.launcher.Main \
46 | -application org.eclipse.ant.core.antRunner \
47 | -buildfile "$runtimeDir/plugins/$pdeBuild/scripts/build.xml" \
48 | -Dbuilder="$builder" \
49 | -DbuildId=`date +%Y%m%d-%H%M` \
50 | -DbaseLocation="$targetDir" \
51 | -Dfile.encoding=UTF-8 \
52 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/customTargets.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/CVS/Entries:
--------------------------------------------------------------------------------
1 | D/eclipse////
2 | /web.xml/1.3/Wed Jan 13 17:17:13 2010//
3 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/CVS/Repository:
--------------------------------------------------------------------------------
1 | org.eclipse.rap/releng/org.eclipse.rap.releng/warbuild/templates/WEB-INF
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/CVS/Root:
--------------------------------------------------------------------------------
1 | :extssh:hstaudacher@dev.eclipse.org:/cvsroot/rt
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/CVS/Template:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/CVS/Template
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/.eclipseproduct:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/.eclipseproduct
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/CVS/Entries:
--------------------------------------------------------------------------------
1 | /.eclipseproduct/1.1/Wed Sep 23 08:17:08 2009//
2 | D/configuration////
3 | /launch.ini/1.1/Wed Sep 23 08:17:08 2009//
4 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/CVS/Repository:
--------------------------------------------------------------------------------
1 | org.eclipse.rap/releng/org.eclipse.rap.releng/warbuild/templates/WEB-INF/eclipse
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/CVS/Root:
--------------------------------------------------------------------------------
1 | :extssh:hstaudacher@dev.eclipse.org:/cvsroot/rt
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/CVS/Template:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/CVS/Template
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/configuration/CVS/Entries:
--------------------------------------------------------------------------------
1 | /config.ini/1.3/Mon Jan 18 11:30:35 2010//
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/configuration/CVS/Repository:
--------------------------------------------------------------------------------
1 | org.eclipse.rap/releng/org.eclipse.rap.releng/warbuild/templates/WEB-INF/eclipse/configuration
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/configuration/CVS/Root:
--------------------------------------------------------------------------------
1 | :extssh:hstaudacher@dev.eclipse.org:/cvsroot/rt
2 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/configuration/CVS/Template:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/configuration/CVS/Template
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/configuration/config.ini:
--------------------------------------------------------------------------------
1 | #Eclipse Runtime Configuration File
2 | osgi.bundles=com.ibm.icu.base@start,\
3 | org.eclipse.core.commands@start,\
4 | org.eclipse.core.contenttype@start,\
5 | org.eclipse.core.expressions@start,\
6 | org.eclipse.core.jobs@start,\
7 | org.eclipse.core.runtime@start,\
8 | org.eclipse.equinox.app@start,\
9 | org.eclipse.equinox.common@2:start,\
10 | org.eclipse.equinox.http.registry@start,\
11 | org.eclipse.equinox.http.servletbridge@start,\
12 | org.eclipse.equinox.http.servlet@start,\
13 | org.eclipse.equinox.preferences@start,\
14 | org.eclipse.equinox.registry@start,\
15 | org.eclipse.equinox.servletbridge.extensionbundle,\
16 | org.eclipse.osgi.services@start,\
17 | org.eclipse.help@start,\
18 | org.eclipse.rap.design.example@start,\
19 | org.eclipse.rap.equinox.registry,\
20 | org.eclipse.rap.jface@start,\
21 | org.eclipse.rap.rms.data@start,\
22 | org.eclipse.rap.rms.ui@start,\
23 | org.eclipse.rap.rwt.q07,\
24 | org.eclipse.rap.rwt@start,\
25 | org.eclipse.rap.ui.forms@start,\
26 | org.eclipse.rap.ui@start,\
27 | org.eclipse.rap.ui.views@start,\
28 | org.eclipse.rap.ui.workbench@start,\
29 | com.eclipsesource.maildemo.PDEBuild@start
30 | osgi.bundles.defaultStartLevel=4
31 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/eclipse/launch.ini:
--------------------------------------------------------------------------------
1 | # Eclipse Runtime Configuration Overrides
2 | # These properties are loaded prior to starting the framework and can also be used to override System Properties
3 | # @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
4 | # "*" can be used together with @null to clear System Properties that match a prefix name.
5 |
6 | osgi.*=@null
7 | org.osgi.*=@null
8 | eclipse.*=@null
9 |
10 | osgi.parentClassloader=app
11 | osgi.contextClassLoaderParent=app
12 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/lib/org.eclipse.equinox.servletbridge_1.2.0.v20091026.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/lib/org.eclipse.equinox.servletbridge_1.2.0.v20091026.jar
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild.releng/templates/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | equinoxbridgeservlet
6 | Equinox Bridge Servlet
7 | Equinox Bridge Servlet
8 | org.eclipse.equinox.servletbridge.BridgeServlet
9 |
10 |
12 |
18 |
19 |
20 |
21 | commandline
22 | -registryMultiLanguage
23 |
24 |
25 |
27 |
28 | enableFrameworkControls
29 | false
30 |
31 |
32 |
38 |
39 | extendedFrameworkExports
40 |
41 |
42 |
43 |
51 |
62 |
63 | overrideAndReplaceExtensionBundle
64 | true
65 |
66 | 1
67 |
68 |
69 | equinoxbridgeservlet
70 | /*
71 |
72 |
75 |
76 | equinoxbridgeservlet
77 | *.jsp
78 |
79 |
80 |
81 | 5
82 |
83 |
84 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | bin
3 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.eclipsesource.maildemo.PDEBuild
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Tue Jan 04 14:34:54 CET 2011
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.source=1.6
9 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: %Bundle-Name
4 | Bundle-SymbolicName: com.eclipsesource.maildemo.PDEBuild;singleton:=true
5 | Bundle-Version: 1.0.0.qualifier
6 | Bundle-Activator: com.eclipsesource.maildemo.PDEBuild.Activator
7 | Bundle-Vendor: %Bundle-Vendor
8 | Require-Bundle: org.eclipse.rap.ui
9 | Bundle-RequiredExecutionEnvironment: JavaSE-1.6
10 | Bundle-ActivationPolicy: lazy
11 | Bundle-Localization: plugin
12 | Import-Package: javax.servlet;version="2.4.0",
13 | javax.servlet.http;version="2.4.0"
14 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = plugin.xml,\
4 | META-INF/,\
5 | .,\
6 | icons/,\
7 | plugin.properties
8 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/com.eclipsesource.maildemo.PDEBuild.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/icons/sample.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild/icons/sample.gif
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/icons/sample2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild/icons/sample2.gif
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/icons/sample3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/PDEBuild/com.eclipsesource.maildemo.PDEBuild/icons/sample3.gif
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/plugin.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2011 EclipseSource Inc. and others.
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # EclipseSource - initial API and implementation
10 | ###############################################################################
11 |
12 | # MANIFEST.MF
13 | Bundle-Vendor = EclipseSource
14 | Bundle-Name = RAP Maildemo build with Tycho
15 |
16 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
11 |
12 |
13 |
15 |
19 |
20 |
21 |
23 |
29 |
30 |
35 |
36 |
37 |
39 |
42 |
43 |
48 |
49 |
54 |
55 |
56 |
58 |
64 |
68 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/AboutAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchWindow;
6 |
7 | /**
8 | * Opens an "About RAP" message dialog.
9 | */
10 | public class AboutAction extends Action {
11 |
12 | private final IWorkbenchWindow window;
13 |
14 | public AboutAction(IWorkbenchWindow window) {
15 | super("About");
16 | setId(this.getClass().getName());
17 | this.window = window;
18 | }
19 |
20 | public void run() {
21 | if(window != null) {
22 | String title = "About RAP";
23 | String msg = "RAP Mail template created by PDE.\n\n"
24 | + "You can learn more about RAP at:\n\n"
25 | + "http://www.eclipse.org/rap";
26 | MessageDialog.openInformation( window.getShell(), title, msg );
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/Application.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.rwt.lifecycle.IEntryPoint;
4 | import org.eclipse.swt.widgets.Display;
5 | import org.eclipse.ui.PlatformUI;
6 | import org.eclipse.ui.application.WorkbenchAdvisor;
7 |
8 | /**
9 | * This class controls all aspects of the application's execution
10 | * and is contributed through the plugin.xml.
11 | */
12 | public class Application implements IEntryPoint {
13 |
14 | public int createUI() {
15 | Display display = PlatformUI.createDisplay();
16 | WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17 | return PlatformUI.createAndRunWorkbench( display, advisor );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/ApplicationActionBarAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.action.GroupMarker;
5 | import org.eclipse.jface.action.IAction;
6 | import org.eclipse.jface.action.ICoolBarManager;
7 | import org.eclipse.jface.action.IMenuManager;
8 | import org.eclipse.jface.action.IToolBarManager;
9 | import org.eclipse.jface.action.MenuManager;
10 | import org.eclipse.jface.action.Separator;
11 | import org.eclipse.jface.action.ToolBarContributionItem;
12 | import org.eclipse.jface.action.ToolBarManager;
13 | import org.eclipse.swt.SWT;
14 | import org.eclipse.ui.IWorkbenchActionConstants;
15 | import org.eclipse.ui.IWorkbenchWindow;
16 | import org.eclipse.ui.actions.ActionFactory;
17 | import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
18 | import org.eclipse.ui.application.ActionBarAdvisor;
19 | import org.eclipse.ui.application.IActionBarConfigurer;
20 |
21 | /**
22 | * An action bar advisor is responsible for creating, adding, and disposing of the
23 | * actions added to a workbench window. Each window will be populated with
24 | * new actions.
25 | */
26 | public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
27 |
28 | // Actions - important to allocate these only in makeActions, and then use them
29 | // in the fill methods. This ensures that the actions aren't recreated
30 | // when fillActionBars is called with FILL_PROXY.
31 | private IWorkbenchAction exitAction;
32 | private IAction aboutAction;
33 | private OpenViewAction openViewAction;
34 | private Action messagePopupAction;
35 |
36 |
37 | public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
38 | super(configurer);
39 | }
40 |
41 | protected void makeActions(final IWorkbenchWindow window) {
42 | // Creates the actions and registers them.
43 | // Registering is needed to ensure that key bindings work.
44 | // The corresponding commands keybindings are defined in the plugin.xml file.
45 | // Registering also provides automatic disposal of the actions when
46 | // the window is closed.
47 |
48 | exitAction = ActionFactory.QUIT.create(window);
49 | register(exitAction);
50 |
51 | aboutAction = new AboutAction(window);
52 | register(aboutAction);
53 |
54 | openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
55 | register(openViewAction);
56 |
57 | messagePopupAction = new MessagePopupAction("Open Message", window);
58 | register(messagePopupAction);
59 | }
60 |
61 | protected void fillMenuBar(IMenuManager menuBar) {
62 | MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
63 | MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
64 |
65 | menuBar.add(fileMenu);
66 | // Add a group marker indicating where action set menus will appear.
67 | menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
68 | menuBar.add(helpMenu);
69 |
70 | // File
71 | fileMenu.add(messagePopupAction);
72 | fileMenu.add(openViewAction);
73 | fileMenu.add(new Separator());
74 | fileMenu.add(exitAction);
75 |
76 | // Help
77 | helpMenu.add(aboutAction);
78 | }
79 |
80 | protected void fillCoolBar(ICoolBarManager coolBar) {
81 | IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
82 | coolBar.add(new ToolBarContributionItem(toolbar, "main"));
83 | toolbar.add(openViewAction);
84 | toolbar.add(messagePopupAction);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/ApplicationWorkbenchAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
4 | import org.eclipse.ui.application.WorkbenchAdvisor;
5 | import org.eclipse.ui.application.WorkbenchWindowAdvisor;
6 |
7 | /**
8 | * This workbench advisor creates the window advisor, and specifies
9 | * the perspective id for the initial window.
10 | */
11 | public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
12 |
13 | private static final String PERSPECTIVE_ID = "com.eclipsesource.maildemo.PDEBuild.perspective";
14 |
15 | public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
16 | return new ApplicationWorkbenchWindowAdvisor(configurer);
17 | }
18 |
19 | public String getInitialWindowPerspectiveId() {
20 | return PERSPECTIVE_ID;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/ApplicationWorkbenchWindowAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.swt.graphics.Point;
4 | import org.eclipse.ui.application.ActionBarAdvisor;
5 | import org.eclipse.ui.application.IActionBarConfigurer;
6 | import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
7 | import org.eclipse.ui.application.WorkbenchWindowAdvisor;
8 |
9 | /**
10 | * Configures the initial size and appearance of a workbench window.
11 | */
12 | public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
13 |
14 | public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
15 | super(configurer);
16 | }
17 |
18 | public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
19 | return new ApplicationActionBarAdvisor(configurer);
20 | }
21 |
22 | public void preWindowOpen() {
23 | IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
24 | configurer.setInitialSize(new Point(600, 400));
25 | configurer.setShowCoolBar(true);
26 | configurer.setShowStatusLine(false);
27 | configurer.setTitle("RAP Mail Template build with Tycho");
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/ICommandIds.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | /**
4 | * Interface defining the application's command IDs.
5 | * Key bindings can be defined for specific commands.
6 | * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
7 | *
8 | * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
9 | */
10 | public interface ICommandIds {
11 |
12 | public static final String CMD_OPEN = "com.eclipsesource.maildemo.PDEBuild.open";
13 | public static final String CMD_OPEN_MESSAGE = "com.eclipsesource.maildemo.PDEBuild.openMessage";
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/MessagePopupAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchWindow;
6 | import org.eclipse.ui.plugin.AbstractUIPlugin;
7 |
8 | /**
9 | * When run, this action will show a message dialog.
10 | */
11 | public class MessagePopupAction extends Action {
12 |
13 | private final IWorkbenchWindow window;
14 |
15 | MessagePopupAction(String text, IWorkbenchWindow window) {
16 | super(text);
17 | this.window = window;
18 | // The id is used to refer to the action in a menu or toolbar
19 | setId(ICommandIds.CMD_OPEN_MESSAGE);
20 | // Associate the action with a pre-defined command, to allow key bindings.
21 | setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
22 | setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("com.eclipsesource.maildemo.tycho", "/icons/sample3.gif"));
23 | }
24 |
25 | public void run() {
26 | MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
27 | }
28 | }
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/NavigationView.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import java.util.ArrayList;
4 |
5 | import org.eclipse.jface.viewers.IStructuredContentProvider;
6 | import org.eclipse.jface.viewers.ITreeContentProvider;
7 | import org.eclipse.jface.viewers.LabelProvider;
8 | import org.eclipse.jface.viewers.TreeViewer;
9 | import org.eclipse.jface.viewers.Viewer;
10 | import org.eclipse.swt.SWT;
11 | import org.eclipse.swt.graphics.Image;
12 | import org.eclipse.swt.widgets.Composite;
13 | import org.eclipse.ui.ISharedImages;
14 | import org.eclipse.ui.PlatformUI;
15 | import org.eclipse.ui.part.ViewPart;
16 |
17 | /**
18 | * View with a tree viewer. This class is contributed through the plugin.xml.
19 | */
20 | public class NavigationView extends ViewPart {
21 | public static final String ID = "com.eclipsesource.maildemo.PDEBuild.navigationView";
22 | private TreeViewer viewer;
23 |
24 | class TreeObject {
25 | private String name;
26 | private TreeParent parent;
27 |
28 | public TreeObject(String name) {
29 | this.name = name;
30 | }
31 | public String getName() {
32 | return name;
33 | }
34 | public void setParent(TreeParent parent) {
35 | this.parent = parent;
36 | }
37 | public TreeParent getParent() {
38 | return parent;
39 | }
40 | public String toString() {
41 | return getName();
42 | }
43 | }
44 |
45 | class TreeParent extends TreeObject {
46 | private ArrayList children;
47 | public TreeParent(String name) {
48 | super(name);
49 | children = new ArrayList();
50 | }
51 | public void addChild(TreeObject child) {
52 | children.add(child);
53 | child.setParent(this);
54 | }
55 | public void removeChild(TreeObject child) {
56 | children.remove(child);
57 | child.setParent(null);
58 | }
59 | public TreeObject[] getChildren() {
60 | return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
61 | }
62 | public boolean hasChildren() {
63 | return children.size()>0;
64 | }
65 | }
66 |
67 | class ViewContentProvider implements IStructuredContentProvider,
68 | ITreeContentProvider {
69 |
70 | public void inputChanged(Viewer v, Object oldInput, Object newInput) {
71 | }
72 |
73 | public void dispose() {
74 | }
75 |
76 | public Object[] getElements(Object parent) {
77 | return getChildren(parent);
78 | }
79 |
80 | public Object getParent(Object child) {
81 | if (child instanceof TreeObject) {
82 | return ((TreeObject)child).getParent();
83 | }
84 | return null;
85 | }
86 |
87 | public Object[] getChildren(Object parent) {
88 | if (parent instanceof TreeParent) {
89 | return ((TreeParent)parent).getChildren();
90 | }
91 | return new Object[0];
92 | }
93 |
94 | public boolean hasChildren(Object parent) {
95 | if (parent instanceof TreeParent)
96 | return ((TreeParent)parent).hasChildren();
97 | return false;
98 | }
99 | }
100 |
101 | class ViewLabelProvider extends LabelProvider {
102 |
103 | public String getText(Object obj) {
104 | return obj.toString();
105 | }
106 | public Image getImage(Object obj) {
107 | String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
108 | if (obj instanceof TreeParent)
109 | imageKey = ISharedImages.IMG_OBJ_FOLDER;
110 | return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
111 | }
112 | }
113 |
114 | /**
115 | * We will set up a dummy model to initialize tree heararchy. In real
116 | * code, you will connect to a real model and expose its hierarchy.
117 | */
118 | private TreeObject createDummyModel() {
119 | TreeObject to1 = new TreeObject("Inbox");
120 | TreeObject to2 = new TreeObject("Drafts");
121 | TreeObject to3 = new TreeObject("Sent");
122 | TreeParent p1 = new TreeParent("me@this.com");
123 | p1.addChild(to1);
124 | p1.addChild(to2);
125 | p1.addChild(to3);
126 |
127 | TreeObject to4 = new TreeObject("Inbox");
128 | TreeParent p2 = new TreeParent("other@aol.com");
129 | p2.addChild(to4);
130 |
131 | TreeParent root = new TreeParent("");
132 | root.addChild(p1);
133 | root.addChild(p2);
134 | return root;
135 | }
136 |
137 | /**
138 | * This is a callback that will allow us to create the viewer and initialize
139 | * it.
140 | */
141 | public void createPartControl(Composite parent) {
142 | viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
143 | viewer.setContentProvider(new ViewContentProvider());
144 | viewer.setLabelProvider(new ViewLabelProvider());
145 | viewer.setInput(createDummyModel());
146 | }
147 |
148 | /**
149 | * Passing the focus request to the viewer's control.
150 | */
151 | public void setFocus() {
152 | viewer.getControl().setFocus();
153 | }
154 | }
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/OpenViewAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchPage;
6 | import org.eclipse.ui.IWorkbenchWindow;
7 | import org.eclipse.ui.PartInitException;
8 | import org.eclipse.ui.plugin.AbstractUIPlugin;
9 |
10 | /**
11 | * When run, this action will open another instance of a view.
12 | */
13 | public class OpenViewAction extends Action {
14 |
15 | private final IWorkbenchWindow window;
16 | private int instanceNum = 0;
17 | private final String viewId;
18 |
19 | public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
20 | this.window = window;
21 | this.viewId = viewId;
22 | setText(label);
23 | // The id is used to refer to the action in a menu or toolbar
24 | setId(ICommandIds.CMD_OPEN);
25 | // Associate the action with a pre-defined command, to allow key bindings.
26 | setActionDefinitionId(ICommandIds.CMD_OPEN);
27 | setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("com.eclipsesource.maildemo.PDEBuild", "/icons/sample2.gif"));
28 | }
29 |
30 | public void run() {
31 | if(window != null) {
32 | try {
33 | window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
34 | } catch (PartInitException e) {
35 | MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/PDEBuild/Activator.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo.PDEBuild;
2 |
3 | import org.eclipse.jface.resource.ImageDescriptor;
4 | import org.eclipse.ui.plugin.AbstractUIPlugin;
5 | import org.osgi.framework.BundleContext;
6 |
7 | /**
8 | * The activator class controls the plug-in life cycle
9 | */
10 | public class Activator extends AbstractUIPlugin {
11 |
12 | // The plug-in ID
13 | public static final String PLUGIN_ID = "com.eclipsesource.maildemo.tycho"; //$NON-NLS-1$
14 |
15 | // The shared instance
16 | private static Activator plugin;
17 |
18 | /**
19 | * The constructor
20 | */
21 | public Activator() {
22 | }
23 |
24 | /*
25 | * (non-Javadoc)
26 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
27 | */
28 | public void start(BundleContext context) throws Exception {
29 | super.start(context);
30 | plugin = this;
31 | }
32 |
33 | /*
34 | * (non-Javadoc)
35 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
36 | */
37 | public void stop(BundleContext context) throws Exception {
38 | plugin = null;
39 | super.stop(context);
40 | }
41 |
42 | /**
43 | * Returns the shared instance
44 | *
45 | * @return the shared instance
46 | */
47 | public static Activator getDefault() {
48 | return plugin;
49 | }
50 |
51 | /**
52 | * Returns an image descriptor for the image file at the given
53 | * plug-in relative path
54 | *
55 | * @param path the path
56 | * @return the image descriptor
57 | */
58 | public static ImageDescriptor getImageDescriptor(String path) {
59 | return imageDescriptorFromPlugin(PLUGIN_ID, path);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/Perspective.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.ui.IFolderLayout;
4 | import org.eclipse.ui.IPageLayout;
5 | import org.eclipse.ui.IPerspectiveFactory;
6 |
7 | /**
8 | * Configures the perspective layout. This class is contributed through the
9 | * plugin.xml.
10 | */
11 | public class Perspective implements IPerspectiveFactory {
12 |
13 | public void createInitialLayout(IPageLayout layout) {
14 | String editorArea = layout.getEditorArea();
15 | layout.setEditorAreaVisible(false);
16 |
17 | layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
18 | IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
19 | folder.addPlaceholder(View.ID + ":*");
20 | folder.addView(View.ID);
21 |
22 | layout.getViewLayout(NavigationView.ID).setCloseable(false);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/PDEBuild/com.eclipsesource.maildemo.PDEBuild/src/com/eclipsesource/maildemo/View.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.dialogs.MessageDialog;
4 | import org.eclipse.jface.resource.JFaceResources;
5 | import org.eclipse.swt.SWT;
6 | import org.eclipse.swt.events.SelectionAdapter;
7 | import org.eclipse.swt.events.SelectionEvent;
8 | import org.eclipse.swt.graphics.Font;
9 | import org.eclipse.swt.layout.GridData;
10 | import org.eclipse.swt.layout.GridLayout;
11 | import org.eclipse.swt.widgets.Composite;
12 | import org.eclipse.swt.widgets.Label;
13 | import org.eclipse.swt.widgets.Link;
14 | import org.eclipse.swt.widgets.Text;
15 | import org.eclipse.ui.part.ViewPart;
16 |
17 | /**
18 | * This view shows a "mail message". This class is contributed through
19 | * the plugin.xml.
20 | */
21 | public class View extends ViewPart {
22 |
23 | public static final String ID = "com.eclipsesource.maildemo.PDEBuild.view";
24 |
25 | public void createPartControl(Composite parent) {
26 | Composite top = new Composite(parent, SWT.NONE);
27 | GridLayout layout = new GridLayout();
28 | layout.marginHeight = 0;
29 | layout.marginWidth = 0;
30 | top.setLayout(layout);
31 | // top banner
32 | Composite banner = new Composite(top, SWT.NONE);
33 | banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
34 | layout = new GridLayout();
35 | layout.marginHeight = 5;
36 | layout.marginWidth = 10;
37 | layout.numColumns = 2;
38 | banner.setLayout(layout);
39 |
40 | // setup bold font
41 | Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
42 |
43 | Label l = new Label(banner, SWT.WRAP);
44 | l.setText("Subject:");
45 | l.setFont(boldFont);
46 | l = new Label(banner, SWT.WRAP);
47 | l.setText("This is a message about the cool Eclipse RCP!");
48 |
49 | l = new Label(banner, SWT.WRAP);
50 | l.setText("From:");
51 | l.setFont(boldFont);
52 |
53 | final Link link = new Link(banner, SWT.NONE);
54 | link.setText("nicole@mail.org");
55 | link.addSelectionListener(new SelectionAdapter() {
56 | public void widgetSelected(SelectionEvent e) {
57 | MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
58 | }
59 | });
60 |
61 | l = new Label(banner, SWT.WRAP);
62 | l.setText("Date:");
63 | l.setFont(boldFont);
64 | l = new Label(banner, SWT.WRAP);
65 | l.setText("10:34 am");
66 | // message contents
67 | Text text = new Text(top, SWT.MULTI | SWT.WRAP);
68 | text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
69 | "- add a top-level menu and toolbar with actions\n"+
70 | "- create views that can't be closed and\n"+
71 | " multiple instances of the same view\n"+
72 | "- perspectives with placeholders for new views\n"+
73 | "- use the default about dialog\n" );
74 | text.setLayoutData(new GridData(GridData.FILL_BOTH));
75 | }
76 |
77 | public void setFocus() {
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | == RAP build examples ==
2 |
3 | This repository contains different examples regarding the build process of a RAP application.
4 | With "build process" we mean compiling a RAP application and packaging it into a deployable
5 | WAR file in an automated or manual way.
6 |
7 | Currently these build systems are covered:
8 |
9 | * Tycho - http://eclipse.org/tycho
10 | * PDE Build - http://eclipse.org/pde/pde-build
11 | * WAR Products Tooling - http://wiki.eclipse.org/RAP/Equinox_WAR_products
12 |
13 | === Usage ===
14 |
15 | * Read the README files in the appropriate folders.
16 |
17 | === Support ===
18 |
19 | If you run into problems please use the RAP newsgroup to get help:
20 | http://www.eclipse.org/forums/index.php?t=thread&frm_id=34&S=7af935de3aca30bd299a973485307ada
21 |
22 | === Further information ===
23 |
24 | http://eclipse.org/rap
25 |
26 | === License ===
27 |
28 | All files are published under the terms of the Eclipse Public License v1.0
29 |
--------------------------------------------------------------------------------
/tycho/README:
--------------------------------------------------------------------------------
1 | == RAP Tycho build example ==
2 |
3 | This repository contains one bundle (which contains a RAP application) and one feature to
4 | demonstrate how to build a RAP application with Tycho.
5 |
6 | === Usage ===
7 |
8 | * Clone the repository and switch to the repository/tycho folder via the command line.
9 | * Be sure you have Maven 3 installed. Run this command within the repository folder to build
10 | the RAP application: mvn clean install
11 | * After the build has succeeded you will find a maildemo.war in the
12 | com.eclipsesource.maildemo.tycho.feature/target folder.
13 | * Deploy the maildemo.war to the servlet container of your choice.
14 |
15 | === Support ===
16 |
17 | If you run into problems please use the RAP newsgroup to get help:
18 | http://www.eclipse.org/forums/index.php?t=thread&frm_id=34&S=7af935de3aca30bd299a973485307ada
19 |
20 | === Further information ===
21 |
22 | http://eclipse.org/rap
23 | http://eclipse.org/tycho
24 |
25 | === License ===
26 |
27 | All files are published under the terms of the Eclipse Public License v1.0
28 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.eclipsesource.maildemo.tycho.feature
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.FeatureBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.FeatureNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/assembly.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 | war
13 |
14 | false
15 |
16 |
17 | ${output-directory}
18 | /WEB-INF
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = feature.xml,\
2 | feature.properties
3 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/feature.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2011 EclipseSource Inc. and others.
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # EclipseSource - initial API and implementation
10 | ###############################################################################
11 | # feature.properties
12 | # contains externalized strings for feature.xml
13 | # "%foo" in feature.xml corresponds to the key "foo" in this file
14 | # java.io.Properties file (ISO 8859-1 with "\" escapes)
15 | # This file should be translated.
16 |
17 | # "featureName" property - name of the feature
18 | featureName=RTP basic package feature
19 |
20 | # "providerName" property - name of the company that provides the feature
21 | providerName=EclipseSource
22 |
23 | description=This feature collects all necessary bundles to build a .war file for a RAP application.
24 |
25 | # "copyright" property - text of the "Feature Update Copyright"
26 | copyright=\
27 | Copyright (c) 2010 EclipseSource and others.\n\
28 | All rights reserved. This program and the accompanying materials\n\
29 | are made available under the terms of the Eclipse Public License v1.0\n\
30 | which accompanies this distribution, and is available at\n\
31 | http://www.eclipse.org/legal/epl-v10.html\n\
32 | \n\
33 | Contributors:\n\
34 | EclipseSource - initial API and implementation\n
35 | ################ end of copyright property ####################################
36 |
37 | # "licenseURL" property - URL of the "Feature License"
38 | # do not translate value - just change to point to a locale-specific HTML page
39 | licenseURL=license.html
40 |
41 | # "license" property - text of the "Feature Update License"
42 | # should be plain text version of license agreement pointed to be "licenseURL"
43 | license=\
44 | Eclipse Foundation Software User Agreement\n\
45 | April 14, 2010\n\
46 | \n\
47 | Usage Of Content\n\
48 | \n\
49 | THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
50 | OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
51 | USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
52 | AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
53 | NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
54 | AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
55 | AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
56 | OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
57 | TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
58 | OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
59 | BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
60 | \n\
61 | Applicable Licenses\n\
62 | \n\
63 | Unless otherwise indicated, all Content made available by the\n\
64 | Eclipse Foundation is provided to you under the terms and conditions of\n\
65 | the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
66 | provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
67 | For purposes of the EPL, "Program" will mean the Content.\n\
68 | \n\
69 | Content includes, but is not limited to, source code, object code,\n\
70 | documentation and other files maintained in the Eclipse Foundation source code\n\
71 | repository ("Repository") in software modules ("Modules") and made available\n\
72 | as downloadable archives ("Downloads").\n\
73 | \n\
74 | - Content may be structured and packaged into modules to facilitate delivering,\n\
75 | extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
76 | plug-in fragments ("Fragments"), and features ("Features").\n\
77 | - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
78 | in a directory named "plugins".\n\
79 | - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
80 | Each Feature may be packaged as a sub-directory in a directory named "features".\n\
81 | Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
82 | numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
83 | - Features may also include other Features ("Included Features"). Within a Feature, files\n\
84 | named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
85 | \n\
86 | The terms and conditions governing Plug-ins and Fragments should be\n\
87 | contained in files named "about.html" ("Abouts"). The terms and\n\
88 | conditions governing Features and Included Features should be contained\n\
89 | in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
90 | Licenses may be located in any directory of a Download or Module\n\
91 | including, but not limited to the following locations:\n\
92 | \n\
93 | - The top-level (root) directory\n\
94 | - Plug-in and Fragment directories\n\
95 | - Inside Plug-ins and Fragments packaged as JARs\n\
96 | - Sub-directories of the directory named "src" of certain Plug-ins\n\
97 | - Feature directories\n\
98 | \n\
99 | Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
100 | Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
101 | Update License") during the installation process. If the Feature contains\n\
102 | Included Features, the Feature Update License should either provide you\n\
103 | with the terms and conditions governing the Included Features or inform\n\
104 | you where you can locate them. Feature Update Licenses may be found in\n\
105 | the "license" property of files named "feature.properties" found within a Feature.\n\
106 | Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
107 | terms and conditions (or references to such terms and conditions) that\n\
108 | govern your use of the associated Content in that directory.\n\
109 | \n\
110 | THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
111 | TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
112 | SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
113 | \n\
114 | - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
115 | - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
116 | - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
117 | - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
118 | - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
119 | \n\
120 | IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
121 | TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
122 | is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
123 | govern that particular Content.\n\
124 | \n\
125 | \n\Use of Provisioning Technology\n\
126 | \n\
127 | The Eclipse Foundation makes available provisioning software, examples of which include,\n\
128 | but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
129 | the purpose of allowing users to install software, documentation, information and/or\n\
130 | other materials (collectively "Installable Software"). This capability is provided with\n\
131 | the intent of allowing such users to install, extend and update Eclipse-based products.\n\
132 | Information about packaging Installable Software is available at\n\
133 | http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
134 | \n\
135 | You may use Provisioning Technology to allow other parties to install Installable Software.\n\
136 | You shall be responsible for enabling the applicable license agreements relating to the\n\
137 | Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
138 | in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
139 | making it available in accordance with the Specification, you further acknowledge your\n\
140 | agreement to, and the acquisition of all necessary rights to permit the following:\n\
141 | \n\
142 | 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
143 | the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
144 | extending or updating the functionality of an Eclipse-based product.\n\
145 | 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
146 | Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
147 | 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
148 | govern the use of the Installable Software ("Installable Software Agreement") and such\n\
149 | Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
150 | with the Specification. Such Installable Software Agreement must inform the user of the\n\
151 | terms and conditions that govern the Installable Software and must solicit acceptance by\n\
152 | the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
153 | indication of agreement by the user, the provisioning Technology will complete installation\n\
154 | of the Installable Software.\n\
155 | \n\
156 | Cryptography\n\
157 | \n\
158 | Content may contain encryption software. The country in which you are\n\
159 | currently may have restrictions on the import, possession, and use,\n\
160 | and/or re-export to another country, of encryption software. BEFORE\n\
161 | using any encryption software, please check the country's laws,\n\
162 | regulations and policies concerning the import, possession, or use, and\n\
163 | re-export of encryption software, to see if this is permitted.\n\
164 | \n\
165 | Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
166 | ########### end of license property ##########################################
167 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/feature.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | %description
10 |
11 |
12 |
13 | %copyright
14 |
15 |
16 |
17 | %license
18 |
19 |
20 |
26 |
27 |
33 |
34 |
40 |
41 |
47 |
48 |
54 |
55 |
61 |
62 |
68 |
69 |
75 |
76 |
82 |
83 |
89 |
90 |
96 |
97 |
103 |
104 |
110 |
111 |
117 |
118 |
124 |
125 |
131 |
132 |
138 |
139 |
145 |
146 |
152 |
153 |
160 |
161 |
167 |
168 |
174 |
175 |
181 |
182 |
188 |
189 |
195 |
196 |
202 |
203 |
209 |
210 |
216 |
217 |
223 |
224 |
230 |
231 |
237 |
238 |
244 |
245 |
252 |
253 |
254 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
13 |
14 | 4.0.0
15 |
16 |
17 | maildemo
18 | com.eclipsesource
19 | 0.0.1-SNAPSHOT
20 |
21 |
22 | com.eclipsesource
23 | com.eclipsesource.maildemo.tycho.feature
24 | 1.0.0-SNAPSHOT
25 | eclipse-feature
26 |
27 |
28 | ${basedir}/target/WEB-INF
29 |
30 |
31 |
32 |
33 |
34 | ${tycho-groupid}
35 | tycho-packaging-plugin
36 | ${tycho-version}
37 |
38 | true
39 |
40 |
41 |
42 |
43 | maven-resources-plugin
44 | 2.4.3
45 |
46 |
47 | copy-web-inf
48 | package
49 |
50 | copy-resources
51 |
52 |
53 | ${output-directory}
54 |
55 |
56 | ${basedir}/templates/WEB-INF
57 |
58 | **
59 |
60 |
61 |
62 |
63 |
64 |
65 | copy-plugins
66 | package
67 |
68 | copy-resources
69 |
70 |
71 | ${output-directory}/eclipse
72 |
73 |
74 | ${basedir}/target/site
75 |
76 | */**
77 |
78 |
79 | *.jar
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | org.apache.maven.plugins
90 | maven-assembly-plugin
91 | 2.2-beta-5
92 |
93 |
94 | assembly.xml
95 |
96 | maildemo
97 |
98 |
99 |
100 | make-assembly
101 | verify
102 |
103 | single
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/CVS/Entries:
--------------------------------------------------------------------------------
1 | D/eclipse////
2 | /web.xml/1.3/Wed Jan 13 17:17:13 2010//
3 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/CVS/Repository:
--------------------------------------------------------------------------------
1 | org.eclipse.rap/releng/org.eclipse.rap.releng/warbuild/templates/WEB-INF
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/CVS/Root:
--------------------------------------------------------------------------------
1 | :extssh:hstaudacher@dev.eclipse.org:/cvsroot/rt
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/CVS/Template:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/CVS/Template
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/.eclipseproduct:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/.eclipseproduct
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/CVS/Entries:
--------------------------------------------------------------------------------
1 | /.eclipseproduct/1.1/Wed Sep 23 08:17:08 2009//
2 | D/configuration////
3 | /launch.ini/1.1/Wed Sep 23 08:17:08 2009//
4 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/CVS/Repository:
--------------------------------------------------------------------------------
1 | org.eclipse.rap/releng/org.eclipse.rap.releng/warbuild/templates/WEB-INF/eclipse
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/CVS/Root:
--------------------------------------------------------------------------------
1 | :extssh:hstaudacher@dev.eclipse.org:/cvsroot/rt
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/CVS/Template:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/CVS/Template
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/configuration/CVS/Entries:
--------------------------------------------------------------------------------
1 | /config.ini/1.3/Mon Jan 18 11:30:35 2010//
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/configuration/CVS/Repository:
--------------------------------------------------------------------------------
1 | org.eclipse.rap/releng/org.eclipse.rap.releng/warbuild/templates/WEB-INF/eclipse/configuration
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/configuration/CVS/Root:
--------------------------------------------------------------------------------
1 | :extssh:hstaudacher@dev.eclipse.org:/cvsroot/rt
2 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/configuration/CVS/Template:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/configuration/CVS/Template
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/configuration/config.ini:
--------------------------------------------------------------------------------
1 | #Eclipse Runtime Configuration File
2 | osgi.bundles=com.ibm.icu.base@start,\
3 | org.eclipse.core.commands@start,\
4 | org.eclipse.core.contenttype@start,\
5 | org.eclipse.core.expressions@start,\
6 | org.eclipse.core.jobs@start,\
7 | org.eclipse.core.runtime@start,\
8 | org.eclipse.equinox.app@start,\
9 | org.eclipse.equinox.common@2:start,\
10 | org.eclipse.equinox.http.registry@start,\
11 | org.eclipse.equinox.http.servletbridge@start,\
12 | org.eclipse.equinox.http.servlet@start,\
13 | org.eclipse.equinox.preferences@start,\
14 | org.eclipse.equinox.registry@start,\
15 | org.eclipse.equinox.servletbridge.extensionbundle,\
16 | org.eclipse.osgi.services@start,\
17 | org.eclipse.help@start,\
18 | org.eclipse.rap.rwt@start,\
19 | org.eclipse.rap.rwt.q07,\
20 | org.eclipse.rap.jface@start,\
21 | org.eclipse.core.databinding@start,\
22 | org.eclipse.core.databinding.observable@start,\
23 | org.eclipse.core.databinding.property@start,\
24 | org.eclipse.core.databinding.beans@start,\
25 | org.eclipse.rap.jface.databinding@start,\
26 | org.eclipse.rap.ui.forms@start,\
27 | org.eclipse.rap.ui@start,\
28 | org.eclipse.rap.ui.views@start,\
29 | org.eclipse.rap.ui.workbench@start,\
30 | org.eclipse.rap.design.example@start,\
31 | com.eclipsesource.maildemo.tycho@start
32 | osgi.bundles.defaultStartLevel=4
33 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/eclipse/launch.ini:
--------------------------------------------------------------------------------
1 | # Eclipse Runtime Configuration Overrides
2 | # These properties are loaded prior to starting the framework and can also be used to override System Properties
3 | # @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
4 | # "*" can be used together with @null to clear System Properties that match a prefix name.
5 |
6 | osgi.*=@null
7 | org.osgi.*=@null
8 | eclipse.*=@null
9 |
10 | osgi.parentClassloader=app
11 | osgi.contextClassLoaderParent=app
12 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/lib/org.eclipse.equinox.servletbridge_1.2.0.v20091026.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/lib/org.eclipse.equinox.servletbridge_1.2.0.v20091026.jar
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho.feature/templates/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | equinoxbridgeservlet
6 | Equinox Bridge Servlet
7 | Equinox Bridge Servlet
8 | org.eclipse.equinox.servletbridge.BridgeServlet
9 |
10 |
12 |
18 |
19 |
20 |
21 | commandline
22 | -registryMultiLanguage
23 |
24 |
25 |
27 |
28 | enableFrameworkControls
29 | false
30 |
31 |
32 |
38 |
39 | extendedFrameworkExports
40 |
41 |
42 |
43 |
51 |
62 |
63 | overrideAndReplaceExtensionBundle
64 | true
65 |
66 | 1
67 |
68 |
69 | equinoxbridgeservlet
70 | /*
71 |
72 |
75 |
76 | equinoxbridgeservlet
77 | *.jsp
78 |
79 |
80 |
81 | 5
82 |
83 |
84 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | bin
3 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.eclipsesource.maildemo.tycho
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Tue Jan 04 14:34:54 CET 2011
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.source=1.6
9 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: %Bundle-Name
4 | Bundle-SymbolicName: com.eclipsesource.maildemo.tycho; singleton:=true
5 | Bundle-Version: 1.0.0.qualifier
6 | Bundle-Activator: com.eclipsesource.maildemo.tycho.Activator
7 | Bundle-Vendor: %Bundle-Vendor
8 | Require-Bundle: org.eclipse.rap.ui
9 | Bundle-RequiredExecutionEnvironment: JavaSE-1.6
10 | Bundle-ActivationPolicy: lazy
11 | Bundle-Localization: plugin
12 | Import-Package: javax.servlet,
13 | javax.servlet.http
14 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = plugin.xml,\
4 | META-INF/,\
5 | .,\
6 | icons/,\
7 | plugin.properties
8 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/com.eclipsesource.maildemo.tycho.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/icons/sample.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho/icons/sample.gif
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/icons/sample2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho/icons/sample2.gif
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/icons/sample3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/tycho/com.eclipsesource.maildemo.tycho/icons/sample3.gif
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/plugin.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2011 EclipseSource Inc. and others.
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # EclipseSource - initial API and implementation
10 | ###############################################################################
11 |
12 | # MANIFEST.MF
13 | Bundle-Vendor = EclipseSource
14 | Bundle-Name = RAP Maildemo build with Tycho
15 |
16 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
11 |
12 |
13 |
15 |
19 |
20 |
21 |
23 |
29 |
30 |
35 |
36 |
37 |
39 |
42 |
43 |
48 |
49 |
54 |
55 |
56 |
58 |
64 |
68 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | maildemo
7 | com.eclipsesource
8 | 0.0.1-SNAPSHOT
9 |
10 | com.eclipsesource
11 | com.eclipsesource.maildemo.tycho
12 | 1.0.0-SNAPSHOT
13 | eclipse-plugin
14 |
15 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/AboutAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchWindow;
6 |
7 | /**
8 | * Opens an "About RAP" message dialog.
9 | */
10 | public class AboutAction extends Action {
11 |
12 | private final IWorkbenchWindow window;
13 |
14 | public AboutAction(IWorkbenchWindow window) {
15 | super("About");
16 | setId(this.getClass().getName());
17 | this.window = window;
18 | }
19 |
20 | public void run() {
21 | if(window != null) {
22 | String title = "About RAP";
23 | String msg = "RAP Mail template created by PDE.\n\n"
24 | + "You can learn more about RAP at:\n\n"
25 | + "http://www.eclipse.org/rap";
26 | MessageDialog.openInformation( window.getShell(), title, msg );
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/Application.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.rwt.lifecycle.IEntryPoint;
4 | import org.eclipse.swt.widgets.Display;
5 | import org.eclipse.ui.PlatformUI;
6 | import org.eclipse.ui.application.WorkbenchAdvisor;
7 |
8 | /**
9 | * This class controls all aspects of the application's execution
10 | * and is contributed through the plugin.xml.
11 | */
12 | public class Application implements IEntryPoint {
13 |
14 | public int createUI() {
15 | Display display = PlatformUI.createDisplay();
16 | WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17 | return PlatformUI.createAndRunWorkbench( display, advisor );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/ApplicationActionBarAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.action.GroupMarker;
5 | import org.eclipse.jface.action.IAction;
6 | import org.eclipse.jface.action.ICoolBarManager;
7 | import org.eclipse.jface.action.IMenuManager;
8 | import org.eclipse.jface.action.IToolBarManager;
9 | import org.eclipse.jface.action.MenuManager;
10 | import org.eclipse.jface.action.Separator;
11 | import org.eclipse.jface.action.ToolBarContributionItem;
12 | import org.eclipse.jface.action.ToolBarManager;
13 | import org.eclipse.swt.SWT;
14 | import org.eclipse.ui.IWorkbenchActionConstants;
15 | import org.eclipse.ui.IWorkbenchWindow;
16 | import org.eclipse.ui.actions.ActionFactory;
17 | import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
18 | import org.eclipse.ui.application.ActionBarAdvisor;
19 | import org.eclipse.ui.application.IActionBarConfigurer;
20 |
21 | /**
22 | * An action bar advisor is responsible for creating, adding, and disposing of the
23 | * actions added to a workbench window. Each window will be populated with
24 | * new actions.
25 | */
26 | public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
27 |
28 | // Actions - important to allocate these only in makeActions, and then use them
29 | // in the fill methods. This ensures that the actions aren't recreated
30 | // when fillActionBars is called with FILL_PROXY.
31 | private IWorkbenchAction exitAction;
32 | private IAction aboutAction;
33 | private OpenViewAction openViewAction;
34 | private Action messagePopupAction;
35 |
36 |
37 | public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
38 | super(configurer);
39 | }
40 |
41 | protected void makeActions(final IWorkbenchWindow window) {
42 | // Creates the actions and registers them.
43 | // Registering is needed to ensure that key bindings work.
44 | // The corresponding commands keybindings are defined in the plugin.xml file.
45 | // Registering also provides automatic disposal of the actions when
46 | // the window is closed.
47 |
48 | exitAction = ActionFactory.QUIT.create(window);
49 | register(exitAction);
50 |
51 | aboutAction = new AboutAction(window);
52 | register(aboutAction);
53 |
54 | openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
55 | register(openViewAction);
56 |
57 | messagePopupAction = new MessagePopupAction("Open Message", window);
58 | register(messagePopupAction);
59 | }
60 |
61 | protected void fillMenuBar(IMenuManager menuBar) {
62 | MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
63 | MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
64 |
65 | menuBar.add(fileMenu);
66 | // Add a group marker indicating where action set menus will appear.
67 | menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
68 | menuBar.add(helpMenu);
69 |
70 | // File
71 | fileMenu.add(messagePopupAction);
72 | fileMenu.add(openViewAction);
73 | fileMenu.add(new Separator());
74 | fileMenu.add(exitAction);
75 |
76 | // Help
77 | helpMenu.add(aboutAction);
78 | }
79 |
80 | protected void fillCoolBar(ICoolBarManager coolBar) {
81 | IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
82 | coolBar.add(new ToolBarContributionItem(toolbar, "main"));
83 | toolbar.add(openViewAction);
84 | toolbar.add(messagePopupAction);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/ApplicationWorkbenchAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
4 | import org.eclipse.ui.application.WorkbenchAdvisor;
5 | import org.eclipse.ui.application.WorkbenchWindowAdvisor;
6 |
7 | /**
8 | * This workbench advisor creates the window advisor, and specifies
9 | * the perspective id for the initial window.
10 | */
11 | public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
12 |
13 | private static final String PERSPECTIVE_ID = "com.eclipsesource.maildemo.tycho.perspective";
14 |
15 | public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
16 | return new ApplicationWorkbenchWindowAdvisor(configurer);
17 | }
18 |
19 | public String getInitialWindowPerspectiveId() {
20 | return PERSPECTIVE_ID;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/ApplicationWorkbenchWindowAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.swt.graphics.Point;
4 | import org.eclipse.ui.application.ActionBarAdvisor;
5 | import org.eclipse.ui.application.IActionBarConfigurer;
6 | import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
7 | import org.eclipse.ui.application.WorkbenchWindowAdvisor;
8 |
9 | /**
10 | * Configures the initial size and appearance of a workbench window.
11 | */
12 | public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
13 |
14 | public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
15 | super(configurer);
16 | }
17 |
18 | public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
19 | return new ApplicationActionBarAdvisor(configurer);
20 | }
21 |
22 | public void preWindowOpen() {
23 | IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
24 | configurer.setInitialSize(new Point(600, 400));
25 | configurer.setShowCoolBar(true);
26 | configurer.setShowStatusLine(false);
27 | configurer.setTitle("RAP Mail Template build with Tycho");
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/ICommandIds.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | /**
4 | * Interface defining the application's command IDs.
5 | * Key bindings can be defined for specific commands.
6 | * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
7 | *
8 | * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
9 | */
10 | public interface ICommandIds {
11 |
12 | public static final String CMD_OPEN = "com.eclipsesource.maildemo.tycho.open";
13 | public static final String CMD_OPEN_MESSAGE = "com.eclipsesource.maildemo.tycho.openMessage";
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/MessagePopupAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchWindow;
6 | import org.eclipse.ui.plugin.AbstractUIPlugin;
7 |
8 | /**
9 | * When run, this action will show a message dialog.
10 | */
11 | public class MessagePopupAction extends Action {
12 |
13 | private final IWorkbenchWindow window;
14 |
15 | MessagePopupAction(String text, IWorkbenchWindow window) {
16 | super(text);
17 | this.window = window;
18 | // The id is used to refer to the action in a menu or toolbar
19 | setId(ICommandIds.CMD_OPEN_MESSAGE);
20 | // Associate the action with a pre-defined command, to allow key bindings.
21 | setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
22 | setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("com.eclipsesource.maildemo.tycho", "/icons/sample3.gif"));
23 | }
24 |
25 | public void run() {
26 | MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
27 | }
28 | }
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/NavigationView.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import java.util.ArrayList;
4 |
5 | import org.eclipse.jface.viewers.IStructuredContentProvider;
6 | import org.eclipse.jface.viewers.ITreeContentProvider;
7 | import org.eclipse.jface.viewers.LabelProvider;
8 | import org.eclipse.jface.viewers.TreeViewer;
9 | import org.eclipse.jface.viewers.Viewer;
10 | import org.eclipse.swt.SWT;
11 | import org.eclipse.swt.graphics.Image;
12 | import org.eclipse.swt.widgets.Composite;
13 | import org.eclipse.ui.ISharedImages;
14 | import org.eclipse.ui.PlatformUI;
15 | import org.eclipse.ui.part.ViewPart;
16 |
17 | /**
18 | * View with a tree viewer. This class is contributed through the plugin.xml.
19 | */
20 | public class NavigationView extends ViewPart {
21 | public static final String ID = "com.eclipsesource.maildemo.tycho.navigationView";
22 | private TreeViewer viewer;
23 |
24 | class TreeObject {
25 | private String name;
26 | private TreeParent parent;
27 |
28 | public TreeObject(String name) {
29 | this.name = name;
30 | }
31 | public String getName() {
32 | return name;
33 | }
34 | public void setParent(TreeParent parent) {
35 | this.parent = parent;
36 | }
37 | public TreeParent getParent() {
38 | return parent;
39 | }
40 | public String toString() {
41 | return getName();
42 | }
43 | }
44 |
45 | class TreeParent extends TreeObject {
46 | private ArrayList children;
47 | public TreeParent(String name) {
48 | super(name);
49 | children = new ArrayList();
50 | }
51 | public void addChild(TreeObject child) {
52 | children.add(child);
53 | child.setParent(this);
54 | }
55 | public void removeChild(TreeObject child) {
56 | children.remove(child);
57 | child.setParent(null);
58 | }
59 | public TreeObject[] getChildren() {
60 | return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
61 | }
62 | public boolean hasChildren() {
63 | return children.size()>0;
64 | }
65 | }
66 |
67 | class ViewContentProvider implements IStructuredContentProvider,
68 | ITreeContentProvider {
69 |
70 | public void inputChanged(Viewer v, Object oldInput, Object newInput) {
71 | }
72 |
73 | public void dispose() {
74 | }
75 |
76 | public Object[] getElements(Object parent) {
77 | return getChildren(parent);
78 | }
79 |
80 | public Object getParent(Object child) {
81 | if (child instanceof TreeObject) {
82 | return ((TreeObject)child).getParent();
83 | }
84 | return null;
85 | }
86 |
87 | public Object[] getChildren(Object parent) {
88 | if (parent instanceof TreeParent) {
89 | return ((TreeParent)parent).getChildren();
90 | }
91 | return new Object[0];
92 | }
93 |
94 | public boolean hasChildren(Object parent) {
95 | if (parent instanceof TreeParent)
96 | return ((TreeParent)parent).hasChildren();
97 | return false;
98 | }
99 | }
100 |
101 | class ViewLabelProvider extends LabelProvider {
102 |
103 | public String getText(Object obj) {
104 | return obj.toString();
105 | }
106 | public Image getImage(Object obj) {
107 | String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
108 | if (obj instanceof TreeParent)
109 | imageKey = ISharedImages.IMG_OBJ_FOLDER;
110 | return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
111 | }
112 | }
113 |
114 | /**
115 | * We will set up a dummy model to initialize tree heararchy. In real
116 | * code, you will connect to a real model and expose its hierarchy.
117 | */
118 | private TreeObject createDummyModel() {
119 | TreeObject to1 = new TreeObject("Inbox");
120 | TreeObject to2 = new TreeObject("Drafts");
121 | TreeObject to3 = new TreeObject("Sent");
122 | TreeParent p1 = new TreeParent("me@this.com");
123 | p1.addChild(to1);
124 | p1.addChild(to2);
125 | p1.addChild(to3);
126 |
127 | TreeObject to4 = new TreeObject("Inbox");
128 | TreeParent p2 = new TreeParent("other@aol.com");
129 | p2.addChild(to4);
130 |
131 | TreeParent root = new TreeParent("");
132 | root.addChild(p1);
133 | root.addChild(p2);
134 | return root;
135 | }
136 |
137 | /**
138 | * This is a callback that will allow us to create the viewer and initialize
139 | * it.
140 | */
141 | public void createPartControl(Composite parent) {
142 | viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
143 | viewer.setContentProvider(new ViewContentProvider());
144 | viewer.setLabelProvider(new ViewLabelProvider());
145 | viewer.setInput(createDummyModel());
146 | }
147 |
148 | /**
149 | * Passing the focus request to the viewer's control.
150 | */
151 | public void setFocus() {
152 | viewer.getControl().setFocus();
153 | }
154 | }
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/OpenViewAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchPage;
6 | import org.eclipse.ui.IWorkbenchWindow;
7 | import org.eclipse.ui.PartInitException;
8 | import org.eclipse.ui.plugin.AbstractUIPlugin;
9 |
10 | /**
11 | * When run, this action will open another instance of a view.
12 | */
13 | public class OpenViewAction extends Action {
14 |
15 | private final IWorkbenchWindow window;
16 | private int instanceNum = 0;
17 | private final String viewId;
18 |
19 | public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
20 | this.window = window;
21 | this.viewId = viewId;
22 | setText(label);
23 | // The id is used to refer to the action in a menu or toolbar
24 | setId(ICommandIds.CMD_OPEN);
25 | // Associate the action with a pre-defined command, to allow key bindings.
26 | setActionDefinitionId(ICommandIds.CMD_OPEN);
27 | setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("com.eclipsesource.maildemo.tycho", "/icons/sample2.gif"));
28 | }
29 |
30 | public void run() {
31 | if(window != null) {
32 | try {
33 | window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
34 | } catch (PartInitException e) {
35 | MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/Perspective.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.ui.IFolderLayout;
4 | import org.eclipse.ui.IPageLayout;
5 | import org.eclipse.ui.IPerspectiveFactory;
6 |
7 | /**
8 | * Configures the perspective layout. This class is contributed through the
9 | * plugin.xml.
10 | */
11 | public class Perspective implements IPerspectiveFactory {
12 |
13 | public void createInitialLayout(IPageLayout layout) {
14 | String editorArea = layout.getEditorArea();
15 | layout.setEditorAreaVisible(false);
16 |
17 | layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
18 | IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
19 | folder.addPlaceholder(View.ID + ":*");
20 | folder.addView(View.ID);
21 |
22 | layout.getViewLayout(NavigationView.ID).setCloseable(false);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/View.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.dialogs.MessageDialog;
4 | import org.eclipse.jface.resource.JFaceResources;
5 | import org.eclipse.swt.SWT;
6 | import org.eclipse.swt.events.SelectionAdapter;
7 | import org.eclipse.swt.events.SelectionEvent;
8 | import org.eclipse.swt.graphics.Font;
9 | import org.eclipse.swt.layout.GridData;
10 | import org.eclipse.swt.layout.GridLayout;
11 | import org.eclipse.swt.widgets.Composite;
12 | import org.eclipse.swt.widgets.Label;
13 | import org.eclipse.swt.widgets.Link;
14 | import org.eclipse.swt.widgets.Text;
15 | import org.eclipse.ui.part.ViewPart;
16 |
17 | /**
18 | * This view shows a "mail message". This class is contributed through
19 | * the plugin.xml.
20 | */
21 | public class View extends ViewPart {
22 |
23 | public static final String ID = "com.eclipsesource.maildemo.tycho.view";
24 |
25 | public void createPartControl(Composite parent) {
26 | Composite top = new Composite(parent, SWT.NONE);
27 | GridLayout layout = new GridLayout();
28 | layout.marginHeight = 0;
29 | layout.marginWidth = 0;
30 | top.setLayout(layout);
31 | // top banner
32 | Composite banner = new Composite(top, SWT.NONE);
33 | banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
34 | layout = new GridLayout();
35 | layout.marginHeight = 5;
36 | layout.marginWidth = 10;
37 | layout.numColumns = 2;
38 | banner.setLayout(layout);
39 |
40 | // setup bold font
41 | Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
42 |
43 | Label l = new Label(banner, SWT.WRAP);
44 | l.setText("Subject:");
45 | l.setFont(boldFont);
46 | l = new Label(banner, SWT.WRAP);
47 | l.setText("This is a message about the cool Eclipse RCP!");
48 |
49 | l = new Label(banner, SWT.WRAP);
50 | l.setText("From:");
51 | l.setFont(boldFont);
52 |
53 | final Link link = new Link(banner, SWT.NONE);
54 | link.setText("nicole@mail.org");
55 | link.addSelectionListener(new SelectionAdapter() {
56 | public void widgetSelected(SelectionEvent e) {
57 | MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
58 | }
59 | });
60 |
61 | l = new Label(banner, SWT.WRAP);
62 | l.setText("Date:");
63 | l.setFont(boldFont);
64 | l = new Label(banner, SWT.WRAP);
65 | l.setText("10:34 am");
66 | // message contents
67 | Text text = new Text(top, SWT.MULTI | SWT.WRAP);
68 | text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
69 | "- add a top-level menu and toolbar with actions\n"+
70 | "- create views that can't be closed and\n"+
71 | " multiple instances of the same view\n"+
72 | "- perspectives with placeholders for new views\n"+
73 | "- use the default about dialog\n" );
74 | text.setLayoutData(new GridData(GridData.FILL_BOTH));
75 | }
76 |
77 | public void setFocus() {
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/tycho/com.eclipsesource.maildemo.tycho/src/com/eclipsesource/maildemo/tycho/Activator.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo.tycho;
2 |
3 | import org.eclipse.jface.resource.ImageDescriptor;
4 | import org.eclipse.ui.plugin.AbstractUIPlugin;
5 | import org.osgi.framework.BundleContext;
6 |
7 | /**
8 | * The activator class controls the plug-in life cycle
9 | */
10 | public class Activator extends AbstractUIPlugin {
11 |
12 | // The plug-in ID
13 | public static final String PLUGIN_ID = "com.eclipsesource.maildemo.tycho"; //$NON-NLS-1$
14 |
15 | // The shared instance
16 | private static Activator plugin;
17 |
18 | /**
19 | * The constructor
20 | */
21 | public Activator() {
22 | }
23 |
24 | /*
25 | * (non-Javadoc)
26 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
27 | */
28 | public void start(BundleContext context) throws Exception {
29 | super.start(context);
30 | plugin = this;
31 | }
32 |
33 | /*
34 | * (non-Javadoc)
35 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
36 | */
37 | public void stop(BundleContext context) throws Exception {
38 | plugin = null;
39 | super.stop(context);
40 | }
41 |
42 | /**
43 | * Returns the shared instance
44 | *
45 | * @return the shared instance
46 | */
47 | public static Activator getDefault() {
48 | return plugin;
49 | }
50 |
51 | /**
52 | * Returns an image descriptor for the image file at the given
53 | * plug-in relative path
54 | *
55 | * @param path the path
56 | * @return the image descriptor
57 | */
58 | public static ImageDescriptor getImageDescriptor(String path) {
59 | return imageDescriptorFromPlugin(PLUGIN_ID, path);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/tycho/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
13 | 4.0.0
14 |
15 |
16 | 3.0
17 |
18 |
19 | com.eclipsesource
20 | maildemo
21 | 0.0.1-SNAPSHOT
22 | pom
23 |
24 | EclipseSource Maildemo Tycho build
25 |
26 |
27 | http://download.eclipse.org/releases/indigo/
28 | http://download.eclipse.org/tools/orbit/downloads/drops/R20110523182458/repository/
29 | UTF-8
30 | 0.12.0
31 | org.eclipse.tycho
32 |
33 |
34 |
35 | com.eclipsesource.maildemo.tycho
36 | com.eclipsesource.maildemo.tycho.feature
37 |
38 |
39 |
40 |
41 | indigo
42 | p2
43 | ${indigo-site}
44 |
45 |
46 | orbit
47 | p2
48 | ${orbit-site}
49 |
50 |
51 |
52 |
53 |
54 |
55 | ${tycho-groupid}
56 | tycho-maven-plugin
57 | ${tycho-version}
58 | true
59 |
60 |
61 |
62 | ${tycho-groupid}
63 | tycho-compiler-plugin
64 | ${tycho-version}
65 |
66 | ${project-build-sourceEncoding}
67 |
68 |
69 |
70 |
71 | ${tycho-groupid}
72 | target-platform-configuration
73 | ${tycho-version}
74 |
75 | p2
76 | true
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/warproducts/README:
--------------------------------------------------------------------------------
1 | == RAP Tycho build example ==
2 |
3 | This repository contains one bundle (which contains a RAP application) to
4 | demonstrate how to build a RAP application with the WAR Products Tooling.
5 |
6 | === Usage ===
7 |
8 | * Install the WAR Products Tooling. Follow the steps described on this Wiki page:
9 | http://wiki.eclipse.org/RAP/Equinox_WAR_products#Download.2FInstall
10 | * Make sure your target is RAP 1.4 M5 or higher.
11 | * Clone the repository and import the bundle com.eclipsesource.maildemo.warproducts
12 | into your workspace.
13 | * Open the maildemo.warproduct file with the WAR Product editor.
14 | * Use the Export Wizard by clicking on the right corner's export icon.
15 | * Choose a location and a name for the war file, e.g. maildemo.war.
16 | * Deploy the maildemo.war to the servlet container of your choice.
17 |
18 | === Support ===
19 |
20 | If you run into problems please use the RAP newsgroup to get help:
21 | http://www.eclipse.org/forums/index.php?t=thread&frm_id=34&S=7af935de3aca30bd299a973485307ada
22 |
23 | === Further information ===
24 |
25 | http://eclipse.org/rap
26 | http://eclipsesource.com/blogs/2011/02/02/equinoxrap-war-products-has-moved-hello-eclipse-libra/
27 | http://wiki.eclipse.org/RAP/Equinox_WAR_products
28 | http://eclipse.org/libra
29 |
30 | === License ===
31 |
32 | All files are published under the terms of the Eclipse Public License v1.0
33 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | bin
3 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.eclipsesource.maildemo.warproducts
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Tue Jan 04 14:34:54 CET 2011
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8 | org.eclipse.jdt.core.compiler.source=1.6
9 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: %Bundle-Name
4 | Bundle-SymbolicName: com.eclipsesource.maildemo.warproducts;singleton:=true
5 | Bundle-Version: 1.0.0.qualifier
6 | Bundle-Activator: com.eclipsesource.maildemo.warproducts.Activator
7 | Bundle-Vendor: %Bundle-Vendor
8 | Require-Bundle: org.eclipse.rap.ui
9 | Bundle-RequiredExecutionEnvironment: JavaSE-1.6
10 | Bundle-ActivationPolicy: lazy
11 | Bundle-Localization: plugin
12 | Import-Package: javax.servlet;version="2.4.0",
13 | javax.servlet.http;version="2.4.0"
14 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/WEB-INF/launch.ini:
--------------------------------------------------------------------------------
1 | # Eclipse Runtime Configuration Overrides
2 | # These properties are loaded prior to starting the framework and can also be used to override System Properties
3 | # @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
4 | # "*" can be used together with @null to clear System Properties that match a prefix name.
5 |
6 | osgi.*=@null
7 | org.osgi.*=@null
8 | eclipse.*=@null
9 |
10 | osgi.parentClassloader=app
11 | osgi.contextClassLoaderParent=app
12 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | equinoxbridgeservlet
6 | Equinox Bridge Servlet
7 | Equinox Bridge Servlet
8 | org.eclipse.equinox.servletbridge.BridgeServlet
9 |
10 |
12 |
13 | enableFrameworkControls
14 | false
15 |
16 |
17 |
18 |
21 |
22 | commandline
23 | -registryMultiLanguage
24 |
25 |
26 | 1
27 |
28 |
29 |
30 | equinoxbridgeservlet
31 | /*
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = plugin.xml,\
4 | META-INF/,\
5 | .,\
6 | icons/,\
7 | plugin.properties
8 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/com.eclipsesource.maildemo.warproducts.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/icons/sample.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/warproducts/com.eclipsesource.maildemo.warproducts/icons/sample.gif
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/icons/sample2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/warproducts/com.eclipsesource.maildemo.warproducts/icons/sample2.gif
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/icons/sample3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/org.eclipse.rap.build.examples/2edd1f9198093a84486c5bc1de06d5b12fe59cd5/warproducts/com.eclipsesource.maildemo.warproducts/icons/sample3.gif
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/maildemo.warproduct:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/plugin.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2011 EclipseSource Inc. and others.
3 | # All rights reserved. This program and the accompanying materials
4 | # are made available under the terms of the Eclipse Public License v1.0
5 | # which accompanies this distribution, and is available at
6 | # http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # EclipseSource - initial API and implementation
10 | ###############################################################################
11 |
12 | # MANIFEST.MF
13 | Bundle-Vendor = EclipseSource
14 | Bundle-Name = RAP Maildemo build with Tycho
15 |
16 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
11 |
12 |
13 |
15 |
19 |
20 |
21 |
23 |
29 |
30 |
35 |
36 |
37 |
39 |
42 |
43 |
48 |
49 |
54 |
55 |
56 |
58 |
64 |
68 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/AboutAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchWindow;
6 |
7 | /**
8 | * Opens an "About RAP" message dialog.
9 | */
10 | public class AboutAction extends Action {
11 |
12 | private final IWorkbenchWindow window;
13 |
14 | public AboutAction(IWorkbenchWindow window) {
15 | super("About");
16 | setId(this.getClass().getName());
17 | this.window = window;
18 | }
19 |
20 | public void run() {
21 | if(window != null) {
22 | String title = "About RAP";
23 | String msg = "RAP Mail template created by PDE.\n\n"
24 | + "You can learn more about RAP at:\n\n"
25 | + "http://www.eclipse.org/rap";
26 | MessageDialog.openInformation( window.getShell(), title, msg );
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/Application.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.rwt.lifecycle.IEntryPoint;
4 | import org.eclipse.swt.widgets.Display;
5 | import org.eclipse.ui.PlatformUI;
6 | import org.eclipse.ui.application.WorkbenchAdvisor;
7 |
8 | /**
9 | * This class controls all aspects of the application's execution
10 | * and is contributed through the plugin.xml.
11 | */
12 | public class Application implements IEntryPoint {
13 |
14 | public int createUI() {
15 | Display display = PlatformUI.createDisplay();
16 | WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17 | return PlatformUI.createAndRunWorkbench( display, advisor );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/ApplicationActionBarAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.action.GroupMarker;
5 | import org.eclipse.jface.action.IAction;
6 | import org.eclipse.jface.action.ICoolBarManager;
7 | import org.eclipse.jface.action.IMenuManager;
8 | import org.eclipse.jface.action.IToolBarManager;
9 | import org.eclipse.jface.action.MenuManager;
10 | import org.eclipse.jface.action.Separator;
11 | import org.eclipse.jface.action.ToolBarContributionItem;
12 | import org.eclipse.jface.action.ToolBarManager;
13 | import org.eclipse.swt.SWT;
14 | import org.eclipse.ui.IWorkbenchActionConstants;
15 | import org.eclipse.ui.IWorkbenchWindow;
16 | import org.eclipse.ui.actions.ActionFactory;
17 | import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
18 | import org.eclipse.ui.application.ActionBarAdvisor;
19 | import org.eclipse.ui.application.IActionBarConfigurer;
20 |
21 | /**
22 | * An action bar advisor is responsible for creating, adding, and disposing of the
23 | * actions added to a workbench window. Each window will be populated with
24 | * new actions.
25 | */
26 | public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
27 |
28 | // Actions - important to allocate these only in makeActions, and then use them
29 | // in the fill methods. This ensures that the actions aren't recreated
30 | // when fillActionBars is called with FILL_PROXY.
31 | private IWorkbenchAction exitAction;
32 | private IAction aboutAction;
33 | private OpenViewAction openViewAction;
34 | private Action messagePopupAction;
35 |
36 |
37 | public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
38 | super(configurer);
39 | }
40 |
41 | protected void makeActions(final IWorkbenchWindow window) {
42 | // Creates the actions and registers them.
43 | // Registering is needed to ensure that key bindings work.
44 | // The corresponding commands keybindings are defined in the plugin.xml file.
45 | // Registering also provides automatic disposal of the actions when
46 | // the window is closed.
47 |
48 | exitAction = ActionFactory.QUIT.create(window);
49 | register(exitAction);
50 |
51 | aboutAction = new AboutAction(window);
52 | register(aboutAction);
53 |
54 | openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
55 | register(openViewAction);
56 |
57 | messagePopupAction = new MessagePopupAction("Open Message", window);
58 | register(messagePopupAction);
59 | }
60 |
61 | protected void fillMenuBar(IMenuManager menuBar) {
62 | MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
63 | MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
64 |
65 | menuBar.add(fileMenu);
66 | // Add a group marker indicating where action set menus will appear.
67 | menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
68 | menuBar.add(helpMenu);
69 |
70 | // File
71 | fileMenu.add(messagePopupAction);
72 | fileMenu.add(openViewAction);
73 | fileMenu.add(new Separator());
74 | fileMenu.add(exitAction);
75 |
76 | // Help
77 | helpMenu.add(aboutAction);
78 | }
79 |
80 | protected void fillCoolBar(ICoolBarManager coolBar) {
81 | IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
82 | coolBar.add(new ToolBarContributionItem(toolbar, "main"));
83 | toolbar.add(openViewAction);
84 | toolbar.add(messagePopupAction);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/ApplicationWorkbenchAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
4 | import org.eclipse.ui.application.WorkbenchAdvisor;
5 | import org.eclipse.ui.application.WorkbenchWindowAdvisor;
6 |
7 | /**
8 | * This workbench advisor creates the window advisor, and specifies
9 | * the perspective id for the initial window.
10 | */
11 | public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
12 |
13 | private static final String PERSPECTIVE_ID = "com.eclipsesource.maildemo.warproducts.perspective";
14 |
15 | public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
16 | return new ApplicationWorkbenchWindowAdvisor(configurer);
17 | }
18 |
19 | public String getInitialWindowPerspectiveId() {
20 | return PERSPECTIVE_ID;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/ApplicationWorkbenchWindowAdvisor.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.swt.graphics.Point;
4 | import org.eclipse.ui.application.ActionBarAdvisor;
5 | import org.eclipse.ui.application.IActionBarConfigurer;
6 | import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
7 | import org.eclipse.ui.application.WorkbenchWindowAdvisor;
8 |
9 | /**
10 | * Configures the initial size and appearance of a workbench window.
11 | */
12 | public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
13 |
14 | public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
15 | super(configurer);
16 | }
17 |
18 | public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
19 | return new ApplicationActionBarAdvisor(configurer);
20 | }
21 |
22 | public void preWindowOpen() {
23 | IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
24 | configurer.setInitialSize(new Point(600, 400));
25 | configurer.setShowCoolBar(true);
26 | configurer.setShowStatusLine(false);
27 | configurer.setTitle("RAP Mail Template build with Tycho");
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/ICommandIds.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | /**
4 | * Interface defining the application's command IDs.
5 | * Key bindings can be defined for specific commands.
6 | * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
7 | *
8 | * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
9 | */
10 | public interface ICommandIds {
11 |
12 | public static final String CMD_OPEN = "com.eclipsesource.maildemo.warproducts.open";
13 | public static final String CMD_OPEN_MESSAGE = "com.eclipsesource.maildemo.warproducts.openMessage";
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/MessagePopupAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchWindow;
6 | import org.eclipse.ui.plugin.AbstractUIPlugin;
7 |
8 | /**
9 | * When run, this action will show a message dialog.
10 | */
11 | public class MessagePopupAction extends Action {
12 |
13 | private final IWorkbenchWindow window;
14 |
15 | MessagePopupAction(String text, IWorkbenchWindow window) {
16 | super(text);
17 | this.window = window;
18 | // The id is used to refer to the action in a menu or toolbar
19 | setId(ICommandIds.CMD_OPEN_MESSAGE);
20 | // Associate the action with a pre-defined command, to allow key bindings.
21 | setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
22 | setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("com.eclipsesource.maildemo.tycho", "/icons/sample3.gif"));
23 | }
24 |
25 | public void run() {
26 | MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
27 | }
28 | }
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/NavigationView.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import java.util.ArrayList;
4 |
5 | import org.eclipse.jface.viewers.IStructuredContentProvider;
6 | import org.eclipse.jface.viewers.ITreeContentProvider;
7 | import org.eclipse.jface.viewers.LabelProvider;
8 | import org.eclipse.jface.viewers.TreeViewer;
9 | import org.eclipse.jface.viewers.Viewer;
10 | import org.eclipse.swt.SWT;
11 | import org.eclipse.swt.graphics.Image;
12 | import org.eclipse.swt.widgets.Composite;
13 | import org.eclipse.ui.ISharedImages;
14 | import org.eclipse.ui.PlatformUI;
15 | import org.eclipse.ui.part.ViewPart;
16 |
17 | /**
18 | * View with a tree viewer. This class is contributed through the plugin.xml.
19 | */
20 | public class NavigationView extends ViewPart {
21 | public static final String ID = "com.eclipsesource.maildemo.warproducts.navigationView";
22 | private TreeViewer viewer;
23 |
24 | class TreeObject {
25 | private String name;
26 | private TreeParent parent;
27 |
28 | public TreeObject(String name) {
29 | this.name = name;
30 | }
31 | public String getName() {
32 | return name;
33 | }
34 | public void setParent(TreeParent parent) {
35 | this.parent = parent;
36 | }
37 | public TreeParent getParent() {
38 | return parent;
39 | }
40 | public String toString() {
41 | return getName();
42 | }
43 | }
44 |
45 | class TreeParent extends TreeObject {
46 | private ArrayList children;
47 | public TreeParent(String name) {
48 | super(name);
49 | children = new ArrayList();
50 | }
51 | public void addChild(TreeObject child) {
52 | children.add(child);
53 | child.setParent(this);
54 | }
55 | public void removeChild(TreeObject child) {
56 | children.remove(child);
57 | child.setParent(null);
58 | }
59 | public TreeObject[] getChildren() {
60 | return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
61 | }
62 | public boolean hasChildren() {
63 | return children.size()>0;
64 | }
65 | }
66 |
67 | class ViewContentProvider implements IStructuredContentProvider,
68 | ITreeContentProvider {
69 |
70 | public void inputChanged(Viewer v, Object oldInput, Object newInput) {
71 | }
72 |
73 | public void dispose() {
74 | }
75 |
76 | public Object[] getElements(Object parent) {
77 | return getChildren(parent);
78 | }
79 |
80 | public Object getParent(Object child) {
81 | if (child instanceof TreeObject) {
82 | return ((TreeObject)child).getParent();
83 | }
84 | return null;
85 | }
86 |
87 | public Object[] getChildren(Object parent) {
88 | if (parent instanceof TreeParent) {
89 | return ((TreeParent)parent).getChildren();
90 | }
91 | return new Object[0];
92 | }
93 |
94 | public boolean hasChildren(Object parent) {
95 | if (parent instanceof TreeParent)
96 | return ((TreeParent)parent).hasChildren();
97 | return false;
98 | }
99 | }
100 |
101 | class ViewLabelProvider extends LabelProvider {
102 |
103 | public String getText(Object obj) {
104 | return obj.toString();
105 | }
106 | public Image getImage(Object obj) {
107 | String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
108 | if (obj instanceof TreeParent)
109 | imageKey = ISharedImages.IMG_OBJ_FOLDER;
110 | return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
111 | }
112 | }
113 |
114 | /**
115 | * We will set up a dummy model to initialize tree heararchy. In real
116 | * code, you will connect to a real model and expose its hierarchy.
117 | */
118 | private TreeObject createDummyModel() {
119 | TreeObject to1 = new TreeObject("Inbox");
120 | TreeObject to2 = new TreeObject("Drafts");
121 | TreeObject to3 = new TreeObject("Sent");
122 | TreeParent p1 = new TreeParent("me@this.com");
123 | p1.addChild(to1);
124 | p1.addChild(to2);
125 | p1.addChild(to3);
126 |
127 | TreeObject to4 = new TreeObject("Inbox");
128 | TreeParent p2 = new TreeParent("other@aol.com");
129 | p2.addChild(to4);
130 |
131 | TreeParent root = new TreeParent("");
132 | root.addChild(p1);
133 | root.addChild(p2);
134 | return root;
135 | }
136 |
137 | /**
138 | * This is a callback that will allow us to create the viewer and initialize
139 | * it.
140 | */
141 | public void createPartControl(Composite parent) {
142 | viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
143 | viewer.setContentProvider(new ViewContentProvider());
144 | viewer.setLabelProvider(new ViewLabelProvider());
145 | viewer.setInput(createDummyModel());
146 | }
147 |
148 | /**
149 | * Passing the focus request to the viewer's control.
150 | */
151 | public void setFocus() {
152 | viewer.getControl().setFocus();
153 | }
154 | }
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/OpenViewAction.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.eclipse.jface.dialogs.MessageDialog;
5 | import org.eclipse.ui.IWorkbenchPage;
6 | import org.eclipse.ui.IWorkbenchWindow;
7 | import org.eclipse.ui.PartInitException;
8 | import org.eclipse.ui.plugin.AbstractUIPlugin;
9 |
10 | /**
11 | * When run, this action will open another instance of a view.
12 | */
13 | public class OpenViewAction extends Action {
14 |
15 | private final IWorkbenchWindow window;
16 | private int instanceNum = 0;
17 | private final String viewId;
18 |
19 | public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
20 | this.window = window;
21 | this.viewId = viewId;
22 | setText(label);
23 | // The id is used to refer to the action in a menu or toolbar
24 | setId(ICommandIds.CMD_OPEN);
25 | // Associate the action with a pre-defined command, to allow key bindings.
26 | setActionDefinitionId(ICommandIds.CMD_OPEN);
27 | setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("com.eclipsesource.maildemo.warproducts", "/icons/sample2.gif"));
28 | }
29 |
30 | public void run() {
31 | if(window != null) {
32 | try {
33 | window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
34 | } catch (PartInitException e) {
35 | MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/Perspective.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.ui.IFolderLayout;
4 | import org.eclipse.ui.IPageLayout;
5 | import org.eclipse.ui.IPerspectiveFactory;
6 |
7 | /**
8 | * Configures the perspective layout. This class is contributed through the
9 | * plugin.xml.
10 | */
11 | public class Perspective implements IPerspectiveFactory {
12 |
13 | public void createInitialLayout(IPageLayout layout) {
14 | String editorArea = layout.getEditorArea();
15 | layout.setEditorAreaVisible(false);
16 |
17 | layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
18 | IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
19 | folder.addPlaceholder(View.ID + ":*");
20 | folder.addView(View.ID);
21 |
22 | layout.getViewLayout(NavigationView.ID).setCloseable(false);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/View.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo;
2 |
3 | import org.eclipse.jface.dialogs.MessageDialog;
4 | import org.eclipse.jface.resource.JFaceResources;
5 | import org.eclipse.swt.SWT;
6 | import org.eclipse.swt.events.SelectionAdapter;
7 | import org.eclipse.swt.events.SelectionEvent;
8 | import org.eclipse.swt.graphics.Font;
9 | import org.eclipse.swt.layout.GridData;
10 | import org.eclipse.swt.layout.GridLayout;
11 | import org.eclipse.swt.widgets.Composite;
12 | import org.eclipse.swt.widgets.Label;
13 | import org.eclipse.swt.widgets.Link;
14 | import org.eclipse.swt.widgets.Text;
15 | import org.eclipse.ui.part.ViewPart;
16 |
17 | /**
18 | * This view shows a "mail message". This class is contributed through
19 | * the plugin.xml.
20 | */
21 | public class View extends ViewPart {
22 |
23 | public static final String ID = "com.eclipsesource.maildemo.warproducts.view";
24 |
25 | public void createPartControl(Composite parent) {
26 | Composite top = new Composite(parent, SWT.NONE);
27 | GridLayout layout = new GridLayout();
28 | layout.marginHeight = 0;
29 | layout.marginWidth = 0;
30 | top.setLayout(layout);
31 | // top banner
32 | Composite banner = new Composite(top, SWT.NONE);
33 | banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
34 | layout = new GridLayout();
35 | layout.marginHeight = 5;
36 | layout.marginWidth = 10;
37 | layout.numColumns = 2;
38 | banner.setLayout(layout);
39 |
40 | // setup bold font
41 | Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
42 |
43 | Label l = new Label(banner, SWT.WRAP);
44 | l.setText("Subject:");
45 | l.setFont(boldFont);
46 | l = new Label(banner, SWT.WRAP);
47 | l.setText("This is a message about the cool Eclipse RCP!");
48 |
49 | l = new Label(banner, SWT.WRAP);
50 | l.setText("From:");
51 | l.setFont(boldFont);
52 |
53 | final Link link = new Link(banner, SWT.NONE);
54 | link.setText("nicole@mail.org");
55 | link.addSelectionListener(new SelectionAdapter() {
56 | public void widgetSelected(SelectionEvent e) {
57 | MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
58 | }
59 | });
60 |
61 | l = new Label(banner, SWT.WRAP);
62 | l.setText("Date:");
63 | l.setFont(boldFont);
64 | l = new Label(banner, SWT.WRAP);
65 | l.setText("10:34 am");
66 | // message contents
67 | Text text = new Text(top, SWT.MULTI | SWT.WRAP);
68 | text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
69 | "- add a top-level menu and toolbar with actions\n"+
70 | "- create views that can't be closed and\n"+
71 | " multiple instances of the same view\n"+
72 | "- perspectives with placeholders for new views\n"+
73 | "- use the default about dialog\n" );
74 | text.setLayoutData(new GridData(GridData.FILL_BOTH));
75 | }
76 |
77 | public void setFocus() {
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/warproducts/com.eclipsesource.maildemo.warproducts/src/com/eclipsesource/maildemo/warproducts/Activator.java:
--------------------------------------------------------------------------------
1 | package com.eclipsesource.maildemo.warproducts;
2 |
3 | import org.eclipse.jface.resource.ImageDescriptor;
4 | import org.eclipse.ui.plugin.AbstractUIPlugin;
5 | import org.osgi.framework.BundleContext;
6 |
7 | /**
8 | * The activator class controls the plug-in life cycle
9 | */
10 | public class Activator extends AbstractUIPlugin {
11 |
12 | // The plug-in ID
13 | public static final String PLUGIN_ID = "com.eclipsesource.maildemo.warproducts"; //$NON-NLS-1$
14 |
15 | // The shared instance
16 | private static Activator plugin;
17 |
18 | /**
19 | * The constructor
20 | */
21 | public Activator() {
22 | }
23 |
24 | /*
25 | * (non-Javadoc)
26 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
27 | */
28 | public void start(BundleContext context) throws Exception {
29 | super.start(context);
30 | plugin = this;
31 | }
32 |
33 | /*
34 | * (non-Javadoc)
35 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
36 | */
37 | public void stop(BundleContext context) throws Exception {
38 | plugin = null;
39 | super.stop(context);
40 | }
41 |
42 | /**
43 | * Returns the shared instance
44 | *
45 | * @return the shared instance
46 | */
47 | public static Activator getDefault() {
48 | return plugin;
49 | }
50 |
51 | /**
52 | * Returns an image descriptor for the image file at the given
53 | * plug-in relative path
54 | *
55 | * @param path the path
56 | * @return the image descriptor
57 | */
58 | public static ImageDescriptor getImageDescriptor(String path) {
59 | return imageDescriptorFromPlugin(PLUGIN_ID, path);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------