Skip to content

Commit

Permalink
JBIDE-20990 - Introduction of CDK adapter,
Browse files Browse the repository at this point in the history
with integration to openshift v3 and docker.
Details below:

Renamed Plugin

Added runtime detection

Move startup and shutdown logic into subsystem controllers

Added launch tab group and streamlined some of the startup code to more properly fit a user-friendly paradigm

Bug in Vagrant poller when Vagrantfile is configured to expect credentials via environment variables but server adapter is configured for terminal to prompt for credentials over TTY

Current logic overwrote environment map entirely rather than just the two properties we'd like to add

Lots of cleanup:
  allow cdk server to use new credential framework,
  provide support for virtualbox 'poweroff' state instead of just 'shutoff'

Add a warning alerting users that passwords may not be shown in launch tabs

Fix server adapter to handle changes in credential  model

Add listener for server state change to add an openshift connection if applicable

added warnigns if credentials are missing
added credential composite to wizard fragment
made sure widget enablement in server editor is correct

Isolate code for external launch
add support for adbinfo

Integration with docker

Adding feature, updating category xml, etc

Merge errors

merge error

downgrade version requirement on foundation

Polling mechanism (VagrantPoller but should be renamed to CDKPoller) had NPE

ADBInfo should also check port

Small cleanup for cdk server
Openshift explorer view should async update the view when receiving events

Conflicts:
	plugins/org.jboss.tools.openshift.common.ui/src/org/jboss/tools/openshift/internal/common/ui/explorer/OpenShiftExplorerView.java

Undoing change to discovering openshift port, as the change was wrong

Incorrect username when creating openshift connection for cdk server

Regression creating openshift connection after rebase

Conflicts:
	plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/ui/util/EGitUIUtils.java
  • Loading branch information
robstryker authored and fbricon committed Nov 30, 2015
1 parent 15bfc08 commit d6a2d2e
Show file tree
Hide file tree
Showing 47 changed files with 3,153 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bin.includes = feature.xml,\
feature.properties
src.includes = feature.xml,\
feature.properties,\
build.properties,\
.project
34 changes: 34 additions & 0 deletions features/org.jboss.tools.openshift.cdk.feature/feature.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
###############################################################################
# Copyright (c) 2010-2015 Red Hat, Inc. 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:
# JBoss by Red Hat - Initial implementation.
##############################################################################
# feature.properties
# contains externalized strings for feature.xml
# "%foo" in feature.xml corresponds to the key "foo" in this file
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# This file should be translated.

# "featureName" property - name of the feature
featureName=Red Hat CDK Server Adapter

# "providerName" property - name of the company that provides the feature
providerName=JBoss by Red Hat

# "description" property - description of the feature
description=Provides tooling to start and stop the Red Hat CDK via a server adapter.
descriptionURL=http://www.jboss.org/tools

copyright=Copyright (c) 2015 Red Hat, Inc. and others.\n\
All rights reserved. This program and the accompanying materials\n\
are made available under the terms of the Eclipse Public License v1.0\n\
which accompanies this distribution, and is available at\n\
http\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\n\
JBoss by Red Hat - Initial implementation.

licenseURL=license.html
34 changes: 34 additions & 0 deletions features/org.jboss.tools.openshift.cdk.feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.jboss.tools.openshift.cdk.feature"
label="%featureName"
version="3.1.0.qualifier"
provider-name="%providerName"
plugin="org.jboss.tools.openshift.cdk.server"
license-feature="org.jboss.tools.foundation.license.feature"
license-feature-version="0.0.0">

<description url="%descriptionURL">
%description
</description>

<copyright>
%copyright
</copyright>

<license url="%licenseURL">
%license
</license>


<includes
id="org.jboss.tools.openshift.feature"
version="0.0.0"/>

