Flow.Antony@googlemail.com 11 年之前
父節點
當前提交
f358218824

+ 7 - 0
plugins/org.yakindu.sct.ui.intro/.classpath

@@ -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>

+ 28 - 0
plugins/org.yakindu.sct.ui.intro/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.ui.intro</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>

+ 7 - 0
plugins/org.yakindu.sct.ui.intro/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,7 @@
+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

+ 13 - 0
plugins/org.yakindu.sct.ui.intro/META-INF/MANIFEST.MF

@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Intro
+Bundle-SymbolicName: org.yakindu.sct.ui.intro;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.yakindu.sct.ui.intro.Activator
+Bundle-Vendor: YAKINDU
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.intro;bundle-version="3.4.200",
+ org.eclipse.platform;bundle-version="4.4.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy

+ 6 - 0
plugins/org.yakindu.sct.ui.intro/build.properties

@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               img/

+ 5 - 0
plugins/org.yakindu.sct.ui.intro/css/style.css

@@ -0,0 +1,5 @@
+.logo_small {
+	margin-left:-60px;
+}
+
+

二進制
plugins/org.yakindu.sct.ui.intro/img/logo_small.png


+ 10 - 0
plugins/org.yakindu.sct.ui.intro/plugin.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.intro.configExtension">
+   		<configExtension
+            configId="org.eclipse.ui.intro.universalConfig"
+            content="$nl$/yakinduExtensionContent.xml"/>  
+   </extension>
+</plugin>

+ 16 - 0
plugins/org.yakindu.sct.ui.intro/pom.xml

@@ -0,0 +1,16 @@
+<?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>org.yakindu.sct</groupId>
+		<artifactId>org.yakindu.sct.releng</artifactId>
+		<version>2.3.0-SNAPSHOT</version>
+		<relativePath>../org.yakindu.sct.releng/pom.xml</relativePath>
+	</parent>
+	<artifactId>org.yakindu.sct.ui.intro</artifactId>
+	<groupId>org.yakindu.sct.plugins</groupId>
+	<packaging>eclipse-plugin</packaging>
+	<version>2.3.0-SNAPSHOT</version>
+</project>

+ 50 - 0
plugins/org.yakindu.sct.ui.intro/src/org/yakindu/sct/ui/intro/Activator.java

@@ -0,0 +1,50 @@
+package org.yakindu.sct.ui.intro;
+
+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 = "org.yakindu.sct.ui.intro"; //$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;
+	}
+
+}

+ 61 - 0
plugins/org.yakindu.sct.ui.intro/src/org/yakindu/sct/ui/intro/OpenExampleIntroAction.java

@@ -0,0 +1,61 @@
+/**
+ * Copyright (c) 2014 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.ui.intro;
+
+import java.util.Properties;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.intro.IIntroSite;
+import org.eclipse.ui.intro.config.IIntroAction;
+import org.eclipse.ui.wizards.IWizardDescriptor;
+
+/**
+ * 
+ * @author Florian Antony
+ * 
+ */
+public class OpenExampleIntroAction implements IIntroAction {
+
+	private final String TRAFFICLIGHT_EXAMPLE_WIZARD = "org.yakindu.sct.example.trafficlight";
+
+	@Override
+	public void run(IIntroSite site, Properties params) {
+		openWizard(TRAFFICLIGHT_EXAMPLE_WIZARD);
+	}
+
+	public void openWizard(String id) {
+		IWizardDescriptor descriptor = PlatformUI.getWorkbench()
+				.getNewWizardRegistry().findWizard(id);
+		if (descriptor == null) {
+			descriptor = PlatformUI.getWorkbench().getImportWizardRegistry()
+					.findWizard(id);
+		}
+		if (descriptor == null) {
+			descriptor = PlatformUI.getWorkbench().getExportWizardRegistry()
+					.findWizard(id);
+		}
+		try {
+			if (descriptor != null) {
+				IWizard wizard = descriptor.createWizard();
+				WizardDialog wd = new WizardDialog(Display.getDefault()
+						.getActiveShell(), wizard);
+				wd.setTitle(wizard.getWindowTitle());
+				wd.open();
+			}
+		} catch (CoreException e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 48 - 0
plugins/org.yakindu.sct.ui.intro/yakinduExtensionContent.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<introContent>
+	<extensionContent id="yakindu-overviewExtension" name="Yakindu Overview Extension"
+		style="css/style.css" path="overview/@">
+		<group style-id="content-group" id="yakindu-introLink-group">
+			<link label="Yakindu Statechart Tools" url="http://statecharts.org"
+				id="yakindu-dokumentation-Link" style-id="content-link">
+				<img id="logo_small" style-id="logo_small" src="img/logo_small.png"></img>
+				<text>Learn more about YAKINDU Statechart Tools...
+				</text>
+			</link>
+		</group>
+	</extensionContent>
+
+	<extensionContent id="yakindu-sampleExtension" name="Yakindu Sample Extension"
+		style="css/style.css" path="samples/@">
+
+		<group style-id="content-group" id="yakindu-introLink-group"
+			label="Yakindu Statechart Tools">
+			<link label="Example project"
+				url="http://org.eclipse.ui.intro/runAction?pluginId=org.yakindu.sct.ui.intro&amp;class=org.yakindu.sct.ui.intro.OpenExampleIntroAction"
+				id="yakindu-example-Link" style-id="content-link">
+				<img id="logo_small" style-id="logo_small" src="img/logo_small.png"></img>
+				<text>Create the traffic light example...
+				</text>
+			</link>
+		</group>
+	</extensionContent>
+
+	<extensionContent id="yakindu-tutorialsExtension"
+		style="css/style.css" name="Yakindu Tutorials Extension" path="tutorials/@">
+		<group style-id="content-group" id="yakindu-introLink-group"
+			label="Yakindu Statechart Tools">
+			<link label="Tutorial" url="http://statecharts.org/documentation.html"
+				id="yakindu-getting-started-Link" style-id="content-link">
+				<img id="logo_small" style-id="logo_small" src="img/logo_small.png"></img>
+				<text>Read the "Getting started tutorial"...
+				</text>
+			</link>
+			<link label="User Group" url="https://groups.google.com/forum/embed/?place=forum/yakindu-user#!forum/yakindu-user"
+				id="yakindu-getting-started-Link" style-id="content-link">
+				<img id="logo_small" style-id="logo_small" src="img/logo_small.png"></img>
+				<text>Visit the SCT user group...
+				</text>
+			</link>
+		</group>
+	</extensionContent>
+</introContent>