Commit ada84325 authored by Jay Jay Billings's avatar Jay Jay Billings
Browse files

Merge remote-tracking branch 'origin/jay/projectSupport' into jay/reflectivity

parents b77fd94c 62000d16
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.ice.projectgeneration.test</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>
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
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ProjectGenerationTester
Bundle-SymbolicName: org.eclipse.ice.projectgeneration.test;singleton:=true
Bundle-Version: 2.1.8
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.resources,
org.eclipse.equinox.common,
org.eclipse.ice.projectgeneration,
org.eclipse.swtbot.go;bundle-version="2.3.0",
org.eclipse.pde.core;bundle-version="3.10.100",
org.eclipse.pde.ui;bundle-version="3.8.200"
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ice.projectgeneration.pluginContent">
<wizard
class="org.eclipse.ice.projectgeneration.test.PluginContentWizard1"
id="org.eclipse.ice.projectgeneration.test.wizard1"
java="true"
name="name"
pureOSGi="false"
rcp="false"
requiresActivator="false"
ui-content="true">
</wizard>
</extension>
</plugin>
<?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>ICE</groupId>
<artifactId>org.eclipse.ice.build</artifactId>
<version>2.1.8</version>
<relativePath>../${pom-filename}</relativePath>
</parent>
<groupId>ICE</groupId>
<artifactId>org.eclipse.ice.projectgeneration.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<!-- Configure the build to handle SWTBot -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<product>org.eclipse.sdk.ide</product>
<application>org.eclipse.ui.ide.workbench</application>
<dependencies>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.sdk.feature.group</artifactId>
</dependency>
</dependencies>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<sonar.skip>true</sonar.skip>
</properties>
</project>
/*******************************************************************************
* Copyright (c) 2013, 2014 UT-Battelle, LLC.
* 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:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.projectgeneration.test;
import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
import static org.junit.Assert.fail;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.eclipse.ice.projectgeneration.ICEItemNature;
import org.eclipse.swt.SWT;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
/**
* This class tests the creation and configuration of new ICE Item projects.
*
* @author arbennett
*/
public class NewICEItemProjectTester {
private static SWTWorkbenchBot bot;
private static SWTBotShell shell;
private static SWTBotTree tree;
private static SWTBot pBot;
private static final String PROJECT_NAME = "org.eclipse.ice.newitem";
private static final String VERSION = "1.0.0";
private static final String NAME = "Newitem";
private static final String INSTITUTE = "Oak Ridge National Laboratory";
private static final String CLASS_NAME = "NewItem";
/**
* Check the setup of a New ICE Item Project
*/
@Test
public void testICEItemWizard() {
bot = new SWTWorkbenchBot();
bot.viewByTitle("Welcome").close();
bot.menu("File").menu("New").menu("Other...").click().setFocus();
bot.tree().getTreeItem("ICE Item Creation Wizards").expand();
bot.tree().getTreeItem("ICE Item Creation Wizards").getNode("ICE Item Project Creation Wizard").select();
bot.button("Next >").click();
bot.textWithLabel("&Project name:").setText("org.eclipse.ice.newitem");
bot.button("Next >").click();
bot.comboBox().setText("Oak Ridge National Laborator");
bot.button("Next >").click();
bot.textWithLabel("Class Base Name").setText("NewItem");
bot.button("Finish").click();
}
}
\ No newline at end of file
<?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>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.ice.projectgeneration</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>
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
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Project Generation
Bundle-SymbolicName: org.eclipse.ice.projectgeneration;singleton:=true
Bundle-Version: 2.1.8
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.ice.projectgeneration;uses:="org.eclipse.core.resources",
org.eclipse.ice.projectgeneration.templates;
uses:="org.eclipse.core.runtime,
org.eclipse.pde.ui,
org.eclipse.pde.ui.templates,
org.eclipse.jface.wizard",
org.eclipse.ice.projectgeneration.wizards;uses:="org.eclipse.pde.ui.templates,org.eclipse.core.resources"
Bundle-Vendor: Oak Ridge National Laboratory
Import-Package: org.eclipse.core.resources,
org.eclipse.core.runtime;version="3.5.0",
org.eclipse.jface,
org.eclipse.jface.dialogs,
org.eclipse.jface.operation,
org.eclipse.jface.viewers,
org.eclipse.jface.wizard,
org.eclipse.pde.core,
org.eclipse.pde.core.plugin,
org.eclipse.pde.internal.core,
org.eclipse.pde.internal.ui,
org.eclipse.pde.internal.ui.wizards,
org.eclipse.pde.internal.ui.wizards.plugin,
org.eclipse.pde.ui,
org.eclipse.pde.ui.templates,
org.eclipse.swt.widgets,
org.eclipse.ui,
org.eclipse.ui.dialogs,
org.eclipse.ui.wizards.newresource,
org.osgi.framework;version="1.8.0"
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
templates_3.4/,\
plugin.properties,\
schema/
template.ICEItem.name = New ICE Item
template.ICEItem.desc = <p>Create new ICE Item plugin project</p>
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension-point id="pluginContent" name="%expoint.pluginContent.name" schema="schema/pluginContent.exsd"/>
<extension
point="org.eclipse.ui.newWizards">
<category
id="org.eclipse.ice.projectgeneration.wizards"
name="ICE Item Creation Wizards">
</category>
<wizard
category="org.eclipse.ice.projectgeneration.wizards"
class="org.eclipse.ice.projectgeneration.wizards.NewICEItemProjectWizard"
id="org.eclipse.ice.projectgeneration.wizard.new.item"
name="ICE Item Project Creation Wizard">
</wizard>
</extension>
<extension
id="iceNature"
point="org.eclipse.core.resources.natures">
<runtime>
<run
class="org.eclipse.ice.projectgeneration.ICEItemNature">
</run>
</runtime>
</extension>
<extension
point="org.eclipse.pde.ui.templates">
<template
class="org.eclipse.ice.projectgeneration.templates.ICEItemTemplate"
contributingId="org.eclipse.ice.item"
id="org.eclipse.ice.projectgeneration.templates.ICEItem"
name="ICE Item">
</template>
</extension>
<extension
point="org.eclipse.ice.projectgeneration.pluginContent">
<wizard
class="org.eclipse.ice.projectgeneration.templates.ICEItemWizard"
id="org.eclipse.ice.projectgeneration.pluginContent.ICEItem"
java="true"
name="ICE Item"
pureOSGi="false"
rcp="false"
requiresActivator="false"
ui-content="true">
<description>
Creates a new ICE Item project
</description>
</wizard>
</extension>
<extension
point="org.eclipse.pde.ui.newExtension">
<category
id="templates"
name="ICE Item Templates">
</category>
<wizard
availableAsShortcut="true"
category="templates"
id="org.eclipse.ice.projectgeneration.ICEItem"
name="ICE Item"
template="org.eclipse.ice.projectgeneration.templates.ICEItem">
</wizard>
<wizard
category="templates"
id="org.eclipse.ice.projectgeneration.ICEItem"
name="ICE Item"
template="org.eclipse.ice.projectgeneration.templates.ICEItem">
</wizard>
<wizard
category="templates"
id="org.eclipse.ice.projectgeneration.ICEItem"
name="ICE Item"
template="org.eclipse.ice.projectgeneration.templates.ICEItem">
</wizard>
</extension>
</plugin>
<?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>ICE</groupId>
<artifactId>org.eclipse.ice.build</artifactId>
<version>2.1.8</version>
<relativePath>../${pom-filename}</relativePath>
</parent>
<groupId>ICE</groupId>
<artifactId>org.eclipse.ice.projectgeneration</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.pde.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appInfo>
<meta.schema plugin="org.eclipse.pde.ui" id="pluginContent" name="Plug-in Content Wizards"/>
</appInfo>
<documentation>
This extension point provides for contributing wizards that create additional content of the PDE plug-in
projects. After the plug-in manifest and key files have been
created, these wizards can be used to add more files and
extensions to the initial structure. A typical implementation
of this wizard would add content based on a parametrized
template customized based on the user choices in the wizard.
The goal is to arrive at a plug-in that is does something
useful right after the creation (e.g. contributes a view,
an editor etc.).
</documentation>
</annotation>
<element name="extension">
<annotation>
<appInfo>
<meta.element />
</appInfo>
</annotation>
<complexType>
<sequence>
<element ref="wizard" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
a fully qualified identifier of the target extension point
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
an optional identifier of the extension instance
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
an optional name of the extension instance
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="wizard">
<annotation>
<appInfo>
<meta.element labelAttribute="name" icon="icon"/>
</appInfo>
</annotation>
<complexType>
<sequence>
<element ref="description" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
a unique name that will be used to identify this wizard.
</documentation>
<appInfo>
<meta.attribute kind="identifier"/>
</appInfo>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
a translatable name that will be used in UI representation
of this wizard.
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="icon" type="string">
<annotation>
<documentation>
a relative path of an icon that will be used to visually
represent the wizard.
</documentation>
<appInfo>
<meta.attribute kind="resource"/>
</appInfo>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
a fully qualified name of a class which implements
&lt;samp&gt;org.eclipse.pde.ui.IPluginContentWizard&lt;/samp&gt; and extends from &lt;samp&gt;org.eclipse.jface.Wizard&lt;/samp&gt;.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.jface.Wizard:org.eclipse.pde.ui.IPluginContentWizard"/>
</appInfo>
</annotation>
</attribute>
<attribute name="category" type="string">
<annotation>
<documentation>
an optional tag that can be used to associate content wizards with different target projects.
</documentation>
</annotation>
</attribute>
<attribute name="ui-content" type="boolean" use="default" value="true">
<annotation>
<documentation>
a flag that indicates if the wizard will contribute code with user interface content. This flag will affect which plug-in class will be picked since (UI plug-ins extend &lt;code&gt;AbstractUIPlugin&lt;/code&gt; class, while non-UI plug-ins extends &lt;code&gt;Plugin&lt;/code&gt; base class). Since many contributions to Eclipse have UI content, this attribute is &lt;code&gt;true&lt;/code&gt; by default.
</documentation>
</annotation>
</attribute>
<attribute name="java" type="boolean" use="default" value="true">
<annotation>
<documentation>
a flag that indicates that the wizard will contribute Java content. Since most of the Eclipse plug-ins have Java code, the attribute is &lt;code&gt;true&lt;/code&gt; by default. Set it to &lt;code&gt;false&lt;/code&gt; if the plug-in will not have Java code (for example, documentation files only).
</documentation>
</annotation>
</attribute>
<attribute name="rcp" type="boolean" use="default" value="false">
<annotation>
<documentation>
Since 3.1. A boolean flag indicating whether the wizard contributes a standalone fully-functioning rich client application. If set to &lt;code&gt;true&lt;/code&gt;, the wizard will appear in the New Plug-in Project wizard only when the user chooses the Rich Client Application option.
</documentation>
</annotation>
</attribute>
<attribute name="pureOSGi" type="boolean" use="default" value="false">
<annotation>
<documentation>
Since 3.2. A boolean flag indicating whether the wizard contributes a pure OSGi bundle. If set to &lt;code&gt;true&lt;/code&gt;, the wizard will appear in the New Plug-in Project wizard only when the user chooses to create a pure OSGi bundle.
</documentation>
</annotation>
</attribute>
<attribute name="requiresActivator" type="boolean" use="default" value="false">
<annotation>
<documentation>
Since 3.2. A boolean flag indicating whether the wizard contributes an activator class. If set to &lt;code&gt;true&lt;/code&gt;, the wizard will appear in the New Plug-in Project wizard only when the user chooses to generate an activator to control the plug-in life cycle.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="description" type="string">
<annotation>
<appInfo>
<meta.element translatable="true"/>
</appInfo>
<documentation>
Short description of this wizard.
</documentation>
</annotation>
</element>
<annotation>
<appInfo>
<meta.section type="implementation"/>
</appInfo>
<documentation>
PDE provides APIs for contributing content wizards based on customizable templates. A number of concrete wizards based on these templates is contributed by PDE UI itself.
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="copyright"/>
</appInfo>
<documentation>
Copyright (c) 2004, 2014 IBM Corporation and others.
&lt;br&gt;
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
&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;.
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
Wizards that plug into this extension point must
implement &lt;samp&gt;org.eclipse.pde.ui.IPluginContentWizard&lt;/samp&gt;
interface and is expected to extend &lt;code&gt;org.eclipse.jface.wizard.Wizard&lt;/code&gt;.