<plugin
id="org.jboss.tools.openshift.cdk.server"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
12 changes: 12 additions & 0 deletions features/org.jboss.tools.openshift.cdk.feature/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools.openshift</groupId>
<artifactId>features</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.openshift.features</groupId>
<artifactId>org.jboss.tools.openshift.cdk.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
Empty file.
1 change: 1 addition & 0 deletions features/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<module>org.jboss.tools.openshift.egit.integration.test.feature</module>
<module>org.jboss.tools.openshift.express.feature</module>
<module>org.jboss.tools.openshift.express.test.feature</module>
<module>org.jboss.tools.openshift.cdk.feature</module>
</modules>
<build>
<plugins>
Expand Down
7 changes: 7 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/.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.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
41 changes: 41 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.jboss.tools.openshift.cdk.server;singleton:=true
Bundle-Vendor: %Bundle-Vendor
Bundle-Version: 3.1.0.qualifier
Bundle-Localization: plugin
Bundle-Activator: org.jboss.tools.openshift.cdk.server.core.internal.CDKCoreActivator
Require-Bundle: org.jboss.tools.usage;bundle-version="2.1.0",
org.jboss.tools.common.core;bundle-version="3.7.0";visibility:=reexport,
org.jboss.tools.foundation.core;bundle-version="1.2.1",
org.jboss.ide.eclipse.as.core;bundle-version="3.0.0",
org.jboss.ide.eclipse.archives.webtools;bundle-version="2.5.0",
org.eclipse.wst.server.core;bundle-version="1.5.0",
org.eclipse.jdt.launching;bundle-version="3.7.0",
org.eclipse.debug.core;bundle-version="3.8.0",
org.eclipse.core.resources;bundle-version="3.8.100",
org.eclipse.core.runtime;bundle-version="3.9.0",
org.eclipse.wst.server.ui;bundle-version="1.5.200",
org.eclipse.ui;bundle-version="3.107.0",
org.eclipse.ui.forms;bundle-version="3.6.200",
org.jboss.ide.eclipse.as.wtp.core;bundle-version="3.1.1",
org.jboss.ide.eclipse.as.wtp.ui;bundle-version="3.1.1",
org.eclipse.tm.terminal.view.core;bundle-version="4.0.0",
org.eclipse.tm.terminal.view.ui;bundle-version="4.0.0",
org.eclipse.tm.terminal.connector.local;bundle-version="4.0.0",
org.eclipse.tm.terminal.control;bundle-version="4.0.0",
org.jboss.tools.runtime.core;bundle-version="3.1.0",
org.jboss.tools.runtime.ui;bundle-version="3.1.0",
org.eclipse.equinox.security;bundle-version="1.2.100",
org.eclipse.debug.ui;bundle-version="3.11.0",
org.eclipse.core.externaltools;bundle-version="1.0.300",
org.eclipse.ui.externaltools;bundle-version="3.3.0",
org.jboss.tools.foundation.ui;bundle-version="1.2.1",
org.jboss.tools.openshift.common.core;bundle-version="3.1.0",
org.jboss.tools.openshift.core;bundle-version="3.1.0",
org.jboss.tools.openshift.common.ui;bundle-version="3.1.0",
org.jboss.tools.openshift.ui;bundle-version="3.1.0",
org.eclipse.linuxtools.docker.core;bundle-version="1.1.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
30 changes: 30 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>JBoss Openshift Express Core Plugin</title>
<style type="text/css" media="screen">
<!--
body {
font-family: Sans-serif, Arial, Helvetica;
}

-->
</style>
</head>
<body>
<h1>JBoss Openshift Express Core Plugin</h1>

<p>
This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
</p>

<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>

