JBoss Tools SVN: r39328 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-03-06 20:43:56 -0500 (Tue, 06 Mar 2012)
New Revision: 39328
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java
Log:
JBIDE-11173
https://issues.jboss.org/browse/JBIDE-11173
Search of error marker for XModelObject and attribute is fixed.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java 2012-03-07 01:35:47 UTC (rev 39327)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/XMarkerManager.java 2012-03-07 01:43:56 UTC (rev 39328)
@@ -314,9 +314,13 @@
return null;
}
if(ms == null) return null;
+ String pathInFile = object.getPath().substring(f.getPath().length());
for (int i = 0; i < ms.length; i++) {
XModelObject o = object;
String path = ms[i].getAttribute("path", null); //$NON-NLS-1$
+ if(path != null && !path.endsWith(pathInFile)) {
+ continue;
+ }
o = (path == null) ? o : o.getModel().getByPath(path);
if(o == null) continue;
String attr = ms[i].getAttribute("attribute", null); //$NON-NLS-1$
13 years, 7 months
JBoss Tools SVN: r39327 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core: validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-03-06 20:35:47 -0500 (Tue, 06 Mar 2012)
New Revision: 39327
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/BeansXmlValidationDelegate.java
Log:
JBIDE-11173
https://issues.jboss.org/browse/JBIDE-11173
Attributes 'path' and 'attribute' are set to error markers created by beans.xml validator.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java 2012-03-07 01:33:50 UTC (rev 39326)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java 2012-03-07 01:35:47 UTC (rev 39327)
@@ -14,6 +14,7 @@
import java.util.Set;
import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.cdi.xml.beans.model.CDIBeansConstants;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.impl.FileAnyImpl;
import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
@@ -24,12 +25,7 @@
* @author Viacheslav Kabanovich
*
*/
-public class BeansXMLDefinition {
- static String NODE_INTERCEPTORS = "Interceptors";
- static String NODE_DECORATORS = "Decorators";
- static String NODE_ALTERNATIVES = "Alternatives";
- static String ATTR_CLASS = "class";
- static String ATTR_STEREOTYPE = "stereotype";
+public class BeansXMLDefinition implements CDIBeansConstants {
private IPath path;
private Set<INodeReference> typeAlternatives = new HashSet<INodeReference>();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/BeansXmlValidationDelegate.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/BeansXmlValidationDelegate.java 2012-03-07 01:33:50 UTC (rev 39326)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/BeansXmlValidationDelegate.java 2012-03-07 01:35:47 UTC (rev 39327)
@@ -21,6 +21,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -45,7 +46,10 @@
import org.jboss.tools.cdi.core.IInterceptor;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.preferences.CDIPreferences;
+import org.jboss.tools.cdi.xml.beans.model.CDIBeansConstants;
import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.impl.XModelObjectImpl;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.w3c.dom.Element;
@@ -97,6 +101,9 @@
}
public void validateBeansXml(CDICoreValidator.CDIValidationContext context, IFile beansXml) {
+ XModelObject f = EclipseResourceUtil.createObjectForResource(beansXml);
+ String xmodelpath = (f == null) ? "" : f.getPath();
+
IModelManager manager = StructuredModelManager.getModelManager();
if(manager == null) {
// this may happen if plug-in org.eclipse.wst.sse.core
@@ -120,7 +127,7 @@
* - If the same type is listed twice under the <alternatives> element, the container automatically detects the problem and
* treats it as a deployment problem.
*/
- validateTypeBeanForBeansXml(context, getAlternativeClassValidator(), document, beansXml);
+ validateTypeBeanForBeansXml(context, getAlternativeClassValidator(), document, beansXml, xmodelpath + "/" + CDIBeansConstants.NODE_ALTERNATIVES); //$NON-NLS-1$
/*
* 5.1.1. Declaring selected alternatives for a bean archive
@@ -130,7 +137,7 @@
* - If the same type is listed twice under the <alternatives> element, the container automatically detects the problem and
* treats it as a deployment problem.
*/
- validateTypeBeanForBeansXml(context, getAlternativeStereotypeValidator(), document, beansXml);
+ validateTypeBeanForBeansXml(context, getAlternativeStereotypeValidator(), document, beansXml, xmodelpath + "/" + CDIBeansConstants.NODE_ALTERNATIVES); //$NON-NLS-1$
/*
* 8.2. Decorator enablement and ordering
@@ -140,7 +147,7 @@
* - If the same class is listed twice under the <decorators> element, the container automatically detects the problem and
* treats it as a deployment problem.
*/
- validateTypeBeanForBeansXml(context, getDecoratorTypeValidator(), document, beansXml);
+ validateTypeBeanForBeansXml(context, getDecoratorTypeValidator(), document, beansXml, xmodelpath + "/" + CDIBeansConstants.NODE_DECORATORS); //$NON-NLS-1$
/*
* 9.4. Interceptor enablement and ordering
@@ -150,7 +157,7 @@
* - If the same class is listed twice under the <interceptors> element, the container automatically detects the problem and treats it as
* a deployment problem.
*/
- validateTypeBeanForBeansXml(context, getInterceptorTypeValidator(), document, beansXml);
+ validateTypeBeanForBeansXml(context, getInterceptorTypeValidator(), document, beansXml, xmodelpath + "/" + CDIBeansConstants.NODE_INTERCEPTORS); //$NON-NLS-1$
}
} catch (CoreException e) {
CDICorePlugin.getDefault().logError(e);
@@ -163,7 +170,7 @@
}
}
- private void validateTypeBeanForBeansXml(CDICoreValidator.CDIValidationContext context, TypeValidator typeValidator, IDOMDocument document, IFile beansXml) {
+ private void validateTypeBeanForBeansXml(CDICoreValidator.CDIValidationContext context, TypeValidator typeValidator, IDOMDocument document, IFile beansXml, String xmodelpath) {
try {
NodeList parentNodeList = document.getElementsByTagName(typeValidator.getParrentElementname());
for (int i = 0; i < parentNodeList.getLength(); i++) {
@@ -172,7 +179,13 @@
List<TypeNode> typeNodes = getTypeElements((Element)parentNode, typeValidator.getTypeElementName());
Map<String, TypeNode> uniqueTypes = new HashMap<String, TypeNode>();
for (TypeNode typeNode : typeNodes) {
- IType type = getType(beansXml, typeNode, typeValidator.getUnknownTypeErrorMessage(), typeValidator.getUnknownTypeErrorMessageId());
+ String typepath = xmodelpath;
+ String attr = null;
+ if(typeNode.getTypeName().length() > 0) {
+ typepath = typepath + "/" + typeNode.getTypeName();
+ attr = typeValidator.getTypeElementName();
+ }
+ IType type = getType(beansXml, typeNode, typeValidator.getUnknownTypeErrorMessage(), typeValidator.getUnknownTypeErrorMessageId(), typepath, attr);
if(type!=null) {
if(!type.isBinary()) {
validator.getValidationContext().addLinkedCoreResource(CDICoreValidator.SHORT_ID, beansXml.getFullPath().toOSString(), type.getPath(), false);
@@ -186,29 +199,42 @@
}
}
if(!typeValidator.validateKindOfType(type)) {
- validator.addError(typeValidator.getIllegalTypeErrorMessage(), CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
+ IMarker marker = validator.addError(typeValidator.getIllegalTypeErrorMessage(), CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
new String[]{}, typeNode.getLength(), typeNode.getStartOffset(), beansXml, typeValidator.getIllegalTypeErrorMessageId());
+ if(marker != null) bindMarkerToModel(marker, typepath, typeValidator.getTypeElementName());
} else if(type.isBinary()) {
if(!typeValidator.validateBinaryType(type)) {
- validator.addError(typeValidator.getIllegalTypeErrorMessage(), CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
+ IMarker marker = validator.addError(typeValidator.getIllegalTypeErrorMessage(), CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
new String[]{}, typeNode.getLength(), typeNode.getStartOffset(), beansXml, typeValidator.getIllegalTypeErrorMessageId());
+ if(marker != null) bindMarkerToModel(marker, typepath, typeValidator.getTypeElementName());
}
continue;
} else {
if(!typeValidator.validateSourceType(context, type)) {
- validator.addError(typeValidator.getIllegalTypeErrorMessage(), CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
+ IMarker marker = validator.addError(typeValidator.getIllegalTypeErrorMessage(), CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
new String[]{}, typeNode.getLength(), typeNode.getStartOffset(), beansXml, typeValidator.getIllegalTypeErrorMessageId());
+ if(marker != null) bindMarkerToModel(marker, typepath, typeValidator.getTypeElementName());
}
}
TypeNode node = uniqueTypes.get(typeNode.getTypeName());
if(node!=null) {
if(!node.isMarkedAsDuplicated()) {
- validator.addError(typeValidator.getDuplicateTypeErrorMessage(), CDIPreferences.DUPLICATE_TYPE_IN_BEANS_XML,
+ IMarker marker = validator.addError(typeValidator.getDuplicateTypeErrorMessage(), CDIPreferences.DUPLICATE_TYPE_IN_BEANS_XML,
new String[]{}, node.getLength(), node.getStartOffset(), beansXml);
+ if(marker != null) bindMarkerToModel(marker, typepath, typeValidator.getTypeElementName());
}
node.setMarkedAsDuplicated(true);
- validator.addError(typeValidator.getDuplicateTypeErrorMessage(), CDIPreferences.DUPLICATE_TYPE_IN_BEANS_XML,
+ typeNode.setMarkedAsDuplicated(true);
+ typeNode.setDuplicationIndex(node.getDuplicationIndex() + 1);
+ IMarker marker = validator.addError(typeValidator.getDuplicateTypeErrorMessage(), CDIPreferences.DUPLICATE_TYPE_IN_BEANS_XML,
new String[]{}, typeNode.getLength(), typeNode.getStartOffset(), beansXml);
+ if(marker != null) {
+ int di = typeNode.getDuplicationIndex();
+ if(di > 0) {
+ typepath += XModelObjectImpl.DUPLICATE + di;
+ }
+ bindMarkerToModel(marker, typepath, typeValidator.getTypeElementName());
+ }
}
uniqueTypes.put(typeNode.getTypeName(), typeNode);
}
@@ -240,7 +266,7 @@
return null;
}
- private IType getType(IFile beansXml, TypeNode node, String errorMessage, int errorMessageId) {
+ private IType getType(IFile beansXml, TypeNode node, String errorMessage, int errorMessageId, String xmodelpath, String attr) {
IType type = null;
if(node.getTypeName()!=null) {
try {
@@ -255,12 +281,27 @@
}
if(type==null) {
addLinkedResourcesForUnknownType(beansXml, node.getTypeName());
- validator.addError(errorMessage, CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
+ IMarker marker = validator.addError(errorMessage, CDIPreferences.ILLEGAL_TYPE_NAME_IN_BEANS_XML,
new String[]{}, node.getLength(), node.getStartOffset(), beansXml, errorMessageId);
+ bindMarkerToModel(marker, xmodelpath, attr);
}
return type;
}
+ private void bindMarkerToModel(IMarker marker, String path, String attribute) {
+ try {
+ if(marker!=null) {
+ marker.setAttribute("path", path); //$NON-NLS-1$
+ if(attribute != null) {
+ marker.setAttribute("attribute", attribute); //$NON-NLS-1$
+ }
+ }
+ } catch(CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+
+ }
+
private void addLinkedResourcesForUnknownType(IFile beansXml, String typeName) {
if(typeName!=null && typeName.trim().length()>0) {
IStatus status = JavaConventions.validateJavaTypeName(typeName, CompilerOptions.VERSION_1_7, CompilerOptions.VERSION_1_7);
@@ -318,6 +359,7 @@
private int length;
private String typeName;
private boolean markedAsDuplicated;
+ private int duplicationIndex = 0;
public TypeNode(int startOffset, int length, String typeName) {
this.startOffset = startOffset;
@@ -356,6 +398,14 @@
public void setMarkedAsDuplicated(boolean markedAsDuplicated) {
this.markedAsDuplicated = markedAsDuplicated;
}
+
+ public int getDuplicationIndex() {
+ return duplicationIndex;
+ }
+
+ public void setDuplicationIndex(int i) {
+ duplicationIndex = i;
+ }
}
private static interface TypeValidator {
13 years, 7 months
JBoss Tools SVN: r39326 - trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/beans/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-03-06 20:33:50 -0500 (Tue, 06 Mar 2012)
New Revision: 39326
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/beans/model/CDIBeansConstants.java
Log:
JBIDE-11173
https://issues.jboss.org/browse/JBIDE-11173
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/beans/model/CDIBeansConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/beans/model/CDIBeansConstants.java 2012-03-06 23:21:45 UTC (rev 39325)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/beans/model/CDIBeansConstants.java 2012-03-07 01:33:50 UTC (rev 39326)
@@ -26,4 +26,7 @@
public String ATTR_CLASS = "class"; //$NON-NLS-1$
public String ATTR_STEREOTYPE = "stereotype"; //$NON-NLS-1$
+ public String NODE_INTERCEPTORS = "Interceptors"; //$NON-NLS-1$
+ public String NODE_DECORATORS = "Decorators"; //$NON-NLS-1$
+ public String NODE_ALTERNATIVES = "Alternatives"; //$NON-NLS-1$
}
13 years, 7 months
JBoss Tools SVN: r39325 - trunk/download.jboss.org/jbosstools/updates/indigo/SR2.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-03-06 18:21:45 -0500 (Tue, 06 Mar 2012)
New Revision: 39325
Modified:
trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeArtifacts...
trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeContent.xml
Log:
bump SR2 comp mirror to use newer m2e (including m2e-wtp 0.15.2)
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeArtifacts...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeArtifacts... 2012-03-06 23:20:19 UTC (rev 39324)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeArtifacts... 2012-03-06 23:21:45 UTC (rev 39325)
@@ -3,7 +3,7 @@
<repository name='JBoss Tools Requirements - Composite Indigo SR2 Mirror' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1330020981000'/>
+<property name='p2.timestamp' value='1331076067000'/>
</properties>
<children size='15'>
<child location='../../requirements/indigo/201202240900-SR2/'/>
@@ -18,7 +18,7 @@
<!-- <child location='http://dl.google.com/eclipse/plugin/3.7/'/> -->
<child location='../../requirements/gwt/2.5.0.v201201120043-rel-r37/'/>
<!-- includes m2e, m2e-extras, m2e-wtp, m2e-jdt-compiler -->
-<child location='../../requirements/m2eclipse/20120208-1400/'/>
+<child location='../../requirements/m2eclipse/20120306-1800/'/>
<child location='../../requirements/mylyn/3.6.5.v20120215-0100/'/>
<child location='../../requirements/orbit/R20120119162704/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeContent.xml 2012-03-06 23:20:19 UTC (rev 39324)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/SR2/compositeContent.xml 2012-03-06 23:21:45 UTC (rev 39325)
@@ -3,7 +3,7 @@
<repository name='JBoss Tools Requirements - Composite Indigo SR2 Mirror' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1330020984000'/>
+<property name='p2.timestamp' value='1331076072000'/>
</properties>
<children size='15'>
<child location='../../requirements/indigo/201202240900-SR2/'/>
@@ -18,7 +18,7 @@
<!-- <child location='http://dl.google.com/eclipse/plugin/3.7/'/> -->
<child location='../../requirements/gwt/2.5.0.v201201120043-rel-r37/'/>
<!-- includes m2e, m2e-extras, m2e-wtp, m2e-jdt-compiler -->
-<child location='../../requirements/m2eclipse/20120208-1400/'/>
+<child location='../../requirements/m2eclipse/20120306-1800/'/>
<child location='../../requirements/mylyn/3.6.5.v20120215-0100/'/>
<child location='../../requirements/orbit/R20120119162704/'/>
13 years, 7 months
JBoss Tools SVN: r39324 - trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-03-06 18:20:19 -0500 (Tue, 06 Mar 2012)
New Revision: 39324
Modified:
trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml
Log:
update m2e mirror to include m2e-wtp 0.15.2
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml 2012-03-06 22:55:22 UTC (rev 39323)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml 2012-03-06 23:20:19 UTC (rev 39324)
@@ -18,6 +18,7 @@
<target name="mirror">
<property name="URL1" value="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/"/>
<property name="URL2" value="http://download.jboss.org/jbosstools/updates/m2e-jdt-compiler/"/>
+ <property name="URL3" value="http://download.jboss.org/jbosstools/updates/requirements/m2eclipse/m2ecl..."/>
<!--
<property name="URL1" value="http://download.eclipse.org/technology/m2e/releases/"/>
@@ -28,16 +29,17 @@
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/20120208-1400" name="m2e 1.0, m2e-wtp 0.15, m2e-extras 0.15, m2e-jdt-compiler 1.0 (mirrored 20120208-1400)" />
+ <repository location="file:${destination}/20120306-1800" name="m2e 1.0, m2e-wtp 0.15.2, m2e-extras 0.15, m2e-jdt-compiler 1.0 (mirrored 20120306-1800)" />
<source>
<repository location="${URL1}" />
<repository location="${URL2}" />
+ <repository location="${URL3}" />
</source>
<slicingOptions includeFeatures="true" followStrict="true" />
</p2.mirror>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/20120208-1400/" artifactRepository="file:${destination}/20120208-1400/"
- publishartifacts="true" source="${destination}/20120208-1400/" compress="${compress}" />
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/20120306-1800/" artifactRepository="file:${destination}/20120306-1800/"
+ publishartifacts="true" source="${destination}/20120306-1800/" compress="${compress}" />
</target>
</project>
13 years, 7 months
JBoss Tools SVN: r39323 - branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-03-06 17:55:22 -0500 (Tue, 06 Mar 2012)
New Revision: 39323
Modified:
branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml
Log:
apply JBIDE11085.patch.txt re: JBDS-2057, JBIDE-11085
Modified: branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-03-06 22:48:46 UTC (rev 39322)
+++ branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-03-06 22:55:22 UTC (rev 39323)
@@ -23,7 +23,8 @@
license="Free, EPL"
name="JBoss Maven Integration"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -40,7 +41,8 @@
license="Free, EPL"
name="JBoss Maven CDI Configurator"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.cdi.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -57,7 +59,8 @@
license="Free, EPL"
name="JBoss Maven Hibernate Configurator"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.hibernate.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -74,7 +77,8 @@
license="Free, EPL"
name="JBoss Maven JAX-RS Configurator"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.jaxrs.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -91,7 +95,8 @@
license="Free, EPL"
name="JBoss Maven JSF Configurator"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.jsf.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -108,7 +113,8 @@
license="Free, EPL"
name="JBoss Maven Portlet Configurator"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.portlet.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -125,7 +131,8 @@
license="Free, EPL"
name="JBoss Maven Seam Configurator"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.seam.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -133,7 +140,7 @@
url="http://www.jboss.org/tools">
</overview>
</connectorDescriptor>
- <connectorDescriptor
+ <connectorDescriptor
categoryId="org.jboss.tools.central.discovery.maven"
groupId="org.jboss.tools.central.discovery.maven.configurators"
description="JBoss Maven JPA Configurator"
@@ -142,7 +149,8 @@
license="Free, EPL"
name="JBoss Maven JPA Configurator"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.jpa.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -159,7 +167,8 @@
license="Free, EPL"
name="Maven Profile Management UI"
provider="JBoss by Red Hat"
- siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo">
+ siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.profiles.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -178,6 +187,7 @@
name="Maven Integration for Eclipse (m2e)"
provider="eclipse.org"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/">
+ <iu id="org.eclipse.m2e.feature"/>
<icon
image32="images/m2e_32.gif">
</icon>
@@ -195,6 +205,7 @@
name="Maven Integration for Web Tools (m2e-wtp)"
provider="eclipse.org"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/">
+ <iu id="org.maven.ide.eclipse.wtp.feature"/>
<icon
image32="images/m2e_32.gif">
</icon>
@@ -222,7 +233,8 @@
license="Free, EPL"
name="Eclipse EGit"
provider="eclipse.org"
- siteUrl="http://download.jboss.org/jbosstools/updates/indigo/">
+ siteUrl="http://download.jboss.org/jbosstools/updates/indigo/SR2/">
+ <iu id="org.eclipse.egit"/>
<icon
image32="images/egit_32.png">
</icon>
@@ -257,12 +269,13 @@
id="org.jboss.tools.central.discovery.testing"
name="Testing"
relevance="60">
- <group id="bundled" />
- <group id="extra" />
+ <group id="org.jboss.tools.central.discovery.testing.local" />
+ <group id="org.jboss.tools.central.discovery.testing.remote" />
</connectorCategory>
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.testing"
+ groupId="org.jboss.tools.central.discovery.testing.local"
description="Tool support for FindBugs"
id="edu.umd.cs.findbugs.plugin.eclipse"
kind="task"
@@ -270,6 +283,7 @@
name="FindBugs"
provider="FindBugs Project"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
+ <iu id="edu.umd.cs.findbugs.plugin.eclipse"/>
<icon
image32="images/findbugs_32.png">
</icon>
@@ -279,27 +293,7 @@
</connectorDescriptor>
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.testing"
- description="Tool support for JRebel"
- id="org.zeroturnaround.eclipse.feature"
- kind="task"
- license="Commercial"
- name="JRebel"
- provider="zeroturnaround.org"
- siteUrl="http://www.zeroturnaround.com/update-site/">
- <iu id="org.zeroturnaround.eclipse.feature"/>
- <iu id="org.zeroturnaround.eclipse.nature.feature"/>
- <iu id="org.zeroturnaround.eclipse.debug.feature"/>
- <iu id="org.zeroturnaround.eclipse.wtp.feature"/>
- <iu id="org.zeroturnaround.eclipse.embedder.feature"/>
- <icon
- image32="images/jrebel_32.png">
- </icon>
- <overview
- url="http://zeroturnaround.com/jrebel/current/">
- </overview>
- </connectorDescriptor>
- <connectorDescriptor
- categoryId="org.jboss.tools.central.discovery.testing"
+ groupId="org.jboss.tools.central.discovery.testing.local"
description="Tool support for JSLint"
id="com.rockstarapps.workbench.branding.feature"
kind="task"
@@ -308,10 +302,10 @@
provider="Rockstarapps.com"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
<iu id="com.rockstarapps.aws.feature"/>
- <iu id="com.rockstarapps.html.core.feature"/>
- <iu id="com.rockstarapps.jsLex"/>
- <iu id="com.rockstarapps.jsLint"/>
- <iu id="com.rockstarapps.workbench.branding.feature"/>
+ <iu id="com.rockstarapps.html.core.feature"/>
+ <iu id="com.rockstarapps.jsLex"/>
+ <iu id="com.rockstarapps.jsLint"/>
+ <iu id="com.rockstarapps.workbench.branding.feature"/>
<icon
image32="images/jslint_32.png">
</icon>
@@ -321,6 +315,7 @@
</connectorDescriptor>
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.testing"
+ groupId="org.jboss.tools.central.discovery.testing.local"
description="Tool support for PMD"
id="net.sourceforge.pmd.eclipse"
kind="task"
@@ -328,6 +323,7 @@
name="PMD"
provider="PMD Developers"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
+ <iu id="net.sourceforge.pmd.eclipse"/>
<icon
image32="images/pmd_32.png">
</icon>
@@ -337,6 +333,7 @@
</connectorDescriptor>
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.testing"
+ groupId="org.jboss.tools.central.discovery.testing.local"
description="Tool support for TestNG"
id="org.testng.eclipse"
kind="task"
@@ -344,6 +341,7 @@
name="TestNG"
provider="Cedric Beust"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
+ <iu id="org.testng.eclipse"/>
<icon
image32="images/testng_32.gif">
</icon>
@@ -353,6 +351,28 @@
url="http://testng.org/">
</overview>
</connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.jboss.tools.central.discovery.testing"
+ groupId="org.jboss.tools.central.discovery.testing.remote"
+ description="Tool support for JRebel - requires JST Server"
+ id="org.zeroturnaround.eclipse.feature"
+ kind="task"
+ license="Commercial"
+ name="JRebel"
+ provider="zeroturnaround.org"
+ siteUrl="http://www.zeroturnaround.com/update-site/">
+ <iu id="org.zeroturnaround.eclipse.feature"/>
+ <iu id="org.zeroturnaround.eclipse.nature.feature"/>
+ <iu id="org.zeroturnaround.eclipse.debug.feature"/>
+ <iu id="org.zeroturnaround.eclipse.wtp.feature"/>
+ <iu id="org.zeroturnaround.eclipse.embedder.feature"/>
+ <icon
+ image32="images/jrebel_32.png">
+ </icon>
+ <overview
+ url="http://zeroturnaround.com/jrebel/current/">
+ </overview>
+ </connectorDescriptor>
<!-- Web -->
@@ -361,20 +381,43 @@
id="org.jboss.tools.central.discovery.web"
name="Web Development"
relevance="60">
- <group id="bundled" />
- <group id="extra" />
+ <group id="org.jboss.tools.central.discovery.web.core" />
+ <group id="org.jboss.tools.central.discovery.web.extras" />
</connectorCategory>
- <!-- TODO: change URL to http://download.jboss.org/jbosstools/updates/indigo/ for/after Beta1 -->
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.web"
- description="Google Plugin for Eclipse (GPE) 2.5.1 + Google Web Toolkit SDK (GWT) 2.4.0"
+ groupId="org.jboss.tools.central.discovery.web.core"
+ description="JST Server Core, UI, Adapters, Extensions, User Doc"
+ id="org.eclipse.jst.server_core.feature"
+ kind="task"
+ license="Free, EPL, Other"
+ name="JST Server"
+ provider="Eclipse.org"
+ siteUrl="http://download.jboss.org/jbosstools/updates/indigo/SR2/">
+ <iu id="org.eclipse.jst.server_adapters.ext.feature"/>
+ <iu id="org.eclipse.jst.server_adapters.feature"/>
+ <iu id="org.eclipse.jst.server_core.feature"/>
+ <iu id="org.eclipse.jst.server_ui.feature"/>
+ <iu id="org.eclipse.jst.server_userdoc.feature"/>
+ <icon
+ image32="images/wtp_32.png">
+ </icon>
+ <overview
+ url="http://eclipse.org/webtools/">
+ </overview>
+ </connectorDescriptor>
+
+ <connectorDescriptor
+ categoryId="org.jboss.tools.central.discovery.web"
+ groupId="org.jboss.tools.central.discovery.web.extras"
+ description="Google Plugin for Eclipse (GPE) + Google Web Toolkit SDK (GWT)"
id="com.google.gwt.eclipse.sdkbundle.e37.feature"
kind="task"
license="EPL, Other"
name="Google Plugin + Web Toolkit"
provider="Google, Inc."
- siteUrl="http://download.jboss.org/jbosstools/updates/requirements/gwt/2.5.0.v2012...">
+ siteUrl="http://download.jboss.org/jbosstools/updates/indigo/SR2/">
<iu id="com.google.gwt.eclipse.sdkbundle.e37.feature"/>
<iu id="com.google.gdt.eclipse.suite.e37.feature"/>
<icon
@@ -386,6 +429,7 @@
</connectorDescriptor>
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.web"
+ groupId="org.jboss.tools.central.discovery.web.extras"
description="Tool support for the Spring Framework"
id="org.springframework.ide.eclipse.feature"
kind="task"
@@ -408,5 +452,7 @@
</overview>
</connectorDescriptor>
+ <!-- TODO: change URLs from http://download.jboss.org/jbosstools/updates/indigo/SR2/ to http://download.jboss.org/jbosstools/updates/indigo/ after Beta1 -->
+
</extension>
</plugin>
13 years, 7 months
JBoss Tools SVN: r39322 - trunk/central/plugins/org.jboss.tools.central.discovery.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-03-06 17:48:46 -0500 (Tue, 06 Mar 2012)
New Revision: 39322
Modified:
trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
Log:
JBIDE-2057 fix order of file to match changes in JBT version; fix connector IDs to match JBT version; add missing nested IUs so it's explicitly clear what's being installed regardless of the ID value
Modified: trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-03-06 22:45:00 UTC (rev 39321)
+++ trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-03-06 22:48:46 UTC (rev 39322)
@@ -24,6 +24,7 @@
name="JBoss Maven Integration"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -41,6 +42,7 @@
name="JBoss Maven CDI Configurator"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.cdi.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -58,6 +60,7 @@
name="JBoss Maven Hibernate Configurator"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.hibernate.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -75,6 +78,7 @@
name="JBoss Maven JAX-RS Configurator"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.jaxrs.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -92,6 +96,7 @@
name="JBoss Maven JSF Configurator"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.jsf.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -109,6 +114,7 @@
name="JBoss Maven Portlet Configurator"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.portlet.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -126,6 +132,7 @@
name="JBoss Maven Seam Configurator"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.seam.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -143,6 +150,7 @@
name="JBoss Maven JPA Configurator"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.jpa.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -160,6 +168,7 @@
name="Maven Profile Management UI"
provider="JBoss by Red Hat"
siteUrl="http://download.jboss.org/jbosstools/updates/development/indigo/">
+ <iu id="org.jboss.tools.maven.profiles.feature"/>
<icon
image32="images/jbosstools_icon32.png">
</icon>
@@ -178,6 +187,7 @@
name="Maven Integration for Eclipse (m2e)"
provider="eclipse.org"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/">
+ <iu id="org.eclipse.m2e.feature"/>
<icon
image32="images/m2e_32.gif">
</icon>
@@ -195,6 +205,7 @@
name="Maven Integration for Web Tools (m2e-wtp)"
provider="eclipse.org"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/">
+ <iu id="org.maven.ide.eclipse.wtp.feature"/>
<icon
image32="images/m2e_32.gif">
</icon>
@@ -223,6 +234,7 @@
name="Eclipse EGit"
provider="eclipse.org"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/SR2/">
+ <iu id="org.eclipse.egit"/>
<icon
image32="images/egit_32.png">
</icon>
@@ -271,6 +283,7 @@
name="FindBugs"
provider="FindBugs Project"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
+ <iu id="edu.umd.cs.findbugs.plugin.eclipse"/>
<icon
image32="images/findbugs_32.png">
</icon>
@@ -289,10 +302,10 @@
provider="Rockstarapps.com"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
<iu id="com.rockstarapps.aws.feature"/>
- <iu id="com.rockstarapps.html.core.feature"/>
- <iu id="com.rockstarapps.jsLex"/>
- <iu id="com.rockstarapps.jsLint"/>
- <iu id="com.rockstarapps.workbench.branding.feature"/>
+ <iu id="com.rockstarapps.html.core.feature"/>
+ <iu id="com.rockstarapps.jsLex"/>
+ <iu id="com.rockstarapps.jsLint"/>
+ <iu id="com.rockstarapps.workbench.branding.feature"/>
<icon
image32="images/jslint_32.png">
</icon>
@@ -310,6 +323,7 @@
name="PMD"
provider="PMD Developers"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
+ <iu id="net.sourceforge.pmd.eclipse"/>
<icon
image32="images/pmd_32.png">
</icon>
@@ -327,6 +341,7 @@
name="TestNG"
provider="Cedric Beust"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/extras/">
+ <iu id="org.testng.eclipse"/>
<icon
image32="images/testng_32.gif">
</icon>
13 years, 7 months
JBoss Tools SVN: r39321 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: core/console and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-03-06 17:45:00 -0500 (Tue, 06 Mar 2012)
New Revision: 39321
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegator.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java
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/ExpressWizardFragment.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleRemoveAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleTypePropertyTester.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java
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
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
Log:
Fixed - JBIDE-11135
Non saved credentials are remembered even after Eclipse restart
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -24,7 +24,6 @@
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.PushOperationResult;
-import org.eclipse.egit.ui.Activator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.osgi.util.NLS;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -10,8 +10,22 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.console;
+import java.util.Map;
+
import com.openshift.express.client.IUser;
public interface IPasswordPrompter {
- public String getPasswordFor(IUser user);
+
+ public enum PromptResult {
+ PASSWORD_VALUE, SAVE_PASSWORD_VALUE;
+ }
+ /**
+ * Returns a map of the values entered by the user. The value indexed with {@link IPasswordPrompter.PromptResult.PASSWORD_VALUE} in the
+ * returning array is the input password, the value indexed with indexed with {@link IPasswordPrompter.PromptResult.SAVE_PASSWORD_VALUE} is the Boolean stating
+ * whether the password should be saved in the secured storage or not.
+ *
+ * @param user
+ * @return map with password value (as String) and 'save password' (as Boolean)
+ */
+ public Map<PromptResult, Object> getPasswordFor(IUser user);
}
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java (from rev 39191, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegator.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * 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.console;
+
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter.PromptResult;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.IDomain;
+import com.openshift.express.client.IEmbeddableCartridge;
+import com.openshift.express.client.ISSHPublicKey;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
+public class UserDelegate implements IUser {
+ private IUser delegate;
+ private boolean rememberPassword;
+
+ public UserDelegate(IUser user, boolean rememberPassword) {
+ this.delegate = user;
+ this.rememberPassword = rememberPassword;
+ }
+
+ public String getRhlogin() {
+ return delegate.getRhlogin();
+ }
+ public String getPassword() {
+ return delegate.getPassword();
+ }
+
+ public boolean isRememberPassword() {
+ return rememberPassword;
+ }
+
+ protected void checkForPassword() {
+ if( delegate.getPassword() == null || "".equals(delegate.getPassword())) {
+ try {
+ Map<PromptResult, Object> passwordAndSaveValues = UserModel.promptForPassword(this);
+ if(passwordAndSaveValues != null) {
+ final String password = (String) passwordAndSaveValues.get(PromptResult.PASSWORD_VALUE);
+ delegate = UserModel.getDefault().createUser(delegate.getRhlogin(), password);
+ final Boolean save = (Boolean) passwordAndSaveValues.get(PromptResult.SAVE_PASSWORD_VALUE);
+ this.rememberPassword = save;
+ }
+ } catch( Exception e ) {
+ Logger.error("Failed to retrieve User's password", e);
+ }
+ }
+ }
+
+ public IApplication createApplication(String arg0, ICartridge arg1)
+ throws OpenShiftException {
+ checkForPassword();
+ return delegate.createApplication(arg0, arg1);
+ }
+
+ public IDomain createDomain(String arg0, ISSHPublicKey arg1)
+ throws OpenShiftException {
+ checkForPassword();
+ return delegate.createDomain(arg0, arg1);
+ }
+ public IApplication getApplicationByName(String arg0)
+ throws OpenShiftException {
+ checkForPassword();
+ return delegate.getApplicationByName(arg0);
+ }
+ public List<IApplication> getApplications() throws OpenShiftException {
+ checkForPassword();
+ return delegate.getApplications();
+ }
+ public List<IApplication> getApplicationsByCartridge(ICartridge arg0)
+ throws OpenShiftException {
+ checkForPassword();
+ return delegate.getApplicationsByCartridge(arg0);
+ }
+ public String getAuthIV() {
+ checkForPassword();
+ return delegate.getAuthIV();
+ }
+ public String getAuthKey() {
+ checkForPassword();
+ return delegate.getAuthKey();
+ }
+ public ICartridge getCartridgeByName(String arg0) throws OpenShiftException {
+ checkForPassword();
+ return delegate.getCartridgeByName(arg0);
+ }
+ public List<ICartridge> getCartridges() throws OpenShiftException {
+ checkForPassword();
+ return delegate.getCartridges();
+ }
+ public IDomain getDomain() throws OpenShiftException {
+ checkForPassword();
+ return delegate.getDomain();
+ }
+ public List<IEmbeddableCartridge> getEmbeddableCartridges()
+ throws OpenShiftException {
+ checkForPassword();
+ return delegate.getEmbeddableCartridges();
+ }
+ public ISSHPublicKey getSshKey() throws OpenShiftException {
+ checkForPassword();
+ return delegate.getSshKey();
+ }
+ public String getUUID() throws OpenShiftException {
+ checkForPassword();
+ return delegate.getUUID();
+ }
+ public boolean hasApplication(String arg0) throws OpenShiftException {
+ checkForPassword();
+ return delegate.hasApplication(arg0);
+ }
+ public boolean hasApplication(ICartridge arg0) throws OpenShiftException {
+ checkForPassword();
+ return delegate.hasApplication(arg0);
+ }
+ public boolean hasDomain() throws OpenShiftException {
+ checkForPassword();
+ return delegate.hasDomain();
+ }
+ public boolean isValid() throws OpenShiftException {
+ checkForPassword();
+ return delegate.isValid();
+ }
+ public void refresh() throws OpenShiftException {
+ checkForPassword();
+ delegate.refresh();
+ }
+}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegator.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegator.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegator.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * 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.console;
-
-import java.util.List;
-
-import com.openshift.express.client.IApplication;
-import com.openshift.express.client.ICartridge;
-import com.openshift.express.client.IDomain;
-import com.openshift.express.client.IEmbeddableCartridge;
-import com.openshift.express.client.ISSHPublicKey;
-import com.openshift.express.client.IUser;
-import com.openshift.express.client.OpenShiftException;
-
-public class UserDelegator implements IUser {
- private IUser delegate;
- public UserDelegator(IUser user) {
- this.delegate = user;
- }
-
- public String getRhlogin() {
- return delegate.getRhlogin();
- }
- public String getPassword() {
- return delegate.getPassword();
- }
- protected void checkForPassword() {
- if( delegate.getPassword() == null || "".equals(delegate.getPassword())) {
- try {
- String newPw = UserModel.promptForPassword(this);
- delegate = UserModel.getDefault().createUser(delegate.getRhlogin(), newPw);
- } catch( Exception e ) {
- // TODO log handle everything
- }
- }
- }
-
- public IApplication createApplication(String arg0, ICartridge arg1)
- throws OpenShiftException {
- checkForPassword();
- return delegate.createApplication(arg0, arg1);
- }
-
- public IDomain createDomain(String arg0, ISSHPublicKey arg1)
- throws OpenShiftException {
- checkForPassword();
- return delegate.createDomain(arg0, arg1);
- }
- public IApplication getApplicationByName(String arg0)
- throws OpenShiftException {
- checkForPassword();
- return delegate.getApplicationByName(arg0);
- }
- public List<IApplication> getApplications() throws OpenShiftException {
- checkForPassword();
- return delegate.getApplications();
- }
- public List<IApplication> getApplicationsByCartridge(ICartridge arg0)
- throws OpenShiftException {
- checkForPassword();
- return delegate.getApplicationsByCartridge(arg0);
- }
- public String getAuthIV() {
- checkForPassword();
- return delegate.getAuthIV();
- }
- public String getAuthKey() {
- checkForPassword();
- return delegate.getAuthKey();
- }
- public ICartridge getCartridgeByName(String arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.getCartridgeByName(arg0);
- }
- public List<ICartridge> getCartridges() throws OpenShiftException {
- checkForPassword();
- return delegate.getCartridges();
- }
- public IDomain getDomain() throws OpenShiftException {
- checkForPassword();
- return delegate.getDomain();
- }
- public List<IEmbeddableCartridge> getEmbeddableCartridges()
- throws OpenShiftException {
- checkForPassword();
- return delegate.getEmbeddableCartridges();
- }
- public ISSHPublicKey getSshKey() throws OpenShiftException {
- checkForPassword();
- return delegate.getSshKey();
- }
- public String getUUID() throws OpenShiftException {
- checkForPassword();
- return delegate.getUUID();
- }
- public boolean hasApplication(String arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.hasApplication(arg0);
- }
- public boolean hasApplication(ICartridge arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.hasApplication(arg0);
- }
- public boolean hasDomain() throws OpenShiftException {
- checkForPassword();
- return delegate.hasDomain();
- }
- public boolean isValid() throws OpenShiftException {
- checkForPassword();
- return delegate.isValid();
- }
- public void refresh() throws OpenShiftException {
- checkForPassword();
- delegate.refresh();
- }
-}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -15,10 +15,13 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.common.ui.preferencevalue.StringsPreferenceValue;
+import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter.PromptResult;
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.utils.OpenShiftPasswordStorageKey;
@@ -45,13 +48,29 @@
public static void setPasswordPrompt(IPasswordPrompter prompt) {
prompter =prompt;
}
- public static String promptForPassword(IUser user) {
+
+ public static IPasswordPrompter getPasswordPrompt() {
+ return prompter;
+ }
+
+ /**
+ * Returns a map of the values entered by the user. The value indexed with {@link IPasswordPrompter.PromptResult.PASSWORD_VALUE} in the
+ * returning array is the input password, the value indexed with indexed with {@link IPasswordPrompter.PromptResult.SAVE_PASSWORD_VALUE} is the Boolean stating
+ * whether the password should be saved in the secured storage or not.
+ *
+ * @param user
+ * @return map with password value (as String) and 'save password' (as
+ * Boolean), or null if the password prompter could not be
+ * initialized
+ */
+
+ public static Map<PromptResult, Object> promptForPassword(IUser user) {
return prompter == null ? null : prompter.getPasswordFor(user);
}
-
+
/** The most recent user connected on OpenShift. */
- private IUser recentUser = null;
- private HashMap<String, IUser> allUsers = new HashMap<String, IUser>();
+ private UserDelegate recentUser = null;
+ private HashMap<String, UserDelegate> allUsers = new HashMap<String, UserDelegate>();
private ArrayList<IUserModelListener> listeners = new ArrayList<IUserModelListener>();
public UserModel() {
@@ -76,15 +95,14 @@
* @throws IOException
*/
public IUser createUser(String username, String password) throws OpenShiftException, IOException {
- IUser u = new User(username, password, USER_ID);
- return u;
+ return new User(username, password, USER_ID);
}
private static final int ADDED = 0;
private static final int REMOVED = 1;
private static final int CHANGED = 2;
- public void addUser(IUser user) {
+ public void addUser(UserDelegate user) {
allUsers.put(user.getRhlogin(), user);
this.recentUser = user;
fireModelChange(user, ADDED);
@@ -118,21 +136,21 @@
}
}
- public IUser getRecentUser() {
+ public UserDelegate getRecentUser() {
return recentUser;
}
- public void setRecentUser(IUser user) {
+ public void setRecentUser(UserDelegate user) {
this.recentUser = user;
}
- public IUser findUser(String username) {
+ public UserDelegate findUser(String username) {
return allUsers.get(username);
}
- public IUser[] getUsers() {
- Collection<IUser> c = allUsers.values();
- IUser[] rets = (IUser[]) c.toArray(new IUser[c.size()]);
+ public UserDelegate[] getUsers() {
+ Collection<UserDelegate> c = allUsers.values();
+ UserDelegate[] rets = (UserDelegate[]) c.toArray(new UserDelegate[c.size()]);
return rets;
}
@@ -146,8 +164,8 @@
for (int i = 0; i < users.length; i++) {
try {
String password = getPasswordFromSecureStorage(users[i]);
- IUser u = createUser(users[i], password);
- addUser(new UserDelegator(u));
+ UserDelegate u = new UserDelegate(createUser(users[i], password), password != null);
+ addUser(u);
} catch (OpenShiftException ose) {
// TODO
} catch (IOException ioe) {
@@ -168,11 +186,12 @@
OpenShiftUIActivator.PLUGIN_ID);
pref.store(userList);
- Iterator<IUser> i = allUsers.values().iterator();
- IUser tmp;
- while (i.hasNext()) {
- tmp = i.next();
- setPasswordInSecureStorage(tmp.getRhlogin(), tmp.getPassword());
+ for (Entry<String, UserDelegate> entry : allUsers.entrySet()) {
+ UserDelegate user = entry.getValue();
+ if (user.isRememberPassword()) {
+ setPasswordInSecureStorage(user.getRhlogin(),
+ user.getPassword());
+ }
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -1,6 +1,8 @@
package org.jboss.tools.openshift.express.internal.ui;
import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
@@ -126,9 +128,8 @@
return ImageDescriptor.createFromURL(imageFileUrl);
}
- public String getPasswordFor(final IUser user) {
- final String[] val =new String[1];
- val[0] = null;
+ public Map<PromptResult, Object> getPasswordFor(final IUser user) {
+ final Map<PromptResult, Object> val = new HashMap<PromptResult, Object>();
Display.getDefault().syncExec(new Runnable() {
public void run() {
Shell shell = Display.getDefault().getActiveShell();
@@ -136,10 +137,11 @@
d.setCanModifyUser(false);
d.setDescription("Provide enter the password for your express server");
if( d.open() == Window.OK) {
- val[0] = d.getPass();
+ val.put(PromptResult.PASSWORD_VALUE, d.getPass());
+ val.put(PromptResult.SAVE_PASSWORD_VALUE, d.getSave());
}
}
});
- return val[0];
+ return val;
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -13,13 +13,12 @@
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import org.jboss.tools.openshift.express.internal.ui.wizard.NewOpenShiftExpressApplicationWizard;
import org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
-import com.openshift.express.client.IUser;
-
/**
* @author Xavier Coulon
*/
@@ -41,8 +40,8 @@
public void run() {
if (selection != null && selection instanceof ITreeSelection ) {
Object sel = ((ITreeSelection)selection).getFirstElement();
- if( sel instanceof IUser) {
- IUser user = (IUser) sel;
+ if( sel instanceof UserDelegate) {
+ UserDelegate user = (UserDelegate) sel;
OpenShiftExpressApplicationWizard wizard = new NewOpenShiftExpressApplicationWizard(user);
new WizardDialog(new Shell(), wizard).open();
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -16,13 +16,13 @@
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import org.jboss.tools.openshift.express.internal.ui.wizard.ImportOpenShiftExpressApplicationWizard;
import org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
import com.openshift.express.client.IApplication;
-import com.openshift.express.client.IUser;
/**
* @author Xavier Coulon
@@ -40,7 +40,7 @@
if (selection instanceof ITreeSelection
&& treeSelection.getFirstElement() instanceof IApplication) {
final IApplication application = (IApplication) treeSelection.getFirstElement();
- final IUser user = getUser(treeSelection.getPaths());
+ final UserDelegate user = getUser(treeSelection.getPaths());
final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(application.getName());
OpenShiftExpressApplicationWizard wizard = new ImportOpenShiftExpressApplicationWizard(user, project, application);
WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
@@ -50,13 +50,13 @@
}
}
- private IUser getUser(TreePath[] paths) {
- IUser user = null;
+ private UserDelegate getUser(TreePath[] paths) {
+ UserDelegate user = null;
if( paths != null
&& paths.length == 1 ) {
Object selection = paths[0].getParentPath().getLastSegment();
- if( selection instanceof IUser )
- user = (IUser) selection;
+ if( selection instanceof UserDelegate )
+ user = (UserDelegate) selection;
}
return user;
}
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-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -60,6 +60,7 @@
import org.jboss.ide.eclipse.as.ui.editor.ServerWorkingCopyPropertyComboCommand;
import org.jboss.ide.eclipse.as.ui.editor.ServerWorkingCopyPropertyCommand;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+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.wizard.ConnectToOpenShiftWizardModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPageModel;
@@ -67,7 +68,6 @@
import org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
import com.openshift.express.client.IApplication;
-import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
public class ExpressDetailsComposite {
@@ -97,7 +97,7 @@
protected boolean showVerify, showImportLink;
private String user, pass, app, remote, deployProject, deployFolder;
private IApplication fapplication;
- private IUser fuser;
+ private UserDelegate fuser;
private List<IApplication> appList;
private String[] appListNames;
private String error;
@@ -143,7 +143,7 @@
private void initModelNewServerWizard() {
// We're in a new server wizard.
- IUser tmpUser = (IUser) callback.getAttribute(ExpressServerUtils.TASK_WIZARD_ATTR_USER);
+ UserDelegate tmpUser = (UserDelegate) callback.getAttribute(ExpressServerUtils.TASK_WIZARD_ATTR_USER);
IApplication app = (IApplication) callback.getAttribute(ExpressServerUtils.TASK_WIZARD_ATTR_SELECTED_APP);
if( tmpUser != null && app != null ) {
@@ -561,7 +561,7 @@
};
}
- private void updateModelForNewUser(IUser user) throws OpenShiftException {
+ private void updateModelForNewUser(UserDelegate user) throws OpenShiftException {
// Updating the model, some long-running
projectsPerApp.clear();
@@ -608,7 +608,7 @@
return app;
}
- public IUser getUser() {
+ public UserDelegate getUser() {
return fuser;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -23,10 +23,10 @@
import org.jboss.ide.eclipse.as.ui.editor.DeploymentTypeUIUtil.NewServerWizardBehaviourCallback;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import com.openshift.express.client.IApplication;
-import com.openshift.express.client.IUser;
public class ExpressWizardFragment extends WizardFragment implements ICompletable {
private ExpressDetailsComposite composite;
@@ -69,7 +69,7 @@
public void performFinish(IProgressMonitor monitor) throws CoreException {
super.performFinish(monitor);
- IUser user = composite.getUser();
+ UserDelegate user = composite.getUser();
UserModel.getDefault().addUser(user);
IApplication app = composite.getApplication();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleRemoveAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleRemoveAction.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleRemoveAction.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -1,7 +1,5 @@
package org.jboss.tools.openshift.express.internal.ui.console;
-import java.security.Policy;
-
import org.eclipse.jface.action.Action;
public class ConsoleRemoveAction extends Action {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleTypePropertyTester.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleTypePropertyTester.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleTypePropertyTester.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -3,9 +3,11 @@
*/
package org.jboss.tools.openshift.express.internal.ui.console;
+import static org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils.CONSOLE_TYPE_KEY;
+import static org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils.CONSOLE_TYPE_VALUE;
+
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.ui.console.MessageConsole;
-import static org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils.*;
/**
* Property tester used to verify that the given instance of
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -10,22 +10,21 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import com.openshift.express.client.IUser;
-
/**
* @author André Dietisheim
*/
public class ConnectToOpenShiftWizardModel implements IUserAwareModel {
@Override
- public IUser getUser() {
+ public UserDelegate getUser() {
return UserModel.getDefault().getRecentUser();
}
@Override
- public IUser setUser(IUser user) {
+ public UserDelegate setUser(UserDelegate user) {
UserModel.getDefault().addUser(user);
return user;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -15,6 +15,7 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
+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.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
@@ -43,7 +44,7 @@
private String rhLogin;
private String password;
- private boolean rememberPassword;
+ private boolean rememberPassword = false;
private IStatus credentialsStatus;
private StringPreferenceValue rhLoginPreferenceValue;
private final String libraServer;
@@ -114,7 +115,7 @@
private void storePassword(IUser user) {
try {
- if (store != null) {
+ if (store != null ) {
OpenShiftPasswordStorageKey key = new OpenShiftPasswordStorageKey(libraServer, user.getRhlogin());
store.update(key, password);
}
@@ -136,6 +137,7 @@
protected String getConfiguredUserName() {
String configuredUsername = null;
try {
+ // retrieved from the local 'express.conf' configuration file
configuredUsername = new OpenShiftConfiguration().getRhlogin();
} catch (Exception e) {
Logger.error("Cound not retrieve rhlogin from express configuration");
@@ -210,9 +212,9 @@
private IStatus getValidityStatus(String rhLogin, String password) {
IStatus status = Status.OK_STATUS;
- IUser user = null;
+ UserDelegate user = null;
try {
- user = UserModel.getDefault().createUser(getRhLogin(), getPassword());
+ user = new UserDelegate(UserModel.getDefault().createUser(getRhLogin(), getPassword()), rememberPassword);
if (user.isValid()) {
storeUser(user);
} else {
@@ -229,7 +231,7 @@
return status;
}
- private void storeUser(IUser user) {
+ private void storeUser(UserDelegate user) {
wizardModel.setUser(user);
if (rememberPassword) {
storePassword(user);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -28,7 +28,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.common.ui.databinding.DataBindingUtils;
import org.jboss.tools.common.ui.databinding.ParametrizableWizardPageSupport;
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IUserAwareModel.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -1,11 +1,11 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import com.openshift.express.client.IUser;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
public interface IUserAwareModel {
- public IUser getUser();
+ public UserDelegate getUser();
- public IUser setUser(IUser user);
+ public UserDelegate setUser(UserDelegate user);
}
\ No newline at end of file
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-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportOpenShiftExpressApplicationWizard.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -4,9 +4,9 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
import org.eclipse.core.resources.IProject;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import com.openshift.express.client.IApplication;
-import com.openshift.express.client.IUser;
/**
* @author Xavier Coulon
@@ -27,7 +27,7 @@
* @param project
* @param application
*/
- public ImportOpenShiftExpressApplicationWizard(IUser user, IProject project, IApplication application) {
+ public ImportOpenShiftExpressApplicationWizard(UserDelegate user, IProject project, IApplication application) {
super(user, project, application, true, "Import OpenShift Express 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-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewOpenShiftExpressApplicationWizard.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -3,7 +3,7 @@
*/
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import com.openshift.express.client.IUser;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
/**
* @author Xavier Coulon
@@ -18,7 +18,7 @@
super(false, "New OpenShift Express Application");
}
- public NewOpenShiftExpressApplicationWizard(IUser user) {
+ public NewOpenShiftExpressApplicationWizard(UserDelegate user) {
super(user, null, null, false, "New OpenShift Express Application");
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -38,6 +38,7 @@
import org.jboss.tools.common.ui.DelegatingProgressMonitor;
import org.jboss.tools.common.ui.JobUtils;
import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.ui.ImportFailedException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.WontOverwriteException;
@@ -54,15 +55,14 @@
*/
public abstract class OpenShiftExpressApplicationWizard extends Wizard implements IImportWizard, INewWizard {
- private IUser initialUser;
+ private UserDelegate initialUser;
private OpenShiftExpressApplicationWizardModel wizardModel;
public OpenShiftExpressApplicationWizard(boolean useExistingApplication, String wizardTitle) {
this(null, null, null, useExistingApplication, wizardTitle);
}
-
- public OpenShiftExpressApplicationWizard(IUser user, IProject project, IApplication application, boolean useExistingApplication, String wizardTitle) {
+ public OpenShiftExpressApplicationWizard(UserDelegate user, IProject project, IApplication application, boolean useExistingApplication, String wizardTitle) {
setWizardModel(new OpenShiftExpressApplicationWizardModel(user, project, application, useExistingApplication));
setWindowTitle(wizardTitle);
setNeedsProgressMonitor(true);
@@ -123,11 +123,11 @@
public void init(IWorkbench workbench, IStructuredSelection selection) {
Object o = selection.getFirstElement();
if (o instanceof IUser) {
- setUser((IUser) o);
+ setUser((UserDelegate) o);
}
}
- protected void setUser(IUser user) {
+ protected void setUser(UserDelegate user) {
getWizardModel().setUser(user);
}
@@ -147,7 +147,7 @@
return initialUser == null ? pages[0] : pages[1];
}
- public void setInitialUser(IUser user) {
+ public void setInitialUser(UserDelegate user) {
this.initialUser = user;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java 2012-03-06 22:44:20 UTC (rev 39320)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java 2012-03-06 22:45:00 UTC (rev 39321)
@@ -21,6 +21,7 @@
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+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.messages.OpenShiftExpressUIMessages;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureGitSharedProject;
@@ -42,11 +43,11 @@
private static final int APP_CREATION_TIMEOUT = 120;
private static final String KEY_SELECTED_EMBEDDABLE_CARTRIDGES = "selectedEmbeddableCartridges";
- public OpenShiftExpressApplicationWizardModel(IUser user) {
+ public OpenShiftExpressApplicationWizardModel(UserDelegate user) {
this(user, null, null, false);
}
- public OpenShiftExpressApplicationWizardModel(IUser user, IProject project, IApplication application, boolean useExistingApplication) {
+ public OpenShiftExpressApplicationWizardModel(UserDelegate user, IProject project, IApplication application, boolean useExistingApplication) {
// default value(s)
setUser(user);
setProject(project);
@@ -417,18 +418,18 @@
}
@Override
- public IUser getUser() {
- return (IUser) getProperty(USER);
+ public UserDelegate getUser() {
+ return (UserDelegate) getProperty(USER);
}
@Override
- public IUser setUser(IUser user) {
- return (IUser) setProperty(USER, user);
+ public UserDelegate setUser(UserDelegate user) {
+ return (UserDelegate) setProperty(USER, user);
}
@Override
public void addUserToModel() {
- IUser user = getUser();
+ UserDelegate user = getUser();
Assert.isNotNull(user);
UserModel.getDefault().addUser(user);
}
13 years, 7 months
JBoss Tools SVN: r39320 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-03-06 17:44:20 -0500 (Tue, 06 Mar 2012)
New Revision: 39320
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteConnectionAction.java
Log:
Applying patch for JBIDE-10989
Disconnect should be Delete
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteConnectionAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteConnectionAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteConnectionAction.java 2012-03-06 22:44:20 UTC (rev 39320)
@@ -0,0 +1,25 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+
+import com.openshift.express.client.IUser;
+
+public class DeleteConnectionAction extends AbstractAction {
+
+ public DeleteConnectionAction() {
+ super(OpenShiftExpressUIMessages.DELETE_CONNECTION_ACTION);
+ }
+
+ @Override
+ public void run() {
+ final ITreeSelection treeSelection = (ITreeSelection)selection;
+ if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IUser) {
+ final IUser user = (IUser) treeSelection.getFirstElement();
+ UserModel.getDefault().removeUser(user);
+ }
+ }
+
+
+}
\ No newline at end of file
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteConnectionAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 7 months
JBoss Tools SVN: r39319 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: viewer/actionProvider and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-03-06 17:43:44 -0500 (Tue, 06 Mar 2012)
New Revision: 39319
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteConnectionActionProvider.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/RemoveConnectionActionProvider.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
Log:
Applying patch for JBIDE-10989
Disconnect should be Delete
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-03-06 22:21:50 UTC (rev 39318)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-03-06 22:43:44 UTC (rev 39319)
@@ -6,6 +6,7 @@
private static final String BUNDLE_NAME = OpenShiftExpressUIMessages.class.getName();
+
static {
NLS.initializeMessages(BUNDLE_NAME, OpenShiftExpressUIMessages.class);
}
@@ -40,4 +41,5 @@
public static String REFRESH_VIEWER_ACTION;
+ public static String DELETE_CONNECTION_ACTION;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-03-06 22:21:50 UTC (rev 39318)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-03-06 22:43:44 UTC (rev 39319)
@@ -16,3 +16,6 @@
SHOW_PROPERTIES_VIEW_ACTION=Properties
REFRESH_VIEWER_ACTION=Refresh
+DELETE_CONNECTION_ACTION=Delete
+
+
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteConnectionActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteConnectionActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteConnectionActionProvider.java 2012-03-06 22:43:44 UTC (rev 39319)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.DeleteConnectionAction;
+
+
+
+/**
+ * @author Rob Stryker
+ */
+public class DeleteConnectionActionProvider extends AbstractActionProvider {
+
+
+
+ public DeleteConnectionActionProvider() {
+ super(new DeleteConnectionAction(), "group.edition");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/DeleteConnectionActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/RemoveConnectionActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/RemoveConnectionActionProvider.java 2012-03-06 22:21:50 UTC (rev 39318)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/RemoveConnectionActionProvider.java 2012-03-06 22:43:44 UTC (rev 39319)
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.ui.viewer.actionProvider;
-
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import org.jboss.tools.openshift.express.internal.ui.action.AbstractAction;
-
-import com.openshift.express.client.IUser;
-
-/**
- * @author Rob Stryker
- */
-public class RemoveConnectionActionProvider extends AbstractActionProvider {
-
-
-
- public RemoveConnectionActionProvider() {
- super(new DeleteConnectionAction(), "group.edition");
- }
-
-
- public static class DeleteConnectionAction extends AbstractAction {
-
- public DeleteConnectionAction() {
- super("Disconnect");
- }
-
- @Override
- public void run() {
- final ITreeSelection treeSelection = (ITreeSelection)selection;
- if (selection != null && selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof IUser) {
- final IUser user = (IUser) treeSelection.getFirstElement();
- UserModel.getDefault().removeUser(user);
- }
- }
-
-
- }
-
-}
13 years, 7 months