JBoss Tools SVN: r40518 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-04-26 07:21:04 -0400 (Thu, 26 Apr 2012)
New Revision: 40518
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
Log:
JBIDE-11193 OpenShift Explorer in jboss perspective
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-04-26 11:14:17 UTC (rev 40517)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-04-26 11:21:04 UTC (rev 40518)
@@ -622,5 +622,15 @@
</input>
</propertySection>
</propertySections>
- </extension -->
+ </extension -->
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.jboss.tools.common.ui.JBossPerspective">
+ <view relative="org.eclipse.ui.views.ProblemView"
+ relationship="stack"
+ id="org.jboss.tools.openshift.express.ui.viewer.expressConsoleView">
+ </view>
+ </perspectiveExtension>
+ </extension>
</plugin>
13 years, 8 months
JBoss Tools SVN: r40517 - trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-04-26 07:14:17 -0400 (Thu, 26 Apr 2012)
New Revision: 40517
Modified:
trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java
Log:
JBIDE-11675 avoid NPE when project does not have GWT config
Modified: trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java 2012-04-26 10:43:50 UTC (rev 40516)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java 2012-04-26 11:14:17 UTC (rev 40517)
@@ -87,6 +87,11 @@
boolean configureGWT = store.getBoolean(Activator.CONFIGURE_GWT);
if(configureGWT){
Plugin newConfig = event.getMavenProject().getMavenProject().getPlugin(GWT_WAR_MAVEN_PLUGIN_KEY);
+ if(newConfig==null) {
+ // no config found so just stop.
+ return;
+ }
+
IJavaProject javaProject = JavaCore.create(event.getMavenProject().getProject());
List<String> modNames = findModules(newConfig, javaProject);
13 years, 8 months
JBoss Tools SVN: r40516 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-04-26 06:43:50 -0400 (Thu, 26 Apr 2012)
New Revision: 40516
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportOpenShiftExpressApplicationWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewOpenShiftExpressApplicationWizard.java
Log:
JBIDE-11475 remove mention of Express in UI and tests
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportOpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportOpenShiftExpressApplicationWizard.java 2012-04-26 10:21:06 UTC (rev 40515)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportOpenShiftExpressApplicationWizard.java 2012-04-26 10:43:50 UTC (rev 40516)
@@ -18,7 +18,7 @@
* Constructor
*/
public ImportOpenShiftExpressApplicationWizard() {
- super(true, "Import OpenShift Express Application");
+ super(true, "Import OpenShift Application");
}
public ImportOpenShiftExpressApplicationWizard(UserDelegate user, IProject project, IApplication application) {
@@ -32,6 +32,6 @@
* @param application
*/
public ImportOpenShiftExpressApplicationWizard(UserDelegate user, IProject project, IApplication application, boolean skipCredentialsPage) {
- super(user, project, application, true, skipCredentialsPage, "Import OpenShift Express Application");
+ super(user, project, application, true, skipCredentialsPage, "Import OpenShift Application");
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewOpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewOpenShiftExpressApplicationWizard.java 2012-04-26 10:21:06 UTC (rev 40515)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewOpenShiftExpressApplicationWizard.java 2012-04-26 10:43:50 UTC (rev 40516)
@@ -15,10 +15,10 @@
* Constructor
*/
public NewOpenShiftExpressApplicationWizard() {
- super(false, "New OpenShift Express Application");
+ super(false, "New OpenShift Application");
}
public NewOpenShiftExpressApplicationWizard(UserDelegate user) {
- super(user, null, null, false, "New OpenShift Express Application");
+ super(user, null, null, false, "New OpenShift Application");
}
}
13 years, 8 months
JBoss Tools SVN: r40515 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib: schema and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-04-26 06:21:06 -0400 (Thu, 26 Apr 2012)
New Revision: 40515
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-h2.ddl
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-hsql.ddl
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-mysql.ddl
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-postgres.ddl
Log:
Unified schemas for hibernate ui bot testing databases added
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-h2.ddl
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-h2.ddl (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-h2.ddl 2012-04-26 10:21:06 UTC (rev 40515)
@@ -0,0 +1,122 @@
+
+ create table PUBLIC.CUSTOMERS (
+ CUSTOMERNUMBER integer not null unique,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ CONTACTFIRSTNAME varchar(50) not null,
+ CONTACTLASTNAME varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ CREDITLIMIT double,
+ CUSTOMERNAME varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15),
+ STATE varchar(50),
+ SALESREPEMPLOYEENUMBER integer,
+ primary key (CUSTOMERNUMBER)
+ );
+
+ create table PUBLIC.EMPLOYEES (
+ EMPLOYEENUMBER integer not null unique,
+ EMAIL varchar(100) not null,
+ EXTENSION varchar(10) not null,
+ FIRSTNAME varchar(50) not null,
+ JOBTITLE varchar(50) not null,
+ LASTNAME varchar(50) not null,
+ OFFICECODE varchar(10) not null,
+ REPORTSTO integer,
+ primary key (EMPLOYEENUMBER)
+ );
+
+ create table PUBLIC.OFFICES (
+ OFFICECODE varchar(10) not null unique,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15) not null,
+ STATE varchar(50),
+ TERRITORY varchar(10) not null,
+ primary key (OFFICECODE)
+ );
+
+ create table PUBLIC.ORDERDETAILS (
+ ORDERDETAILNUMBER integer generated by default as identity unique,
+ ORDERLINENUMBER smallint not null,
+ PRICEEACH double not null,
+ QUANTITYORDERED integer not null,
+ ORDERNUMBER integer not null,
+ PRODUCTCODE varchar(15) not null,
+ primary key (ORDERDETAILNUMBER)
+ );
+
+ create table PUBLIC.ORDERS (
+ ORDERNUMBER integer not null unique,
+ COMMENTS varchar(255),
+ ORDERDATE date not null,
+ REQUIREDDATE date not null,
+ SHIPPEDDATE date,
+ STATUS varchar(16) not null,
+ CUSTOMERNUMBER integer not null,
+ primary key (ORDERNUMBER)
+ );
+
+ create table PUBLIC.PAYMENTS (
+ PAYMENTNUMBER integer generated by default as identity unique,
+ AMOUNT double not null,
+ CHECKNUMBER varchar(50) not null,
+ PAYMENTDATE date not null,
+ CUSTOMERNUMBER integer not null,
+ primary key (PAYMENTNUMBER)
+ );
+
+ create table PUBLIC.PRODUCTLINES (
+ PRODUCTLINE varchar(50) not null unique,
+ HTMLDESCRIPTION varchar(4000),
+ TEXTDESCRIPTION varchar(4000),
+ primary key (PRODUCTLINE)
+ );
+
+ create table PUBLIC.PRODUCTS (
+ PRODUCTCODE varchar(15) not null unique,
+ BUYPRICE double not null,
+ MSRP double not null,
+ PRODUCTDESCRIPTION varchar(4000) not null,
+ PRODUCTNAME varchar(70) not null,
+ PRODUCTSCALE varchar(10) not null,
+ PRODUCTVENDOR varchar(50) not null,
+ QUANTITYINSTOCK smallint not null,
+ PRODUCTLINE varchar(50) not null,
+ primary key (PRODUCTCODE)
+ );
+
+ alter table PUBLIC.CUSTOMERS
+ add constraint FK6268C352BA1F285
+ foreign key (SALESREPEMPLOYEENUMBER)
+ references PUBLIC.EMPLOYEES;
+
+ alter table PUBLIC.ORDERDETAILS
+ add constraint FKB8CC1F346F6F0C88
+ foreign key (PRODUCTCODE)
+ references PUBLIC.PRODUCTS;
+
+ alter table PUBLIC.ORDERDETAILS
+ add constraint FKB8CC1F34854B4C4
+ foreign key (ORDERNUMBER)
+ references PUBLIC.ORDERS;
+
+ alter table PUBLIC.ORDERS
+ add constraint FK8B7256E5814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS;
+
+ alter table PUBLIC.PAYMENTS
+ add constraint FK810FFF2D814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS;
+
+ alter table PUBLIC.PRODUCTS
+ add constraint FKF2D1C164A675589B
+ foreign key (PRODUCTLINE)
+ references PUBLIC.PRODUCTLINES;
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-hsql.ddl
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-hsql.ddl (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-hsql.ddl 2012-04-26 10:21:06 UTC (rev 40515)
@@ -0,0 +1,130 @@
+
+ create table PUBLIC.CUSTOMERS (
+ CUSTOMERNUMBER integer not null,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ CONTACTFIRSTNAME varchar(50) not null,
+ CONTACTLASTNAME varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ CREDITLIMIT double,
+ CUSTOMERNAME varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15),
+ STATE varchar(50),
+ SALESREPEMPLOYEENUMBER integer,
+ primary key (CUSTOMERNUMBER),
+ unique (CUSTOMERNUMBER)
+ );
+
+ create table PUBLIC.EMPLOYEES (
+ EMPLOYEENUMBER integer not null,
+ EMAIL varchar(100) not null,
+ EXTENSION varchar(10) not null,
+ FIRSTNAME varchar(50) not null,
+ JOBTITLE varchar(50) not null,
+ LASTNAME varchar(50) not null,
+ OFFICECODE varchar(10) not null,
+ REPORTSTO integer,
+ primary key (EMPLOYEENUMBER),
+ unique (EMPLOYEENUMBER)
+ );
+
+ create table PUBLIC.OFFICES (
+ OFFICECODE varchar(10) not null,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15) not null,
+ STATE varchar(50),
+ TERRITORY varchar(10) not null,
+ primary key (OFFICECODE),
+ unique (OFFICECODE)
+ );
+
+ create table PUBLIC.ORDERDETAILS (
+ ORDERDETAILNUMBER integer generated by default as identity (start with 1),
+ ORDERLINENUMBER smallint not null,
+ PRICEEACH double not null,
+ QUANTITYORDERED integer not null,
+ ORDERNUMBER integer not null,
+ PRODUCTCODE varchar(15) not null,
+ primary key (ORDERDETAILNUMBER),
+ unique (ORDERDETAILNUMBER)
+ );
+
+ create table PUBLIC.ORDERS (
+ ORDERNUMBER integer not null,
+ COMMENTS varchar(255),
+ ORDERDATE date not null,
+ REQUIREDDATE date not null,
+ SHIPPEDDATE date,
+ STATUS varchar(16) not null,
+ CUSTOMERNUMBER integer not null,
+ primary key (ORDERNUMBER),
+ unique (ORDERNUMBER)
+ );
+
+ create table PUBLIC.PAYMENTS (
+ PAYMENTNUMBER integer generated by default as identity (start with 1),
+ AMOUNT double not null,
+ CHECKNUMBER varchar(50) not null,
+ PAYMENTDATE date not null,
+ CUSTOMERNUMBER integer not null,
+ primary key (PAYMENTNUMBER),
+ unique (PAYMENTNUMBER)
+ );
+
+ create table PUBLIC.PRODUCTLINES (
+ PRODUCTLINE varchar(50) not null,
+ HTMLDESCRIPTION varchar(4000),
+ TEXTDESCRIPTION varchar(4000),
+ primary key (PRODUCTLINE),
+ unique (PRODUCTLINE)
+ );
+
+ create table PUBLIC.PRODUCTS (
+ PRODUCTCODE varchar(15) not null,
+ BUYPRICE double not null,
+ MSRP double not null,
+ PRODUCTDESCRIPTION varchar(4000) not null,
+ PRODUCTNAME varchar(70) not null,
+ PRODUCTSCALE varchar(10) not null,
+ PRODUCTVENDOR varchar(50) not null,
+ QUANTITYINSTOCK smallint not null,
+ PRODUCTLINE varchar(50) not null,
+ primary key (PRODUCTCODE),
+ unique (PRODUCTCODE)
+ );
+
+ alter table PUBLIC.CUSTOMERS
+ add constraint FK6268C352BA1F285
+ foreign key (SALESREPEMPLOYEENUMBER)
+ references PUBLIC.EMPLOYEES;
+
+ alter table PUBLIC.ORDERDETAILS
+ add constraint FKB8CC1F346F6F0C88
+ foreign key (PRODUCTCODE)
+ references PUBLIC.PRODUCTS;
+
+ alter table PUBLIC.ORDERDETAILS
+ add constraint FKB8CC1F34854B4C4
+ foreign key (ORDERNUMBER)
+ references PUBLIC.ORDERS;
+
+ alter table PUBLIC.ORDERS
+ add constraint FK8B7256E5814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS;
+
+ alter table PUBLIC.PAYMENTS
+ add constraint FK810FFF2D814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS;
+
+ alter table PUBLIC.PRODUCTS
+ add constraint FKF2D1C164A675589B
+ foreign key (PRODUCTLINE)
+ references PUBLIC.PRODUCTLINES;
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-mysql.ddl
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-mysql.ddl (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-mysql.ddl 2012-04-26 10:21:06 UTC (rev 40515)
@@ -0,0 +1,128 @@
+
+ create table PUBLIC.CUSTOMERS (
+ CUSTOMERNUMBER integer not null unique,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ CONTACTFIRSTNAME varchar(50) not null,
+ CONTACTLASTNAME varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ CREDITLIMIT double precision,
+ CUSTOMERNAME varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15),
+ STATE varchar(50),
+ SALESREPEMPLOYEENUMBER integer,
+ primary key (CUSTOMERNUMBER)
+ );
+
+ create table PUBLIC.EMPLOYEES (
+ EMPLOYEENUMBER integer not null unique,
+ EMAIL varchar(100) not null,
+ EXTENSION varchar(10) not null,
+ FIRSTNAME varchar(50) not null,
+ JOBTITLE varchar(50) not null,
+ LASTNAME varchar(50) not null,
+ OFFICECODE varchar(10) not null,
+ REPORTSTO integer,
+ primary key (EMPLOYEENUMBER)
+ );
+
+ create table PUBLIC.OFFICES (
+ OFFICECODE varchar(10) not null unique,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15) not null,
+ STATE varchar(50),
+ TERRITORY varchar(10) not null,
+ primary key (OFFICECODE)
+ );
+
+ create table PUBLIC.ORDERDETAILS (
+ ORDERDETAILNUMBER integer not null auto_increment unique,
+ ORDERLINENUMBER smallint not null,
+ PRICEEACH double precision not null,
+ QUANTITYORDERED integer not null,
+ ORDERNUMBER integer not null,
+ PRODUCTCODE varchar(15) not null,
+ primary key (ORDERDETAILNUMBER)
+ );
+
+ create table PUBLIC.ORDERS (
+ ORDERNUMBER integer not null unique,
+ COMMENTS varchar(255),
+ ORDERDATE date not null,
+ REQUIREDDATE date not null,
+ SHIPPEDDATE date,
+ STATUS varchar(16) not null,
+ CUSTOMERNUMBER integer not null,
+ primary key (ORDERNUMBER)
+ );
+
+ create table PUBLIC.PAYMENTS (
+ PAYMENTNUMBER integer not null auto_increment unique,
+ AMOUNT double precision not null,
+ CHECKNUMBER varchar(50) not null,
+ PAYMENTDATE date not null,
+ CUSTOMERNUMBER integer not null,
+ primary key (PAYMENTNUMBER)
+ );
+
+ create table PUBLIC.PRODUCTLINES (
+ PRODUCTLINE varchar(50) not null unique,
+ HTMLDESCRIPTION longtext,
+ TEXTDESCRIPTION longtext,
+ primary key (PRODUCTLINE)
+ );
+
+ create table PUBLIC.PRODUCTS (
+ PRODUCTCODE varchar(15) not null unique,
+ BUYPRICE double precision not null,
+ MSRP double precision not null,
+ PRODUCTDESCRIPTION longtext not null,
+ PRODUCTNAME varchar(70) not null,
+ PRODUCTSCALE varchar(10) not null,
+ PRODUCTVENDOR varchar(50) not null,
+ QUANTITYINSTOCK smallint not null,
+ PRODUCTLINE varchar(50) not null,
+ primary key (PRODUCTCODE)
+ );
+
+ alter table PUBLIC.CUSTOMERS
+ add index FK6268C352BA1F285 (SALESREPEMPLOYEENUMBER),
+ add constraint FK6268C352BA1F285
+ foreign key (SALESREPEMPLOYEENUMBER)
+ references PUBLIC.EMPLOYEES (EMPLOYEENUMBER);
+
+ alter table PUBLIC.ORDERDETAILS
+ add index FKB8CC1F346F6F0C88 (PRODUCTCODE),
+ add constraint FKB8CC1F346F6F0C88
+ foreign key (PRODUCTCODE)
+ references PUBLIC.PRODUCTS (PRODUCTCODE);
+
+ alter table PUBLIC.ORDERDETAILS
+ add index FKB8CC1F34854B4C4 (ORDERNUMBER),
+ add constraint FKB8CC1F34854B4C4
+ foreign key (ORDERNUMBER)
+ references PUBLIC.ORDERS (ORDERNUMBER);
+
+ alter table PUBLIC.ORDERS
+ add index FK8B7256E5814A2234 (CUSTOMERNUMBER),
+ add constraint FK8B7256E5814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS (CUSTOMERNUMBER);
+
+ alter table PUBLIC.PAYMENTS
+ add index FK810FFF2D814A2234 (CUSTOMERNUMBER),
+ add constraint FK810FFF2D814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS (CUSTOMERNUMBER);
+
+ alter table PUBLIC.PRODUCTS
+ add index FKF2D1C164A675589B (PRODUCTLINE),
+ add constraint FKF2D1C164A675589B
+ foreign key (PRODUCTLINE)
+ references PUBLIC.PRODUCTLINES (PRODUCTLINE);
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-postgres.ddl
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-postgres.ddl (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/schema/schema-postgres.ddl 2012-04-26 10:21:06 UTC (rev 40515)
@@ -0,0 +1,122 @@
+
+ create table PUBLIC.CUSTOMERS (
+ CUSTOMERNUMBER int4 not null unique,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ CONTACTFIRSTNAME varchar(50) not null,
+ CONTACTLASTNAME varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ CREDITLIMIT float8,
+ CUSTOMERNAME varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15),
+ STATE varchar(50),
+ SALESREPEMPLOYEENUMBER int4,
+ primary key (CUSTOMERNUMBER)
+ );
+
+ create table PUBLIC.EMPLOYEES (
+ EMPLOYEENUMBER int4 not null unique,
+ EMAIL varchar(100) not null,
+ EXTENSION varchar(10) not null,
+ FIRSTNAME varchar(50) not null,
+ JOBTITLE varchar(50) not null,
+ LASTNAME varchar(50) not null,
+ OFFICECODE varchar(10) not null,
+ REPORTSTO int4,
+ primary key (EMPLOYEENUMBER)
+ );
+
+ create table PUBLIC.OFFICES (
+ OFFICECODE varchar(10) not null unique,
+ ADDRESSLINE1 varchar(50) not null,
+ ADDRESSLINE2 varchar(50),
+ CITY varchar(50) not null,
+ COUNTRY varchar(50) not null,
+ PHONE varchar(50) not null,
+ POSTALCODE varchar(15) not null,
+ STATE varchar(50),
+ TERRITORY varchar(10) not null,
+ primary key (OFFICECODE)
+ );
+
+ create table PUBLIC.ORDERDETAILS (
+ ORDERDETAILNUMBER serial not null unique,
+ ORDERLINENUMBER int2 not null,
+ PRICEEACH float8 not null,
+ QUANTITYORDERED int4 not null,
+ ORDERNUMBER int4 not null,
+ PRODUCTCODE varchar(15) not null,
+ primary key (ORDERDETAILNUMBER)
+ );
+
+ create table PUBLIC.ORDERS (
+ ORDERNUMBER int4 not null unique,
+ COMMENTS varchar(255),
+ ORDERDATE date not null,
+ REQUIREDDATE date not null,
+ SHIPPEDDATE date,
+ STATUS varchar(16) not null,
+ CUSTOMERNUMBER int4 not null,
+ primary key (ORDERNUMBER)
+ );
+
+ create table PUBLIC.PAYMENTS (
+ PAYMENTNUMBER serial not null unique,
+ AMOUNT float8 not null,
+ CHECKNUMBER varchar(50) not null,
+ PAYMENTDATE date not null,
+ CUSTOMERNUMBER int4 not null,
+ primary key (PAYMENTNUMBER)
+ );
+
+ create table PUBLIC.PRODUCTLINES (
+ PRODUCTLINE varchar(50) not null unique,
+ HTMLDESCRIPTION varchar(4000),
+ TEXTDESCRIPTION varchar(4000),
+ primary key (PRODUCTLINE)
+ );
+
+ create table PUBLIC.PRODUCTS (
+ PRODUCTCODE varchar(15) not null unique,
+ BUYPRICE float8 not null,
+ MSRP float8 not null,
+ PRODUCTDESCRIPTION varchar(4000) not null,
+ PRODUCTNAME varchar(70) not null,
+ PRODUCTSCALE varchar(10) not null,
+ PRODUCTVENDOR varchar(50) not null,
+ QUANTITYINSTOCK int2 not null,
+ PRODUCTLINE varchar(50) not null,
+ primary key (PRODUCTCODE)
+ );
+
+ alter table PUBLIC.CUSTOMERS
+ add constraint FK6268C352BA1F285
+ foreign key (SALESREPEMPLOYEENUMBER)
+ references PUBLIC.EMPLOYEES;
+
+ alter table PUBLIC.ORDERDETAILS
+ add constraint FKB8CC1F346F6F0C88
+ foreign key (PRODUCTCODE)
+ references PUBLIC.PRODUCTS;
+
+ alter table PUBLIC.ORDERDETAILS
+ add constraint FKB8CC1F34854B4C4
+ foreign key (ORDERNUMBER)
+ references PUBLIC.ORDERS;
+
+ alter table PUBLIC.ORDERS
+ add constraint FK8B7256E5814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS;
+
+ alter table PUBLIC.PAYMENTS
+ add constraint FK810FFF2D814A2234
+ foreign key (CUSTOMERNUMBER)
+ references PUBLIC.CUSTOMERS;
+
+ alter table PUBLIC.PRODUCTS
+ add constraint FKF2D1C164A675589B
+ foreign key (PRODUCTLINE)
+ references PUBLIC.PRODUCTLINES;
13 years, 8 months
JBoss Tools SVN: r40514 - in trunk: openshift/features/org.jboss.tools.openshift.egit.integration.test.feature and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-04-26 06:12:40 -0400 (Thu, 26 Apr 2012)
New Revision: 40514
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
trunk/openshift/features/org.jboss.tools.openshift.egit.integration.test.feature/feature.properties
trunk/openshift/features/org.jboss.tools.openshift.express.test.feature/feature.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsSection.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
JBIDE-11475 remove mention of Express in UI and tests
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -51,8 +51,8 @@
bot.hyperlink(IDELabel.JBossCentralEditor.OPENSHIFT_APP).click();
bot.waitForShell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD);
bot.waitWhile(new NonSystemJobRunsCondition());
- assertTrue("New OpenShift Express Application window should have appeared", bot.activeShell().getText().equals(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD));
- //assertTrue("New OpenShift Express Application window should have appeared", bot.shell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD).isActive());
+ assertTrue("New OpenShift Application window should have appeared", bot.activeShell().getText().equals(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD));
+ //assertTrue("New OpenShift Application window should have appeared", bot.shell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD).isActive());
bot.activeShell().close();
//check Project example and detection of server
Modified: trunk/openshift/features/org.jboss.tools.openshift.egit.integration.test.feature/feature.properties
===================================================================
--- trunk/openshift/features/org.jboss.tools.openshift.egit.integration.test.feature/feature.properties 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/features/org.jboss.tools.openshift.egit.integration.test.feature/feature.properties 2012-04-26 10:12:40 UTC (rev 40514)
@@ -15,13 +15,13 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=JBoss OpenShift Express EGit Utils Test
+featureName=JBoss OpenShift EGit Utils Test
# "providerName" property - name of the company that provides the feature
providerName=JBoss by Red Hat
# "description" property - description of the feature
-description=Tests for EGit utils that deal with OpenShift Express git operations.
+description=Tests for EGit utils that deal with OpenShift git operations.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2012 Red Hat, Inc. and others.\n\
Modified: trunk/openshift/features/org.jboss.tools.openshift.express.test.feature/feature.properties
===================================================================
--- trunk/openshift/features/org.jboss.tools.openshift.express.test.feature/feature.properties 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/features/org.jboss.tools.openshift.express.test.feature/feature.properties 2012-04-26 10:12:40 UTC (rev 40514)
@@ -15,13 +15,13 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=JBoss OpenShift Express Tools Test
+featureName=JBoss OpenShift Tools Test
# "providerName" property - name of the company that provides the feature
providerName=JBoss by Red Hat
# "description" property - description of the feature
-description=Tests for Tooling to deal with OpenShift Express. It will allow you to sign into your OpenShift Express account, create a domain and manage applications. It will furthermore allow you to setup an Eclipse WTP server adapter that would be able to publish projects to the OpenShift Express PaaS platform..
+description=Tests for Tooling to deal with OpenShift. It will allow you to sign into your OpenShift account, create a domain and manage applications. It will furthermore allow you to setup an Eclipse WTP server adapter that would be able to publish projects to the OpenShift PaaS platform..
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2012 Red Hat, Inc. and others.\n\
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties 2012-04-26 10:12:40 UTC (rev 40514)
@@ -3,6 +3,6 @@
providerName=JBoss Community
# Version Delegates
-openshift.express.name=OpenShift Express Server
-openshift.express.description=A server adapter for use interfacing with the OpenShift Express Framework
-openshift.express.runtime.name = OpenShift Express Runtime
+openshift.express.name=OpenShift Server
+openshift.express.description=A server adapter for use with OpenShift Applications
+openshift.express.runtime.name = OpenShift Server Runtime
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties 2012-04-26 10:12:40 UTC (rev 40514)
@@ -2,7 +2,7 @@
requestCommitAndPushMsg=There are {0} local changes in "{1}". Do you want to publish to OpenShift by commiting the changes and pushing its Git repository?
requestPushTitle=Publish {0}?
requestPushMsg=The are no local changes in "{0}". Do you want to publish to OpenShift by pushing its Git repository?
-cannotModifyModules=Openshift Express servers cannot be modified.
+cannotModifyModules=OpenShift servers cannot be modified.
additionNotRequiredModule=This server requires the {0} application.
shareProjectTitle=Share projects?
shareProjectMessage="There are {0} projects that are not connected to any git repository. Would you like to share them now?
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -486,7 +486,7 @@
} else if( appList == null ) {
error = "Please click \"verify\" to test your credentials.";
} else if( fdomain == null ) {
- error = "Your OpenShift Express account has not been configured with a domain.";
+ error = "Your OpenShift account has not been configured with a domain.";
} else if( app == null || app.equals("")) {
error = "Please select an application from the combo below.";
} else {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsSection.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsSection.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsSection.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -65,7 +65,7 @@
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED|ExpandableComposite.TITLE_BAR);
- section.setText("Openshift Express Server");
+ section.setText("Openshift Server");
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL| GridData.GRAB_VERTICAL));
Composite c = new Composite(section, SWT.NONE);
c.setLayout(new GridLayout(2,true));
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -115,9 +115,9 @@
try {
return getChildrenForElement(parentElement, recurse);
} catch (OpenShiftException e) {
- Logger.error("Unable to retrieve OpenShift Express information", e);
+ Logger.error("Unable to retrieve OpenShift information", e);
} catch (SocketTimeoutException e) {
- Logger.error("Unable to retrieve OpenShift Express information", e);
+ Logger.error("Unable to retrieve OpenShift information", e);
}
return new Object[0];
}
@@ -142,17 +142,17 @@
getChildrenFor(children);
}
// } catch (OpenShiftException e) {
-// Logger.error("Unable to retrieve OpenShift Express information", e);
+// Logger.error("Unable to retrieve OpenShift information", e);
// }
return children;
}
private void launchLoadingUserJob(final UserDelegate user) {
- Job job = new Job("Loading OpenShift Express User information...") {
+ Job job = new Job("Loading OpenShift User information...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Loading OpenShift Express information...", IProgressMonitor.UNKNOWN);
+ monitor.beginTask("Loading OpenShift information...", IProgressMonitor.UNKNOWN);
monitor.worked(1);
// Get the actual children, with the delay
loadingUsers.add(user);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -116,7 +116,7 @@
public ApplicationConfigurationWizardPage(IWizard wizard, OpenShiftExpressApplicationWizardModel wizardModel) {
super("Setup OpenShift Application",
- "Enter a name and select a type for your new OpenShift Express application.",
+ "Enter a name and select a type for your new OpenShift application.",
"Setup OpenShift Application", wizard);
try {
this.pageModel = new ApplicationConfigurationWizardPageModel(wizardModel);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -62,7 +62,7 @@
private Text passwordText = null;
public CredentialsWizardPage(IWizard wizard, IUserAwareModel wizardModel) {
- super("Sign in to OpenShift", "Please provide your OpenShift Express credentials.", "Server Connection",
+ super("Sign in to OpenShift", "Please provide your OpenShift credentials.", "Server Connection",
wizard);
this.pageModel = new CredentialsWizardPageModel(wizardModel);
}
@@ -71,7 +71,7 @@
GridLayoutFactory.fillDefaults().numColumns(2).margins(10, 10).applyTo(container);
Link signupLink = new Link(container, SWT.WRAP);
- signupLink.setText("If you do not have an account on OpenShift Express, please sign up <a>here</a>.");
+ signupLink.setText("If you do not have an account on OpenShift, please sign up <a>here</a>.");
GridDataFactory.fillDefaults()
.align(SWT.LEFT, SWT.CENTER).span(2, 1).applyTo(signupLink);
signupLink.addSelectionListener(onSignupLinkClicked());
@@ -210,7 +210,7 @@
&& !StringUtils.isEmpty(passwordValue)) {
return ValidationStatus.ok();
}
- return ValidationStatus.cancel("Please provide your OpenShift Express user credentials");
+ return ValidationStatus.cancel("Please provide your OpenShift user credentials");
}
}
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -53,7 +53,7 @@
log.info("OpenShift SWTBot Tests: Domain created.");
log.info("OpenShift SWTBot Tests: Waiting for 'New Application wizard'.");
- bot.waitForShell("New OpenShift Express Application", 100);
+ bot.waitForShell("New OpenShift Application", 100);
log.info("OpenShift SWTBot Tests: 'New Application wizard' created.");
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -17,7 +17,7 @@
/**
* <b>OpenShift SWTBot TestSuite</b>
* <br>
- * This bot test will try to demonstrate a new OpenShift Express Application and domain life cycle.
+ * This bot test will try to demonstrate a new OpenShift Application and domain life cycle.
*
* <br>
* TestSuite covers following test cases :
@@ -27,7 +27,7 @@
* <li>JBDS50_XXXX Domain is created, renamed correctly</li>
* <li>JBDS50_XXXX App with JBossAS7 cartridge is created correctly via
* OpenShift wizards</li>
- * <li>JBDS50_XXXX Embed jenkins etc. into OpenShift Express applications</li>
+ * <li>JBDS50_XXXX Embed jenkins etc. into OpenShift applications</li>
* <li>JBDS50_XXXX App with JBossAS7 cartridge can be deleted</li>
* <li>JBDS50_XXXX JBoss server adapter is created successfully</li>
* <li>JBDS50_XXXX App with JBossAS7 cartridge can be modified and republished</li>
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -32,7 +32,7 @@
@Test
public void canValidateCredentials() throws InterruptedException {
- // create new OpenShift Express Application
+ // create new OpenShift Application
SWTBot wiz = open.newObject(OpenShiftUI.NewApplication.iNewObject);
storePasswordThenForward();
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -13,7 +13,7 @@
/**
*
- * Destroys registered domain on OpenShift Express
+ * Destroys registered domain on OpenShift
*
* @param domain
* @param login
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -25,7 +25,7 @@
public static final IView iView = new IView() {
@Override
public String getName() {
- return "OpenShift Express Console";
+ return "OpenShift Explorer";
}
@Override
@@ -39,7 +39,7 @@
/**
*
- * Class representing "navigation" to new OpenShift Express Application
+ * Class representing "navigation" to new OpenShift Application
*
*/
public static class NewApplication {
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-04-26 10:10:09 UTC (rev 40513)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-04-26 10:12:40 UTC (rev 40514)
@@ -839,7 +839,7 @@
public static final String NEW_DYNAMIC_WEB_PROJECT = "New Dynamic Web Project";
public static final String PROJECT_EXAMPLE = "New Project Example";
public static final String NEW_JBOSS_PROJECT = "New JBoss Project";
- public static final String OPENSHIFT_APP_WIZARD = "New OpenShift Express Application";
+ public static final String OPENSHIFT_APP_WIZARD = "New OpenShift Application";
}
public static class NewViewDialog{
13 years, 8 months
JBoss Tools SVN: r40513 - trunk/openshift/plugins/org.jboss.tools.openshift.express.client.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-04-26 06:10:09 -0400 (Thu, 26 Apr 2012)
New Revision: 40513
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT-sources.jar
Log:
removing source jar
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
13 years, 8 months
JBoss Tools SVN: r40512 - in trunk/openshift/plugins: org.jboss.tools.openshift.express.ui and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-04-26 05:53:37 -0400 (Thu, 26 Apr 2012)
New Revision: 40512
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/OpenShiftSshSessionFactory.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTab.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTabGroup.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT-sources.jar
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT.jar
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
Log:
Fixed - JBIDE-11073
OpenShift Express Tool: Create a way to invoke rhc-port-forward functionality which enables users to debug their cloud environments with their local tools
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-04-26 09:38:03 UTC (rev 40511)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-04-26 09:53:37 UTC (rev 40512)
@@ -3,7 +3,7 @@
<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 exported="true" kind="lib" path="openshift-java-client-2.0.0-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="openshift-java-client-2.0.0-SNAPSHOT.jar" sourcepath="/openshift-java-client"/>
<classpathentry kind="lib" path="jboss-dmr-1.0.0.Final.jar"/>
<classpathentry kind="lib" path="log4j-1.2.16.jar"/>
<classpathentry kind="lib" path="slf4j-api-1.6.1.jar"/>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2012-04-26 09:38:03 UTC (rev 40511)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2012-04-26 09:53:37 UTC (rev 40512)
@@ -42,7 +42,9 @@
org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200",
org.jboss.ide.eclipse.archives.webtools;bundle-version="2.3.0",
org.eclipse.equinox.security;bundle-version="1.1.1",
- org.jboss.ide.eclipse.as.dmr;bundle-version="2.3.0"
+ org.jboss.ide.eclipse.as.dmr;bundle-version="2.3.0",
+ org.eclipse.jsch.ui;bundle-version="1.1.300",
+ org.eclipse.jdt.debug.ui;bundle-version="3.6.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-04-26 09:38:03 UTC (rev 40511)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-04-26 09:53:37 UTC (rev 40512)
@@ -162,7 +162,7 @@
<viewerActionBinding viewerId="org.eclipse.wst.server.ui.ServersView">
<includes>
<actionExtension
- pattern="org.jboss.tools.openshift.express.ui.internal.ui.console.tailServerLogActionProvider"/>
+ pattern="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.tailServerLogActionProvider"/>
</includes>
</viewerActionBinding>
</extension>
@@ -329,6 +329,8 @@
<includes>
<actionExtension
pattern="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.*"/>
+ <actionExtension
+ pattern="org.jboss.tools.openshift.express.internal.core.portforward.applicationPortForwardActionProvider"/>
</includes>
</viewerActionBinding>
<viewerContentBinding
@@ -347,7 +349,7 @@
contentProvider="org.jboss.tools.openshift.express.internal.ui.viewer.OpenShiftExpressConsoleContentProvider"
id="org.jboss.tools.openshift.express.ui.viewer.expressConsoleContent"
labelProvider="org.jboss.tools.openshift.express.internal.ui.viewer.OpenShiftExpressConsoleLabelProvider"
- name="OpenShift Express Console Content">
+ name="OpenShift Explorer Content">
<triggerPoints></triggerPoints>
</navigatorContent>
<actionProvider
@@ -402,7 +404,7 @@
<instanceof
value="com.openshift.client.IApplication">
</instanceof>
- </and>
+ </and>
</enablement>
</actionProvider>
<actionProvider
@@ -417,6 +419,18 @@
</enablement>
</actionProvider>
<actionProvider
+ class="org.jboss.tools.openshift.express.internal.core.portforward.ApplicationPortForwardingActionProvider"
+ id="org.jboss.tools.openshift.express.internal.core.portforward.applicationPortForwardActionProvider">
+ <enablement>
+ <and>
+ <instanceof
+ value="com.openshift.client.IApplication">
+ </instanceof>
+ </and>
+ </enablement>
+ </actionProvider>
+
+ <actionProvider
class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.EditCartridgesActionProvider"
id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.editCartridgesActionProvider">
<enablement>
@@ -529,6 +543,45 @@
</adapter>
</factory>
</extension>
+ <!-- Launch configuration type to debug remote openshift applications. Not fully implemented yet... -->
+ <!--extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ delegate="org.jboss.tools.openshift.express.internal.core.portforward.RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate"
+ delegateName="Remote OpenShift Application "
+ id="org.jboss.tools.openshift.launchDebugConfigurationType"
+ modes="debug"
+ name="Remote OpenShift Application "
+ public="true">
+ </launchConfigurationType>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage
+ configTypeID="org.jboss.tools.openshift.launchDebugConfigurationType"
+ icon="icons/openshift-logo-white-icon.png"
+ id="org.jboss.tools.openshift.launchDebugConfigurationTypeImage">
+ </launchConfigurationTypeImage>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ class="org.jboss.tools.openshift.express.internal.core.portforward.RemoteOpenShiftApplicationConfigurationTabGroup"
+ id="org.jboss.tools.openshift.launchDebugConfigurationTabGroup"
+ type="org.jboss.tools.openshift.launchDebugConfigurationType">
+ </launchConfigurationTabGroup>
+ </extension -->
+
+ <!--extension
+ point="org.eclipse.debug.core.launchDelegates">
+ <launchDelegate
+ delegate="org.jboss.tools.openshift.express.internal.core.portforward.RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate"
+ id="org.jboss.tools.openshift.express.ui.launchDelegate2"
+ modes="debug"
+ name="Remote OpenShift application"
+ type="org.jboss.tools.openshift.launchDebugConfigurationType">
+ </launchDelegate>
+ </extension-->
<!-- when using the new 'tabbed' properties view. -->
<!--extension
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,43 @@
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.ui.action.AbstractAction;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.openshift.client.IApplication;
+
+public class ApplicationPortForwardingAction extends AbstractAction {
+
+ public ApplicationPortForwardingAction() {
+ super("Port forwarding...", DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_LCL_DISCONNECT));
+ }
+ /**
+ * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
+ * created, otherwise, it is displayed. {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ if (selection != null && selection instanceof ITreeSelection ) {
+ Object sel = ((ITreeSelection)selection).getFirstElement();
+ if( sel instanceof IApplication) {
+ IApplication application = (IApplication)sel;
+ try {
+ //TitleD
+ ApplicationPortForwardingWizard wizard = new ApplicationPortForwardingWizard(application);
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
+ dialog.setMinimumPageSize(700, 300);
+ dialog.create();
+ dialog.open();
+ } catch (Exception e) {
+ Logger.error("Failed to perform 'port-forwarding' for application '" + application.getName() + "'", e);
+ }
+ }
+ }
+ }
+
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingActionProvider.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,10 @@
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.AbstractActionProvider;
+
+public class ApplicationPortForwardingActionProvider extends AbstractActionProvider {
+
+ public ApplicationPortForwardingActionProvider() {
+ super(new ApplicationPortForwardingAction(), "group.showIn");
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizard.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizard.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import org.eclipse.jface.wizard.Wizard;
+
+import com.openshift.client.IApplication;
+
+
+/**
+ * @author Xavier Coulon
+ *
+ */
+public class ApplicationPortForwardingWizard extends Wizard {
+
+ private ApplicationPortForwardingWizardModel wizardModel;
+
+ public ApplicationPortForwardingWizard(IApplication application) {
+ this.wizardModel = new ApplicationPortForwardingWizardModel(application);
+ setNeedsProgressMonitor(true);
+ }
+
+ @Override
+ public boolean performFinish() {
+ return false;
+ }
+
+ @Override
+ public void addPages() {
+ addPage(new ApplicationPortForwardingWizardPage(wizardModel, this));
+ }
+
+ public IApplication getApplication() {
+ return wizardModel.getApplication();
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizard.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,79 @@
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.jboss.tools.common.databinding.ObservablePojo;
+
+import com.jcraft.jsch.JSchException;
+import com.openshift.client.IApplication;
+import com.openshift.client.IApplicationPortForwarding;
+import com.openshift.client.OpenShiftSSHOperationException;
+
+public class ApplicationPortForwardingWizardModel extends ObservablePojo {
+
+ public static final String PROPERTY_USE_DEFAULT_LOCAL_IP_ADDRESS = "useDefaultLocalIpAddress";
+
+ public static final String PROPERTY_FORWARDABLE_PORTS = "forwardablePorts";
+
+ private Boolean useDefaultLocalIpAddress = Boolean.TRUE;
+
+ private final IApplication application;
+
+ public ApplicationPortForwardingWizardModel(final IApplication application) {
+ this.application = application;
+ }
+
+ /**
+ * @return the application
+ */
+ public final IApplication getApplication() {
+ return application;
+ }
+
+ /**
+ * @return the useDefaultLocalIpAddress
+ */
+ public final Boolean getUseDefaultLocalIpAddress() {
+ return useDefaultLocalIpAddress;
+ }
+
+
+ public List<IApplicationPortForwarding> getForwardablePorts() throws OpenShiftSSHOperationException {
+ return application.getForwardablePorts();
+ }
+
+ /**
+ * @param useDefaultLocalIpAddress the useDefaultLocalIpAddress to set
+ * @throws IOException
+ * @throws JSchException
+ */
+ public final void setUseDefaultLocalIpAddress(final Boolean useDefaultLocalIpAddress) throws OpenShiftSSHOperationException {
+ updateLocalBindingValues(useDefaultLocalIpAddress);
+ firePropertyChange(PROPERTY_USE_DEFAULT_LOCAL_IP_ADDRESS, this.useDefaultLocalIpAddress,
+ this.useDefaultLocalIpAddress = useDefaultLocalIpAddress);
+ }
+
+ private void updateLocalBindingValues(final boolean useLocalIpAddress) throws OpenShiftSSHOperationException {
+ for (IApplicationPortForwarding port : application.getForwardablePorts()) {
+ port.setLocalAddress(useLocalIpAddress ? "127.0.0.1" : port.getRemoteAddress());
+ if (port.getLocalPort() == null) {
+ port.setLocalPort(port.getRemotePort());
+ }
+ }
+ }
+
+ public void loadForwardablePorts() throws OpenShiftSSHOperationException {
+ getApplication().getForwardablePorts();
+ refreshForwardablePorts();
+ }
+
+ public void refreshForwardablePorts() throws OpenShiftSSHOperationException {
+ application.refreshForwardablePorts();
+ updateLocalBindingValues(this.useDefaultLocalIpAddress);
+ }
+
+
+
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,337 @@
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.wizard.AbstractOpenShiftWizardPage;
+
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.openshift.client.IApplication;
+import com.openshift.client.IApplicationPortForwarding;
+import com.openshift.client.OpenShiftSSHOperationException;
+
+public class ApplicationPortForwardingWizardPage extends AbstractOpenShiftWizardPage {
+
+ private final ApplicationPortForwardingWizardModel wizardModel;
+
+ private TableViewer viewer;
+
+ private Button refreshButton;
+
+ private Button startButton;
+
+ private Button stopButton;
+
+ public ApplicationPortForwardingWizardPage(final ApplicationPortForwardingWizardModel wizardModel,
+ final ApplicationPortForwardingWizard applicationPortForwardingWizard) {
+ super("Application port forward", "Please configure port forwarding for your application",
+ "IApplicationPortForwardingingPage", applicationPortForwardingWizard);
+ this.wizardModel = wizardModel;
+ }
+
+ @Override
+ protected void doCreateControls(Composite parent, DataBindingContext dbc) {
+ GridLayoutFactory.fillDefaults().margins(6, 6).applyTo(parent);
+ Composite container = new Composite(parent, SWT.NONE);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(container);
+ GridLayoutFactory.fillDefaults().numColumns(2).applyTo(container);
+
+ Composite tableContainer = new Composite(container, SWT.NONE);
+ this.viewer = createTable(tableContainer);
+ GridDataFactory.fillDefaults().span(1, 3).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(tableContainer);
+ // viewer.addSelectionChangedListener(onTableSelectionChanged());
+
+ refreshButton = new Button(container, SWT.PUSH);
+ refreshButton.setText("Refresh");
+ GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).align(SWT.FILL, SWT.TOP).applyTo(refreshButton);
+ refreshButton.addSelectionListener(onRefreshPorts());
+
+ /*
+ * Button editButton = new Button(container, SWT.PUSH); editButton.setText("Edit...");
+ * GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).align(SWT.FILL, SWT.TOP).applyTo(editButton); //
+ * checkAllButton.addSelectionListener(onCheckAll());
+ */
+
+ startButton = new Button(container, SWT.PUSH);
+ startButton.setText("Start All");
+ startButton.setEnabled(true);
+ GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).align(SWT.FILL, SWT.TOP).applyTo(startButton);
+ startButton.addSelectionListener(onStartPortForwarding());
+
+ stopButton = new Button(container, SWT.PUSH);
+ stopButton.setText("Stop All");
+ stopButton.setEnabled(true);
+ GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).align(SWT.FILL, SWT.TOP).applyTo(stopButton);
+ stopButton.addSelectionListener(onStopPortForwarding());
+
+ // checkbox to use the default "127.0.0.1" local IP address
+ Button useLocalIpAddressButton = new Button(container, SWT.CHECK);
+ useLocalIpAddressButton.setText("Use '127.0.0.1' as the local address for all ports");
+ GridDataFactory.fillDefaults().span(1, 1).align(SWT.FILL, SWT.CENTER).grab(false, false)
+ .applyTo(useLocalIpAddressButton);
+ IObservableValue useLocalIpAddressObservable = BeanProperties.value(
+ ApplicationPortForwardingWizardModel.PROPERTY_USE_DEFAULT_LOCAL_IP_ADDRESS).observe(wizardModel);
+ final IObservableValue useLocalIpAddressButtonSelection = WidgetProperties.selection().observe(
+ useLocalIpAddressButton);
+ dbc.bindValue(useLocalIpAddressButtonSelection, useLocalIpAddressObservable);
+ useLocalIpAddressObservable.addValueChangeListener(new IValueChangeListener() {
+ @Override
+ public void handleValueChange(ValueChangeEvent event) {
+ refreshViewerInput();
+ }
+ });
+ }
+
+ /*
+ * private ISelectionChangedListener onTableSelectionChanged() { return new ISelectionChangedListener() {
+ * @Override public void selectionChanged(SelectionChangedEvent event) { final IStructuredSelection selection =
+ * (IStructuredSelection) event.getSelection(); IApplicationPortForwarding portForward =
+ * (IApplicationPortForwarding) selection.getFirstElement(); if (portForward.isStarted()) {
+ * enableButton.setEnabled(false); disableButton.setEnabled(true); } else { enableButton.setEnabled(true);
+ * disableButton.setEnabled(false); } } }; }
+ */
+
+ private SelectionListener onRefreshPorts() {
+ return new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ WizardUtils.runInWizard(new Job("Refresh lis of ports...") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ wizardModel.refreshForwardablePorts();
+ refreshViewerInput();
+ } catch (Exception e) {
+ Logger.error("Failed to refresh list of ports", e);
+ }
+ return Status.OK_STATUS;
+ }
+ }, getContainer(), getDataBindingContext());
+ } catch (Exception exception) {
+ // ignore
+ }
+ }
+ };
+ }
+
+ private SelectionListener onStartPortForwarding() {
+ return new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ WizardUtils.runInWizard(new Job("Starting Port-forwarding...") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ verifyApplicationSSHSession();
+ wizardModel.getApplication().startPortForwarding();
+ wizardModel.getApplication().getForwardablePorts();
+ refreshViewerInput();
+ } catch (Exception e) {
+ Logger.error("Failed to start port-forwarding", e);
+ }
+ return Status.OK_STATUS;
+ }
+ }, getContainer(), getDataBindingContext());
+ } catch (Exception exception) {
+ // ignore
+ }
+ }
+ };
+ }
+
+ static URIish getSshUri(IApplication application) {
+ final String host = application.getName() + "-" + application.getDomain().getId() + "."
+ + application.getDomain().getSuffix();
+ final String user = application.getUUID();
+ final URIish uri = new URIish().setHost(host).setPort(22).setUser(user);
+ return uri;
+ }
+
+ private SelectionListener onStopPortForwarding() {
+ return new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ WizardUtils.runInWizard(new Job("Stoppping Port-forwarding...") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ verifyApplicationSSHSession();
+ wizardModel.getApplication().stopPortForwarding();
+ refreshViewerInput();
+ } catch (Exception e) {
+ Logger.error("Failed to stop Port-forwarding", e);
+ }
+ return Status.OK_STATUS;
+ }
+ }, getContainer(), getDataBindingContext());
+ } catch (Exception exception) {
+ // ignore
+ }
+ }
+ };
+ }
+
+ protected TableViewer createTable(Composite tableContainer) {
+ Table table = new Table(tableContainer, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL);
+ table.setLinesVisible(true);
+ table.setHeaderVisible(true);
+ TableColumnLayout tableLayout = new TableColumnLayout();
+ tableContainer.setLayout(tableLayout);
+ TableViewer viewer = new TableViewer(table);
+ // viewer.setComparer(new EqualityComparer());
+ viewer.setContentProvider(new ArrayContentProvider());
+
+ createTableColumn("Service", 1, new CellLabelProvider() {
+ @Override
+ public void update(ViewerCell cell) {
+ IApplicationPortForwarding port = (IApplicationPortForwarding) cell.getElement();
+ cell.setText(port.getName());
+ }
+
+ }, viewer, tableLayout);
+
+ createTableColumn("Local Address", 2, new CellLabelProvider() {
+ @Override
+ public void update(ViewerCell cell) {
+ IApplicationPortForwarding port = (IApplicationPortForwarding) cell.getElement();
+ cell.setText(port.getLocalAddress());
+ }
+ }, viewer, tableLayout);
+
+ createTableColumn("Local Port", 2, new CellLabelProvider() {
+ @Override
+ public void update(ViewerCell cell) {
+ IApplicationPortForwarding port = (IApplicationPortForwarding) cell.getElement();
+ cell.setText(port.getLocalPort());
+ }
+ }, viewer, tableLayout);
+
+ createTableColumn("Remote Address", 2, new CellLabelProvider() {
+ @Override
+ public void update(ViewerCell cell) {
+ IApplicationPortForwarding port = (IApplicationPortForwarding) cell.getElement();
+ cell.setText(port.getRemoteAddress());
+ }
+ }, viewer, tableLayout);
+
+ createTableColumn("Remote Port", 2, new CellLabelProvider() {
+ @Override
+ public void update(ViewerCell cell) {
+ IApplicationPortForwarding port = (IApplicationPortForwarding) cell.getElement();
+ cell.setText(port.getRemotePort());
+ }
+ }, viewer, tableLayout);
+
+ createTableColumn("Status", 1, new CellLabelProvider() {
+
+ @Override
+ public void update(ViewerCell cell) {
+ IApplicationPortForwarding port = (IApplicationPortForwarding) cell.getElement();
+ try {
+ final boolean started = port.isStarted(wizardModel.getApplication().getSSHSession());
+ cell.setText(started ? "Enabled" : "Disabled");
+ } catch (OpenShiftSSHOperationException e) {
+ cell.setText("Unknown");
+ }
+ }
+ }, viewer, tableLayout);
+
+ return viewer;
+ }
+
+ private void createTableColumn(String name, int weight, CellLabelProvider cellLabelProvider, TableViewer viewer,
+ TableColumnLayout layout) {
+ TableViewerColumn column = new TableViewerColumn(viewer, SWT.LEFT);
+ column.getColumn().setText(name);
+ column.setLabelProvider(cellLabelProvider);
+ layout.setColumnData(column.getColumn(), new ColumnWeightData(weight, true));
+ }
+
+ @Override
+ protected void onPageActivated(DataBindingContext dbc) {
+ try {
+ WizardUtils.runInWizard(new Job("Retrieving application's forwardable ports...") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ monitor.beginTask("Checking Application SSH session...", 1);
+ verifyApplicationSSHSession();
+ monitor.worked(1);
+ monitor.beginTask("Retrieving ports...", 1);
+ wizardModel.loadForwardablePorts();
+ refreshViewerInput();
+ monitor.worked(1);
+ return Status.OK_STATUS;
+ } catch (Exception e) {
+ return OpenShiftUIActivator.createErrorStatus("Could not load forwardable ports for application", e);
+ }
+ }
+
+
+ }, getContainer(), getDataBindingContext());
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+
+ /**
+ * @param monitor
+ * @throws JSchException
+ */
+ private void verifyApplicationSSHSession() throws JSchException {
+ final boolean hasSSHSession = wizardModel.getApplication().hasSSHSession();
+ if(!hasSSHSession) {
+ Logger.info("Opening a new SSH Session for application '" + wizardModel.getApplication().getName() + "'");
+ final Session session = OpenShiftSshSessionFactory.getInstance().createSession(
+ getSshUri(wizardModel.getApplication()));
+ wizardModel.getApplication().setSSHSession(session);
+ }
+ }
+
+ private void refreshViewerInput() {
+ getShell().getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ viewer.setInput(wizardModel.getForwardablePorts());
+ } catch (Exception e) {
+ Logger.error("Failed to refresh table content with list of ports for selected application", e);
+ }
+ }
+ });
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/OpenShiftSshSessionFactory.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/OpenShiftSshSessionFactory.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/OpenShiftSshSessionFactory.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.egit.ui.internal.credentials.EGitCredentialsProvider;
+import org.eclipse.jgit.transport.CredentialsProviderUserInfo;
+import org.eclipse.jgit.transport.JschConfigSessionFactory;
+import org.eclipse.jgit.transport.OpenSshConfig;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jsch.core.IJSchService;
+import org.eclipse.jsch.ui.UserInfoPrompter;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.console.JschToEclipseLogger;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.UserInfo;
+
+/**
+ * Same as EclipseSshSessinFactory, but provides a mean to retrieve the pure Jsch Session, not a RemoteSession.
+ *
+ * @author Xavier Coulon
+ *
+ */
+public class OpenShiftSshSessionFactory extends JschConfigSessionFactory {
+
+ private static OpenShiftSshSessionFactory INSTANCE = new OpenShiftSshSessionFactory();
+
+ /**
+ * Get the currently configured JVM-wide factory.
+ * <p>
+ * A factory is always available. By default the factory will read from the user's <code>$HOME/.ssh</code> and
+ * assume OpenSSH compatibility.
+ *
+ * @return factory the current factory for this JVM.
+ */
+ public static OpenShiftSshSessionFactory getInstance() {
+ return INSTANCE;
+ }
+
+ private final IJSchService provider;
+
+ private OpenSshConfig config;
+
+ private final Map<URIish, Session> cache = new HashMap<URIish, Session>();
+
+ OpenShiftSshSessionFactory() {
+ final BundleContext context = OpenShiftUIActivator.getDefault().getBundle().getBundleContext();
+ final ServiceReference<?> ssh = context.getServiceReference(IJSchService.class.getName());
+ this.provider = (IJSchService) context.getService(ssh);
+ }
+
+ public Session createSession(final URIish uri) throws JSchException {
+ final Session session = cache.get(uri);
+ if (session == null || !session.isConnected()) {
+ final FS fs = FS.DETECTED;
+ if (config == null) {
+ config = OpenSshConfig.get(fs);
+ }
+ String user = uri.getUser();
+ String host = uri.getHost();
+ int port = uri.getPort();
+ JSch.setLogger(new JschToEclipseLogger());
+ final OpenSshConfig.Host hc = config.lookup(host);
+ cache.put(uri, createSession(hc, user, host, port, fs));
+ }
+ return cache.get(uri);
+ }
+
+ @Override
+ protected Session createSession(final OpenSshConfig.Host hc, final String user, final String host, final int port,
+ FS fs) throws JSchException {
+ final JSch jsch = getJSch(hc, FS.DETECTED);
+ if (jsch == provider.getJSch()) {
+ // If its the default JSch desired, let the provider
+ // manage the session creation for us.
+ //
+ final Session session = provider.createSession(host, port, user);
+ configure(hc, session);
+ session.connect();
+ return session;
+ } else {
+ // This host configuration is using a different IdentityFile,
+ // one that is not available through the default JSch.
+ //
+ final Session session = jsch.getSession(user, host, port);
+ configure(hc, session);
+ session.connect(0);
+ return session;
+ }
+ }
+
+ @Override
+ protected JSch createDefaultJSch(FS fs) throws JSchException {
+ // Forcing a dummy session to be created will cause the known hosts
+ // and configured private keys to be initialized. This is needed by
+ // our parent class in case non-default JSch instances need to be made.
+ //
+ provider.createSession("127.0.0.1", 0, "eclipse"); //$NON-NLS-1$ //$NON-NLS-2$
+ return provider.getJSch();
+ }
+
+ @Override
+ protected void configure(final OpenSshConfig.Host hc, final Session session) {
+ final EGitCredentialsProvider credentialsProvider = new EGitCredentialsProvider();
+ if ((!hc.isBatchMode() || !credentialsProvider.isInteractive())) {
+ session.setUserInfo(new CredentialsProviderUserInfo(session, credentialsProvider));
+ } else {
+ UserInfo userInfo = session.getUserInfo();
+
+ if (!hc.isBatchMode() && userInfo == null)
+ new UserInfoPrompter(session);
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/OpenShiftSshSessionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTab.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTab.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTab.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import java.net.SocketTimeoutException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchTab;
+import org.eclipse.jdt.internal.debug.ui.launcher.AbstractJavaMainTab;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.openshift.client.IApplication;
+import com.openshift.client.OpenShiftException;
+
+/**
+ * @author Xavier Coulon
+ *
+ */
+public class RemoteOpenShiftApplicationConfigurationTab extends AbstractLaunchConfigurationTab {
+
+ public static final String LAUNCH_CONFIG_PROJECT = "project";
+
+ public static final String LAUNCH_CONFIG_APPLICATION = "application";
+
+ private Text projectNameText;
+
+ private Text applicationNameText;
+
+ @Override
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NONE);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(container);
+ setControl(container);
+ GridLayoutFactory.fillDefaults().margins(10, 10).applyTo(container);
+ GridLayoutFactory.fillDefaults().numColumns(1).applyTo(container);
+ createApplicationSelector(container);
+ createProjectSelector(container);
+ }
+
+ private void createProjectSelector(Composite container) {
+ Group projectGroup = new Group(container, SWT.NONE);
+ projectGroup.setText("Project");
+ GridLayoutFactory.fillDefaults().numColumns(1).margins(10, 10).applyTo(projectGroup);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, false).applyTo(projectGroup);
+ this.projectNameText = new Text(projectGroup, SWT.BORDER);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, true).applyTo(projectNameText);
+ projectNameText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ }
+
+ /**
+ * Updates the buttons and message in this page's launch configuration dialog.
+ */
+ protected void updateLaunchConfigurationDialog() {
+ if (getLaunchConfigurationDialog() != null) {
+ // order is important here due to the call to
+ // refresh the tab viewer in updateButtons()
+ // which ensures that the messages are up to date
+ getLaunchConfigurationDialog().updateButtons();
+ getLaunchConfigurationDialog().updateMessage();
+ }
+ }
+
+ private void createApplicationSelector(Composite container) {
+ Group projectGroup = new Group(container, SWT.NONE);
+ projectGroup.setText("Application");
+ GridLayoutFactory.fillDefaults().numColumns(1).margins(10, 10).applyTo(projectGroup);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, false).applyTo(projectGroup);
+ this.applicationNameText = new Text(projectGroup, SWT.BORDER);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, true).applyTo(applicationNameText);
+
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ try {
+ projectNameText.setText(configuration.getAttribute(LAUNCH_CONFIG_PROJECT, ""));
+ applicationNameText.setText(configuration.getAttribute(LAUNCH_CONFIG_APPLICATION, ""));
+ } catch (CoreException e) {
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#canSave()
+ */
+ @Override
+ public boolean canSave() {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public boolean isValid(ILaunchConfiguration launchConfig) {
+ return isValidProject() && isValidApplication();
+ }
+
+ /**
+ * @return true is the projectNameText value is an existing & opened Eclipse project in the workspace, false
+ * otherwise.
+ */
+ private boolean isValidProject() {
+ final String projectName = projectNameText.getText();
+ if (projectName == null || projectName.isEmpty()) {
+ return false;
+ }
+ final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ return project != null && project.exists() && project.isOpen();
+ }
+
+ /**
+ * @return true is the projectNameText value is an existing & opened Eclipse project in the workspace, false
+ * otherwise.
+ */
+ private boolean isValidApplication() {
+ final String applicationName = applicationNameText.getText();
+ if (applicationName == null || applicationName.isEmpty()) {
+ return false;
+ }
+ try {
+ for (UserDelegate user : UserModel.getDefault().getUsers()) {
+ final IApplication application = user.getApplicationByName(applicationName);
+ if (application != null) {
+ return true;
+ }
+ }
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to retrieve applications from user", e);
+ } catch (SocketTimeoutException e) {
+ Logger.error("Failed to retrieve applications from user", e);
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#isDirty()
+ */
+ @Override
+ protected boolean isDirty() {
+ return true;
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy config) {
+ config.setAttribute(LAUNCH_CONFIG_PROJECT, projectNameText.getText());
+ config.setAttribute(LAUNCH_CONFIG_APPLICATION, applicationNameText.getText());
+
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectNameText.getText().trim());
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_ALLOW_TERMINATE, false);
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_CONNECTOR, JavaRuntime.getVMConnector("org.eclipse.jdt.launching.socketAttachConnector").getIdentifier()); // see org.eclipse.jdt.launching plugin.xml for values
+ //mapResources(config);
+ Map attrMap = new HashMap();
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, attrMap);
+
+ }
+
+ @Override
+ public String getName() {
+ return "Connect";
+ }
+
+ @Override
+ public Image getImage() {
+ return DebugUITools.getImage(IDebugUIConstants.IMG_LCL_DISCONNECT);
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTab.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTabGroup.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTabGroup.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTabGroup.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
+/**
+ * @author Xavier Coulon
+ *
+ */
+public class RemoteOpenShiftApplicationConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+ @Override
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new RemoteOpenShiftApplicationConfigurationTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+
+ }
+
+
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationConfigurationTabGroup.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate.java 2012-04-26 09:53:37 UTC (rev 40512)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.portforward;
+
+import java.io.IOException;
+import java.net.SocketTimeoutException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.openshift.client.IApplication;
+import com.openshift.client.OpenShiftException;
+
+/**
+ * @author Xavier Coulon
+ *
+ */
+public class RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate extends
+ JavaRemoteApplicationLaunchConfigurationDelegate {
+
+ public final static String ATTR_CONNECT_HOSTNAME = "hostname"; // see usage in SocketAttachConnector
+ public final static String ATTR_CONNECT_PORT = "port"; // see usage in SocketAttachConnector
+
+ /*
+ * (non-Javadoc)
+ * @see
+ * org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration,
+ * java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
+ throws CoreException {
+ try {
+ monitor.beginTask("Preparing for debugging remote OpenShift application", 1);
+ Map<String, String> argMap = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP,
+ (Map) null);
+ if (argMap != null) {
+ final String applicationName = configuration.getAttribute(
+ RemoteOpenShiftApplicationConfigurationTab.LAUNCH_CONFIG_APPLICATION, "");
+ final IApplication application = lookupApplication(applicationName);
+ /*
+ final ApplicationPortForwardUtil applicationPortsForwarder = new ApplicationPortForwardUtil();
+ for (ApplicationPortForward port : applicationPortsForwarder.listPorts(application)) {
+ if (port.getRemotePort() == "8787") {
+ final ApplicationPortForward forwardedPort = null; //applicationPortsForwarder.forwardPort(application, port);
+ argMap.put(ATTR_CONNECT_HOSTNAME, forwardedPort.getLocalAddress());
+ argMap.put(ATTR_CONNECT_PORT, forwardedPort.getLocalPort());
+ }
+ }*/
+
+ }
+ monitor.worked(1);
+ super.launch(configuration, mode, launch, monitor);
+ } catch (Exception e) {
+ Logger.error("Failed to launch debugger for Remote OpenShift Application", e);
+ }
+ }
+
+ private IApplication lookupApplication(String applicationName) {
+ try {
+ for (UserDelegate user : UserModel.getDefault().getUsers()) {
+ final IApplication application = user.getApplicationByName(applicationName);
+ if (application != null) {
+ return application;
+ }
+ }
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to retrieve applications from user", e);
+ } catch (SocketTimeoutException e) {
+ Logger.error("Failed to retrieve applications from user", e);
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/RemoteOpenShiftApplicationDebuggingLaunchConfigurationDelegate.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 8 months
JBoss Tools SVN: r40510 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-04-26 05:28:38 -0400 (Thu, 26 Apr 2012)
New Revision: 40510
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
Log:
JBIDE-10426 browse button for git destination is now init to where it comes from
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-04-26 07:34:22 UTC (rev 40509)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-04-26 09:28:38 UTC (rev 40510)
@@ -194,7 +194,9 @@
@Override
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dialog = new DirectoryDialog(getShell());
- dialog.setMessage("Choose the location to store your repository clone to...");
+ dialog.setText("Git clone location");
+ dialog.setMessage("Choose the location for git clone...");
+ dialog.setFilterPath(pageModel.getRepositoryPath());
String repositoryPath = dialog.open();
if (repositoryPath != null) {
pageModel.setRepositoryPath(repositoryPath);
13 years, 8 months
JBoss Tools SVN: r40509 - in trunk/as/plugins: org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-04-26 03:34:22 -0400 (Thu, 26 Apr 2012)
New Revision: 40509
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java
Log:
JBIDE-11660 remove cache, compile every time, add error checking to editor
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-04-26 06:05:57 UTC (rev 40508)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-04-26 07:34:22 UTC (rev 40509)
@@ -122,8 +122,6 @@
return getAttribute(ZIP_DEPLOYMENTS_PREF, false);
}
- // cannot be static, as different servers may have different defaults
- private Pattern restartFilePattern = null;
protected Pattern defaultFilePattern = Pattern.compile(
getDefaultModuleRestartPattern(),
Pattern.CASE_INSENSITIVE);
@@ -135,30 +133,25 @@
public void setRestartFilePattern(String filepattern) {
setAttribute(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, filepattern);
- this.restartFilePattern = null;
}
public Pattern getRestartFilePattern() {
- if( this.restartFilePattern == null ) {
- compileRestartPattern();
- }
- return this.restartFilePattern;
+ return getCompiledRestartPattern();
}
- private void compileRestartPattern() {
+ private Pattern getCompiledRestartPattern() {
// ensure it's set properly from the saved attribute
String currentPattern = getAttribute(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, (String)null);
try {
- this.restartFilePattern = currentPattern == null ? defaultFilePattern :
+ return currentPattern == null ? defaultFilePattern :
Pattern.compile(currentPattern, Pattern.CASE_INSENSITIVE);
} catch(PatternSyntaxException pse) {
JBossServerCorePlugin.log("Could not set restart file pattern to: " + currentPattern, pse); //$NON-NLS-1$
// avoid errors over and over
- this.restartFilePattern = defaultFilePattern;
+ return defaultFilePattern;
}
}
-
/*
* (non-Javadoc)
* @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getAttributeHelper()
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2012-04-26 06:05:57 UTC (rev 40508)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2012-04-26 07:34:22 UTC (rev 40509)
@@ -236,11 +236,12 @@
public boolean changedFileRequiresModuleRestart(IModuleFile file) {
IDeployableServer ds = ServerConverter.getDeployableServer(getServer());
Pattern restartFilePattern = ds.getRestartFilePattern();
- if (restartFilePattern != null) {
+ boolean result = false;
+ if (restartFilePattern != null) {
// using find over matches to make it a substring search by default and avoid having to specify .*.class$ instead of just .class$
- return restartFilePattern.matcher(file.getName()).find();
+ result = restartFilePattern.matcher(file.getName()).find();
}
- return false;
+ return result;
}
/**
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java 2012-04-26 06:05:57 UTC (rev 40508)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java 2012-04-26 07:34:22 UTC (rev 40509)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.ui.editor;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -118,10 +121,26 @@
public class SetCustomPatternCommand extends ServerWorkingCopyPropertyCommand {
public SetCustomPatternCommand(IServerWorkingCopy server) {
- super(server, Messages.EditorChangeStopPollerCommandName,
+ super(server, "Modify Module Restart Pattern",
restartPatternText, restartPatternText.getText(),
IDeployableServer.ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN,
textListener);
}
+ public void undo() {
+ super.undo();
+ validate();
+ }
+ public void execute() {
+ super.execute();
+ validate();
+ }
+ protected void validate() {
+ try {
+ Pattern.compile(restartPatternText.getText(), Pattern.CASE_INSENSITIVE);
+ setErrorMessage(null);
+ } catch(PatternSyntaxException pse) {
+ setErrorMessage("Invalid Restart Pattern: " + restartPatternText.getText());
+ }
+ }
}
}
13 years, 8 months