Skip to content

Commit

Permalink
Add a top level Google and a child App Engine Deployment property page (
Browse files Browse the repository at this point in the history
#508)

* WIP - create deploy UI bundle

* cleanup new bundles, add dummy top level and deploy related properties page to App Engine Standard projects

* fix Google property page message, change import-package for o.e.core.runtime
  • Loading branch information
akerekes authored Aug 5, 2016
1 parent f8513e4 commit efa149b
Show file tree
Hide file tree
Showing 25 changed files with 347 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,77 +24,84 @@
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.deploy"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.deploy.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.facets"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.localserver"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.login"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.newproject"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.newproject.maven"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.appengine.whitelist"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.preferences"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.sdk"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="com.google.cloud.tools.eclipse.sdk.ui"
download-size="0"
Expand Down
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.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.google.cloud.tools.eclipse.appengine.deploy.ui.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>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<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,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
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.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ClassPath: .
Bundle-ManifestVersion: 2
Bundle-Name: Tests for Cloud Tools for Eclipse App Engine Deployment Support
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-SymbolicName: com.google.cloud.tools.eclipse.appengine.deploy.ui.test
Bundle-Vendor: Google, Inc.
Bundle-Version: 0.1.0.qualifier
Fragment-Host: com.google.cloud.tools.eclipse.appengine.deploy.ui
Require-Bundle: org.hamcrest;bundle-version="1.1.0",
org.junit;bundle-version="4.12.0"
Import-Package: org.mockito;provider=google;version="1.10.19",
org.mockito.runners;provider=google;version="1.10.19",
org.mockito.stubbing;provider=google;version="1.10.19",
org.objenesis;provider=google;version="2.2.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source.. = src/
output.. = target/classes/
bin.includes = META-INF/,\
.
javacSource=1.7
javacTarget=1.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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.google.cloud.tools.eclipse</groupId>
<artifactId>trunk</artifactId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<artifactId>com.google.cloud.tools.eclipse.appengine.deploy.ui.test</artifactId>
<packaging>eclipse-test-plugin</packaging>

<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.google.cloud.tools.eclipse.appengine.deploy;

import java.io.File;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;

public class XmlTest {

private DocumentBuilder builder;

@Before
public void setUp() throws ParserConfigurationException {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
builder = factory.newDocumentBuilder();
}

@Test
public void testPluginXml() throws Exception {
// test fails if malformed
Document doc = builder.parse(
new File("../com.google.cloud.tools.eclipse.appengine.deploy/plugin.xml"));
Assert.assertEquals("plugin", doc.getDocumentElement().getNodeName());
}
}
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.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.google.cloud.tools.eclipse.appengine.deploy.ui</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>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<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,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
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.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: GCloud for Eclipse App Engine Deployment Support UI
Bundle-SymbolicName: com.google.cloud.tools.eclipse.appengine.deploy.ui;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-Vendor: Google, Inc.
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.ui.workbench
Import-Package: org.eclipse.core.resources,
org.eclipse.core.runtime;common="split",
org.eclipse.jface.preference,
org.eclipse.swt,
org.eclipse.swt.graphics,
org.eclipse.swt.widgets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source.. = src/
output.. = target/classes/
bin.includes = META-INF/,\
.,\
plugin.xml,\
plugin.properties
javacSource=1.7
javacTarget=1.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pluginName=Google App Engine Standard Deployment Support UI
providerName=Google, Inc.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

<!-- temporary parent page -->
<!-- To be moved to a more general bundle
https://github.com/GoogleCloudPlatform/gcloud-eclipse-tools/issues/507 -->
<extension point="org.eclipse.ui.propertyPages">
<page
id="com.google.cloud.tools.eclipse"
name="Google"
class="com.google.cloud.tools.eclipse.properties.GooglePropertyPage">
</page>
</extension>

<extension point="org.eclipse.ui.propertyPages">
<page
id="com.google.cloud.tools.eclipse.appengine.deploy"
name="App Engine Deployment"
category="com.google.cloud.tools.eclipse"
class="com.google.cloud.tools.eclipse.appengine.deploy.ui.DeployPropertyPage">
<enabledWhen> <!-- this will probably be too strict when App Engine Flex becomes supported -->
<adapt type="org.eclipse.core.resources.IProject">
<test
forcePluginActivation="true"
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="com.google.cloud.tools.eclipse.appengine.facet" />
</adapt>
</enabledWhen>
</page>
</extension>
</plugin>
14 changes: 14 additions & 0 deletions plugins/com.google.cloud.tools.eclipse.appengine.deploy.ui/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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.google.cloud.tools.eclipse</groupId>
<artifactId>trunk</artifactId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<artifactId>com.google.cloud.tools.eclipse.appengine.deploy.ui</artifactId>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.google.cloud.tools.eclipse.appengine.deploy.ui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbenchPropertyPage;
import org.eclipse.ui.dialogs.PropertyPage;

public class DeployPropertyPage extends PropertyPage implements IWorkbenchPropertyPage {

@Override
protected Control createContents(Composite parent) {
Label label = new Label(parent, SWT.LEFT);
label.setText(Messages.getString("preferences.title")); //$NON-NLS-1$
return label;
}

}
Loading

0 comments on commit efa149b

Please sign in to comment.