commit 1f127ab473185180d4212c7d3cb0ed1666e3a183 Author: 金剑龙 Date: Mon May 10 16:13:05 2021 +0800 Initial commit diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..d8dc335 --- /dev/null +++ b/.classpath @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1a8640 --- /dev/null +++ b/.gitignore @@ -0,0 +1,96 @@ +# ---> Java +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# ---> Maven +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# https://github.com/takari/maven-wrapper#usage-without-binary-jar +.mvn/wrapper/maven-wrapper.jar + +# ---> Eclipse +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ +.apt_generated_test/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + diff --git a/.project b/.project new file mode 100644 index 0000000..f12eacc --- /dev/null +++ b/.project @@ -0,0 +1,34 @@ + + + com.connor.plm + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5bf3948 --- /dev/null +++ b/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Plm +Bundle-SymbolicName: com.connor.plm;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: CONNOR +Require-Bundle: org.eclipse.ui +Automatic-Module-Name: com.connor.plm +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: com.connor.plm.handlers diff --git a/README.md b/README.md new file mode 100644 index 0000000..d9619ef --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# RCP + +Teamcenter 胖客户端插件开发模板 \ No newline at end of file diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..0d3d3a7 --- /dev/null +++ b/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/ diff --git a/icons/sample.png b/icons/sample.png new file mode 100644 index 0000000..02c4b79 Binary files /dev/null and b/icons/sample.png differ diff --git a/icons/sample@2x.png b/icons/sample@2x.png new file mode 100644 index 0000000..c1224d1 Binary files /dev/null and b/icons/sample@2x.png differ diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..c4ef2e6 --- /dev/null +++ b/plugin.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3ebd82d --- /dev/null +++ b/pom.xml @@ -0,0 +1,48 @@ + + 4.0.0 + com.connor.plm.test + com.connor.plm.test + 0.0.1-SNAPSHOT + + 1.8 + 1.8 + + + + nexus-connor + Connor Repository + http://plmserver.cn:9000/repository/maven-public/ + + + + + + cn.hutool + hutool-all + 5.1.0 + + + + + + + + maven-dependency-plugin + + + install + + copy-dependencies + + + ./lib + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/connor/plm/handlers/SampleHandler.java b/src/main/java/com/connor/plm/handlers/SampleHandler.java new file mode 100644 index 0000000..39d3d9e --- /dev/null +++ b/src/main/java/com/connor/plm/handlers/SampleHandler.java @@ -0,0 +1,26 @@ +package com.connor.plm.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.handlers.HandlerUtil; + +import cn.hutool.Hutool; +import cn.hutool.db.Db; +import cn.hutool.db.Entity; + +import org.eclipse.jface.dialogs.MessageDialog; + +public class SampleHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event); + MessageDialog.openInformation( + window.getShell(), + "Plm", + "Hello, Eclipse world"); + return null; + } +}