<p>
This software is distributed under the terms of the Eclipse Public License - v 1.0
(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
</p>
</body>
</html>
27 changes: 27 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/about.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# about.ini
# contains information about a feature
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# "%key" are externalized strings defined in about.properties
# This file does not need to be translated.
# test
# Property "aboutText" contains blurb for "About" dialog (translated)
aboutText=%blurb

# Property "windowImage" contains path to window icon (16x16)
# needed for primary features only

# Property "featureImage" contains path to feature image (32x32)
featureImage=jboss_about.png

# Property "aboutImage" contains path to product image (500x330 or 115x164)
# needed for primary features only

# Property "appName" contains name of the application (not translated)
# needed for primary features only

# Property "welcomePerspective" contains the id of the perspective in which the
# welcome page is to be opened.
# optional



5 changes: 5 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/about.mappings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# about.mappings
# contains fill-ins for about.properties
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# This file does not need to be translated.

2 changes: 2 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/about.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
blurb=JBoss Vagrant Core Plugin\n\nVersion\: {featureVersion}\n\n(c) Copyright (c) Red Hat, Inc., contributors and others 2013. All rights reserved.\nVisit http\://jboss.org/tools

14 changes: 14 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
source.. = src/
src.includes = *
src.excludes = src/
output.. = bin/
bin.includes = META-INF/,\
plugin.xml,\
plugin.properties,\
about.html,\
about.ini,\
about.mappings,\
about.properties,\
jboss_about.png,\
pom.xml,\
.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/plugin.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Properties file for org.jboss.tools.runtime
Bundle-Vendor = JBoss by Red Hat
Bundle-Name = OpenShift Tools - Vagrant Server Adapter
ProviderName = OpenShift

openshift.cdk.name = CDK Server Adapter
openshift.cdk.description = A server adapter to control CDK/Vagrant installations
enterpriseProviderName=Red Hat JBoss Middleware

launch_cdk_server=Launch CDK Server
154 changes: 154 additions & 0 deletions plugins/org.jboss.tools.openshift.cdk.server/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.wst.server.core.serverTypes">
<serverType
behaviourClass="org.jboss.tools.openshift.cdk.server.core.internal.adapter.CDKServerBehaviour"
class="org.jboss.tools.openshift.cdk.server.core.internal.adapter.CDKServer"
name="%openshift.cdk.name"
description="%openshift.cdk.description"
hasConfiguration="false"
id="org.jboss.tools.openshift.cdk.server.type"
initialState="stopped"
launchConfigId="org.jboss.tools.openshift.cdk.server.core.internal.behaviour.launchType"
launchModes="run"
runtime="true"
runtimeTypeId="org.jboss.tools.openshift.cdk.server.runtime.type"
startBeforePublish="false"
startTimeout="450000"
stopTimeout="450000"
supportsRemoteHosts="false"/>
</extension>


<extension point="org.eclipse.wst.server.core.runtimeTypes">
<!-- This is a complete dummy runtime type and is unused but cannot be removed -->
<runtimeType
class="org.jboss.tools.openshift.cdk.server.core.internal.adapter.runtime.DummyServerRuntime"
description="A runtime representing a Vagrant container."
id="org.jboss.tools.openshift.cdk.server.runtime.type"
name="CDK"
supportsManualCreation="false"
vendor="%enterpriseProviderName"
version="1.0">
</runtimeType>
</extension>


<!-- Launch Configuration for the servers -->
<extension
point="org.eclipse.debug.core.launchConfigurationTypes">
<launchConfigurationType
category="Red Hat"
delegate="org.jboss.ide.eclipse.as.wtp.core.server.launch.ControllableServerLaunchConfiguration"
id="org.jboss.tools.openshift.cdk.server.core.internal.behaviour.launchType"
modes="run"
name="Red Hat CDK Server Startup Configuration"
public="true"
sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
</extension>





<extension
point="org.eclipse.wst.server.ui.serverImages">
<image
icon="$nl$/icons/vagrant_16.png"
typeIds="org.jboss.tools.openshift.cdk.server.type,org.jboss.tools.openshift.cdk.server.runtime.type"
id="org.jboss.tools.openshift.cdk.server.type.icon"/>
</extension>

<extension
point="org.eclipse.wst.server.ui.wizardFragments">
<fragment
class="org.jboss.tools.openshift.cdk.server.ui.internal.CDKServerWizardFragment"
typeIds="org.jboss.tools.openshift.cdk.server.type"
id="org.jboss.tools.openshift.cdk.server.type.VagrantServerWizardFragment"/>
</extension>

<extension
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
<launchConfigurationTabGroup
class="org.jboss.tools.openshift.cdk.server.ui.internal.CDKLaunchConfigurationTabGroup"
description="Launch Tabs for CDK Server"
id="org.jboss.tools.openshift.cdk.server.ui.internal.CDKLaunchConfigurationTabGroup"
type="org.jboss.tools.openshift.cdk.server.core.internal.behaviour.launchType"/>
</extension>



<extension
point="org.eclipse.wst.server.ui.editorPageSections">
<section
class="org.jboss.tools.openshift.cdk.server.ui.internal.LocationSection"
id="org.jboss.tools.openshift.cdk.server.ui.internal.LocationSection"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="8"
typeIds="org.jboss.tools.openshift.cdk.server.type"/>
<section
class="org.jboss.tools.openshift.cdk.server.ui.internal.CDKCredentialSection"
id="org.jboss.tools.openshift.cdk.server.ui.internal.CDKCredentialSection"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="9"
typeIds="org.jboss.tools.openshift.cdk.server.type"/>
</extension>


<!-- command handler to start the server -->
<extension point="org.eclipse.ui.commands">
<command
id="org.jboss.tools.openshift.cdk.server.ui.internal.launchCDKServer"
name="%launch_cdk_server">
</command>
</extension>

<extension point="org.eclipse.ui.handlers">
<handler
class="org.jboss.tools.openshift.cdk.server.ui.internal.commands.LaunchCDKServerHandler"
commandId="org.jboss.tools.openshift.cdk.server.ui.internal.launchCDKServer">
</handler>
</extension>
<extension
point="org.jboss.tools.runtime.core.runtimeDetectors">
<runtimeDetector
class="org.jboss.tools.openshift.cdk.server.core.internal.detection.CDKRuntimeDetector"
enabled="true"
id="org.jboss.tools.openshift.cdk.server.core.internal.detection.CDKRuntimeDetector"
name="CDK">
</runtimeDetector>
</extension>


<!-- Launch Controllers -->
<extension
point="org.jboss.ide.eclipse.as.wtp.core.serverSubsystem">
<subsystem
system="launch"
id="launch.cdk"
name="Launch the CDK Server"
class="org.jboss.tools.openshift.cdk.server.core.internal.adapter.controllers.CDKLaunchController">
</subsystem>
<subsystemMapping
id="launch.cdk"
mappedId="launch.cdk"
serverTypes="org.jboss.tools.openshift.cdk.server.type">
</subsystemMapping>

<subsystem
system="shutdown"
id="shutdown.cdk"
name="Shutdown the CDK Server"
class="org.jboss.tools.openshift.cdk.server.core.internal.adapter.controllers.CDKShutdownController">
</subsystem>
<subsystemMapping
id="shutdown.cdk"
mappedId="shutdown.cdk"
serverTypes="org.jboss.tools.openshift.cdk.server.type">
</subsystemMapping>
</extension>

</plugin>
Loading

0 comments on commit d6a2d2e

Please sign in to comment.