Skip to content

Commit

Permalink
Merge pull request #2 from thongnmtran/issue-01
Browse files Browse the repository at this point in the history
Create todo List Application
thongnmtran authored Apr 20, 2020
2 parents 9e3728e + 3a188c1 commit 8ec5eb9
Showing 43 changed files with 838 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -9,3 +9,36 @@ buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
bin/
*.class
!tools/sonar-scanner/jre/bin/
!tools/sonar-scanner/bin
!tools/sonar-scanner-windows/jre/bin/
!tools/sonar-scanner-windows/bin

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Maven
target/

# Eclipse
.settings
workspace/

# Mac Metadata Files
.DS_Store
.metadata/**
.recommenders/
.e4css/
.mvn
mvnw
mvnw.cmd
/.metadata
1 change: 1 addition & 0 deletions .recommenders/caches/identified-project-coordinates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions .recommenders/caches/manual-mappings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
7 changes: 7 additions & 0 deletions com.kmstechnology.todolist.app/.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.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions com.kmstechnology.todolist.app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
28 changes: 28 additions & 0 deletions com.kmstechnology.todolist.app/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.kmstechnology.todolist.app</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>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
17 changes: 17 additions & 0 deletions com.kmstechnology.todolist.app/Application.e4xmi
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmi:id="_c3AF0MjYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.application" bindingContexts="_c3AF2cjYEeSyMNYR5xypkQ">
<children xsi:type="basic:TrimmedWindow" xmi:id="_c3AF0cjYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.window.main" label="Note me!" width="500" height="400">
<children xsi:type="basic:Part" xmi:id="_ts5cUIA5EeqnGbQwCsoZpg" elementId="com.kmstechnology.todolist.app.part.main" contributionURI="bundleclass://com.kmstechnology.todolist.app/com.kmstechnology.todolist.app.parts.TodoAppPart" label="Todo List Part"/>
</children>
<rootContext xmi:id="_c3AF2cjYEeSyMNYR5xypkQ" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
<children xmi:id="_c3AF2sjYEeSyMNYR5xypkQ" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
<children xmi:id="_c3AF28jYEeSyMNYR5xypkQ" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
</rootContext>
<addons xmi:id="_c3AF0sjYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
<addons xmi:id="_c3AF08jYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
<addons xmi:id="_c3AF1MjYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
<addons xmi:id="_c3AF1cjYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
<addons xmi:id="_c3AF1sjYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.workbench.handler.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
<addons xmi:id="_c3AF18jYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
<addons xmi:id="_c3AF2MjYEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.workbench.bindings.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
</application:Application>
49 changes: 49 additions & 0 deletions com.kmstechnology.todolist.app/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: App
Bundle-SymbolicName: com.kmstechnology.todolist.app;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.kmstechnology.todolist.app.Activator
Bundle-Vendor: KMSTECHNOLOGY
Require-Bundle: javax.inject;bundle-version="0.0.0",
org.eclipse.swt;bundle-version="0.0.0",
org.eclipse.e4.ui.model.workbench;bundle-version="0.0.0",
org.eclipse.jface;bundle-version="0.0.0",
org.eclipse.e4.ui.services;bundle-version="0.0.0",
org.eclipse.e4.ui.workbench;bundle-version="0.0.0",
org.eclipse.e4.core.di;bundle-version="0.0.0",
org.eclipse.e4.ui.di;bundle-version="0.0.0",
org.eclipse.e4.core.contexts;bundle-version="0.0.0",
javax.inject;bundle-version="0.0.0",
org.eclipse.swt;bundle-version="0.0.0",
org.eclipse.e4.ui.model.workbench;bundle-version="0.0.0",
org.eclipse.jface;bundle-version="0.0.0",
org.eclipse.e4.ui.services;bundle-version="0.0.0",
org.eclipse.e4.ui.workbench;bundle-version="0.0.0",
org.eclipse.e4.core.di;bundle-version="0.0.0",
org.eclipse.e4.ui.di;bundle-version="0.0.0",
org.eclipse.e4.core.contexts;bundle-version="0.0.0",
javax.inject;bundle-version="0.0.0",
org.eclipse.swt;bundle-version="0.0.0",
org.eclipse.e4.ui.model.workbench;bundle-version="0.0.0",
org.eclipse.jface;bundle-version="0.0.0",
org.eclipse.e4.ui.services;bundle-version="0.0.0",
org.eclipse.e4.ui.workbench;bundle-version="0.0.0",
org.eclipse.e4.core.di;bundle-version="0.0.0",
org.eclipse.e4.ui.di;bundle-version="0.0.0",
org.eclipse.e4.core.contexts;bundle-version="0.0.0",
org.eclipse.core.runtime,
javax.inject;bundle-version="0.0.0",
org.eclipse.swt;bundle-version="0.0.0",
org.eclipse.e4.ui.model.workbench;bundle-version="0.0.0",
org.eclipse.jface;bundle-version="0.0.0",
org.eclipse.e4.ui.services;bundle-version="0.0.0",
org.eclipse.e4.ui.workbench;bundle-version="0.0.0",
org.eclipse.e4.core.di;bundle-version="0.0.0",
org.eclipse.e4.ui.di;bundle-version="0.0.0",
org.eclipse.e4.core.contexts;bundle-version="0.0.0",
org.eclipse.core.runtime;bundle-version="0.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.kmstechnology.todolist.core.icon,
com.kmstechnology.todolist.core.model
Bundle-ActivationPolicy: lazy
8 changes: 8 additions & 0 deletions com.kmstechnology.todolist.app/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/,\
css/default.css,\
Application.e4xmi
106 changes: 106 additions & 0 deletions com.kmstechnology.todolist.app/com.kmstechnology.todolist.app.product
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="com.kmstechnology.todolist.app" id="com.kmstechnology.todolist.app.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">

<configIni use="default">
</configIni>

<launcherArgs>
<programArgs>-clearPersistedState</programArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>

<windowImages/>

<plugins>
<plugin id="com.kmstechnology.todolist.app"/>
<plugin id="com.ibm.icu"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
<plugin id="javax.xml"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.util"/>
<plugin id="org.apache.batik.util.gui"/>
<plugin id="org.apache.commons.jxpath"/>
<plugin id="org.apache.commons.logging"/>
<plugin id="org.eclipse.core.commands"/>
<plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.databinding"/>
<plugin id="org.eclipse.core.databinding.beans"/>
<plugin id="org.eclipse.core.databinding.observable"/>
<plugin id="org.eclipse.core.databinding.property"/>
<plugin id="org.eclipse.core.expressions"/>
<plugin id="org.eclipse.core.filesystem"/>
<plugin id="org.eclipse.core.filesystem.aix.ppc" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.hpux.ia64_32" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.linux.ppc" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.solaris.sparc" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
<plugin id="org.eclipse.core.jobs"/>
<plugin id="org.eclipse.core.resources"/>
<plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/>
<plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.e4.core.commands"/>
<plugin id="org.eclipse.e4.core.contexts"/>
<plugin id="org.eclipse.e4.core.di"/>
<plugin id="org.eclipse.e4.core.di.annotations"/>
<plugin id="org.eclipse.e4.core.di.extensions"/>
<plugin id="org.eclipse.e4.core.services"/>
<plugin id="org.eclipse.e4.emf.xpath"/>
<plugin id="org.eclipse.e4.ui.bindings"/>
<plugin id="org.eclipse.e4.ui.css.core"/>
<plugin id="org.eclipse.e4.ui.css.swt"/>
<plugin id="org.eclipse.e4.ui.css.swt.theme"/>
<plugin id="org.eclipse.e4.ui.di"/>
<plugin id="org.eclipse.e4.ui.model.workbench"/>
<plugin id="org.eclipse.e4.ui.services"/>
<plugin id="org.eclipse.e4.ui.swt.gtk" fragment="true"/>
<plugin id="org.eclipse.e4.ui.widgets"/>
<plugin id="org.eclipse.e4.ui.workbench"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" fragment="true"/>
<plugin id="org.eclipse.e4.ui.workbench.swt"/>
<plugin id="org.eclipse.e4.ui.workbench3"/>
<plugin id="org.eclipse.emf.common"/>
<plugin id="org.eclipse.emf.databinding"/>
<plugin id="org.eclipse.emf.ecore"/>
<plugin id="org.eclipse.emf.ecore.change"/>
<plugin id="org.eclipse.emf.ecore.xmi"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.concurrent"/>
<plugin id="org.eclipse.equinox.ds"/>
<plugin id="org.eclipse.equinox.event"/>
<plugin id="org.eclipse.equinox.preferences"/>
<plugin id="org.eclipse.equinox.registry"/>
<plugin id="org.eclipse.equinox.util"/>
<plugin id="org.eclipse.jface"/>
<plugin id="org.eclipse.jface.databinding"/>
<plugin id="org.eclipse.osgi"/>
<plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
<plugin id="org.eclipse.osgi.services"/>
<plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.ppc64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
<plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
<plugin id="org.w3c.css.sac"/>
<plugin id="org.w3c.dom.events"/>
<plugin id="org.w3c.dom.smil"/>
<plugin id="org.w3c.dom.svg"/>
</plugins>


</product>
Empty file.
Binary file added com.kmstechnology.todolist.app/icons/sample.png
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.kmstechnology.todolist.app/icons/save_edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions com.kmstechnology.todolist.app/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
name="com.kmstechnology.todolist.app"
application="org.eclipse.e4.ui.workbench.swt.E4Application">
<property
name="applicationCSS"
value="platform:/plugin/com.kmstechnology.todolist.app/css/default.css">
</property>
<property
name="appName"
value="com.kmstechnology.todolist.app">
</property>
</product>
</extension>

</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.kmstechnology.todolist.app;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class Activator implements BundleActivator {

private static BundleContext context;

static BundleContext getContext() {
return context;
}

/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
}

/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.kmstechnology.todolist.app.handlers;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;

public class AboutHandler {
@Execute
public void execute(Shell shell) {
MessageDialog.openInformation(shell, "About", "Eclipse 4 RCP Application");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.kmstechnology.todolist.app.handlers;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
public class OpenHandler {

@Execute
public void execute(Shell shell){
FileDialog dialog = new FileDialog(shell);
dialog.open();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.kmstechnology.todolist.app.handlers;

import com.kmstechnology.todolist.app.parts.TodoAppPart;

public class PartRefresher {
private static TodoAppPart todoAppPart;
public static void refresh(){
todoAppPart.setFocus();
}

public static void setTodoAppPart(TodoAppPart todoAppPart){
PartRefresher.todoAppPart = todoAppPart;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.kmstechnology.todolist.app.handlers;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.workbench.IWorkbench;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;


public class QuitHandler {
@Execute
public void execute(IWorkbench workbench, Shell shell){
if (MessageDialog.openConfirm(shell, "Confirmation",
"Do you want to exit?")) {
workbench.close();
}
}
}
Loading

0 comments on commit 8ec5eb9

Please sign in to comment.