Skip to content

Commit

Permalink
- first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainr committed Jun 6, 2012
1 parent 3cb5449 commit ddfb274
Show file tree
Hide file tree
Showing 38 changed files with 1,016 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bin
*.class

# Package Files #
Expand Down
15 changes: 15 additions & 0 deletions Platform.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.6"?>

<target name="Platform" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.equinox.executable.feature.group" version="3.5.1.v20111216-1653-7P7NFUIFIbaUcU77s0KQWHw5HZTZ"/>
<repository location="http://download.eclipse.org/releases/indigo/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rcp.sdk.id" version="3.7.2.M20120208-0800"/>
<repository location="http://download.eclipse.org/releases/indigo/"/>
</location>
</locations>
</target>
7 changes: 7 additions & 0 deletions com.mail.MailApp/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
35 changes: 35 additions & 0 deletions com.mail.MailApp/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.mail.MailApp</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>Platform.target</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Platform.target</locationURI>
</link>
</linkedResources>
</projectDescription>
8 changes: 8 additions & 0 deletions com.mail.MailApp/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Mon Jun 04 17:48:34 CDT 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
10 changes: 10 additions & 0 deletions com.mail.MailApp/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MailApp
Bundle-SymbolicName: com.mail.MailApp; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.mail.mailapp.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
8 changes: 8 additions & 0 deletions com.mail.MailApp/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
icons/,\
product_lg.gif,\
splash.bmp
Binary file added com.mail.MailApp/icons/mail.ico
Binary file not shown.
Binary file added com.mail.MailApp/icons/sample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.mail.MailApp/icons/sample.icns
Binary file not shown.
Binary file added com.mail.MailApp/icons/sample2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.mail.MailApp/icons/sample3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions com.mail.MailApp/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="com.mail.mailapp.Application">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
name="RCP Perspective"
class="com.mail.mailapp.Perspective"
id="com.mail.MailApp.perspective">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="Message"
allowMultiple="true"
icon="icons/sample2.gif"
class="com.mail.mailapp.View"
id="com.mail.MailApp.view">
</view>
<view
name="Mailboxes"
allowMultiple="true"
icon="icons/sample3.gif"
class="com.mail.mailapp.NavigationView"
id="com.mail.MailApp.navigationView">
</view>
</extension>
<extension
point="org.eclipse.ui.commands">
<category
name="Mail"
id="com.mail.MailApp.category">
</category>
<command
name="Open Mailbox"
description="Opens a mailbox"
categoryId="com.mail.MailApp.category"
id="com.mail.MailApp.open">
</command>
<command
name="Open Message Dialog"
description="Open a message dialog"
categoryId="com.mail.MailApp.category"
id="com.mail.MailApp.openMessage">
</command>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="com.mail.MailApp.open"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="CTRL+2">
</key>
<key
commandId="com.mail.MailApp.openMessage"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="CTRL+3">
</key>
<key
commandId="org.eclipse.ui.file.exit"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="CTRL+X">
</key>
</extension>
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application="com.mail.MailApp.application"
name="MailAppProductName">
<property
name="appName"
value="MailAppProductName">
</property>
</product>
</extension>

</plugin>
18 changes: 18 additions & 0 deletions com.mail.MailApp/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.mail.mailapp</groupId>
<artifactId>parent</artifactId>
<version>1</version>
</parent>

<groupId>com.mail.mailapp</groupId>
<artifactId>com.mail.MailApp</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Binary file added com.mail.MailApp/product_lg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.mail.MailApp/splash.bmp
Binary file not shown.
61 changes: 61 additions & 0 deletions com.mail.MailApp/src/com/mail/mailapp/Activator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package com.mail.mailapp;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {

// The plug-in ID
public static final String PLUGIN_ID = "com.mail.MailApp"; //$NON-NLS-1$

// The shared instance
private static Activator plugin;

/**
* The constructor
*/
public Activator() {
}

/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}

/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}

/**
* Returns an image descriptor for the image file at the given
* plug-in relative path
*
* @param path the path
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
45 changes: 45 additions & 0 deletions com.mail.MailApp/src/com/mail/mailapp/Application.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.mail.mailapp;

import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

/**
* This class controls all aspects of the application's execution
*/
public class Application implements IApplication {

/* (non-Javadoc)
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
*/
public Object start(IApplicationContext context) {
Display display = PlatformUI.createDisplay();
try {
int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
if (returnCode == PlatformUI.RETURN_RESTART) {
return IApplication.EXIT_RESTART;
}
return IApplication.EXIT_OK;
} finally {
display.dispose();
}
}

/* (non-Javadoc)
* @see org.eclipse.equinox.app.IApplication#stop()
*/
public void stop() {
if (!PlatformUI.isWorkbenchRunning())
return;
final IWorkbench workbench = PlatformUI.getWorkbench();
final Display display = workbench.getDisplay();
display.syncExec(new Runnable() {
public void run() {
if (!display.isDisposed())
workbench.close();
}
});
}
}
Loading

0 comments on commit ddfb274

Please sign in to comment.