JBoss Tools SVN: r26988 - in trunk/common/plugins: org.jboss.tools.common.resref.ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-26 19:04:15 -0500 (Fri, 26 Nov 2010)
New Revision: 26988
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties
trunk/common/plugins/org.jboss.tools.common.resref.ui/build.properties
Log:
https://jira.jboss.org/browse/JBDS-1367 Missing Plugins Info
build.properjties adjusted to include about.htm in build for plugins:
org.jboss.tools.common.model.ui.capabilities
org.jboss.tools.common.resref.ui
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties 2010-11-26 19:46:01 UTC (rev 26987)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties 2010-11-27 00:04:15 UTC (rev 26988)
@@ -3,4 +3,5 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
- plugin.properties
+ plugin.properties,\
+ about.html
Modified: trunk/common/plugins/org.jboss.tools.common.resref.ui/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.ui/build.properties 2010-11-26 19:46:01 UTC (rev 26987)
+++ trunk/common/plugins/org.jboss.tools.common.resref.ui/build.properties 2010-11-27 00:04:15 UTC (rev 26988)
@@ -2,4 +2,5 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.properties
+ plugin.properties,\
+ about.html
14 years
JBoss Tools SVN: r26987 - trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-11-26 14:46:01 -0500 (Fri, 26 Nov 2010)
New Revision: 26987
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenExternalProcessExecutionTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7709 - fixed
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenExternalProcessExecutionTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenExternalProcessExecutionTest.java 2010-11-26 16:53:55 UTC (rev 26986)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenExternalProcessExecutionTest.java 2010-11-26 19:46:01 UTC (rev 26987)
@@ -26,6 +26,12 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.internal.core.LaunchManager;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.jdt.core.ToolFactory;
+import org.eclipse.jdt.core.formatter.CodeFormatter;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.TextEdit;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences;
@@ -51,6 +57,8 @@
private ConsoleConfiguration consoleCfg;
private LaunchConfigTestProject2 project;
private LaunchManager launchManager = new LaunchManager();
+ private final CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(null);
+ private final String ls = System.getProperties().getProperty("line.separator", ResourceReadUtils.LN_1); //$NON-NLS-1$
public CodeGenExternalProcessExecutionTest(String name) {
super(name);
@@ -198,18 +206,104 @@
}
assertTrue(nTest > 0);
//
- boolean res = compareFolders(testFolderAllExportersExternal, testFolderAllExportersInternal);
+ boolean res = compareFolders(testFolderAllExportersExternal, testFolderAllExportersInternal, true);
assertTrue(res);
}
protected class ResComparator implements Comparator<IResource> {
public int compare(IResource o1, IResource o2) {
- return o1.getName().compareTo(o2.getName());
+ int res = o1.getName().compareTo(o2.getName());
+ if (res == 0) {
+ if (o1.getType() < o2.getType()) {
+ res = -1;
+ } else if (o1.getType() > o2.getType()) {
+ res = 1;
+ }
+ }
+ return res;
}
}
+
+ /**
+ * Clean up string of substrings in between [cmtB, cmtE],
+ * cmtB, cmtE - are markers of substring to delete.
+ *
+ * @param str
+ * @param cmtB
+ * @param cmtE
+ * @return
+ */
+ public String stripComments(String str, final String cmtB, final String cmtE) {
+ boolean process = true;
+ while (process) {
+ int fromIndex = 0;
+ int commentStart = str.indexOf(cmtB, fromIndex);
+ fromIndex = commentStart;
+ int commentEnd = str.indexOf(cmtE, fromIndex);
+ if (commentStart < commentEnd && commentStart != -1) {
+ str = str.substring(0, commentStart) + str.substring(commentEnd + cmtE.length());
+ } else {
+ process = false;
+ }
+ }
+ return str;
+ }
- public boolean compareFiles(IFile testFile1, IFile testFile2) {
+ /**
+ * get rid of xml comments.
+ *
+ * @param str
+ * @return
+ */
+ public String stripXmlComments(String str) {
+ final String cmtB = "<!--"; //$NON-NLS-1$
+ final String cmtE = "-->"; //$NON-NLS-1$
+ return stripComments(str, cmtB, cmtE);
+ }
+
+ /**
+ * get rid of java comments.
+ *
+ * @param str
+ * @return
+ */
+ public String stripJavaComments(String str) {
+ final String cmtB = "/*"; //$NON-NLS-1$
+ final String cmtE = "*/"; //$NON-NLS-1$
+ str = stripComments(str, cmtB, cmtE);
+ final String cmt2B = "//"; //$NON-NLS-1$
+ final String cmt2E = ls;
+ str = stripComments(str, cmt2B, cmt2E);
+ return str;
+ }
+
+ /**
+ * format string as java file.
+ *
+ * @param str
+ * @return
+ */
+ public String formatJavaFile(String str) {
+ Document doc = new Document(str);
+ TextEdit edit = codeFormatter.format(CodeFormatter.K_COMPILATION_UNIT, str, 0, str.length(), 0, null);
+ try {
+ edit.apply(doc);
+ } catch (MalformedTreeException e) {
+ } catch (BadLocationException e) {
+ }
+ return doc.get();
+ }
+
+ /**
+ * Compares 2 files, if identical for test purposes return true.
+ *
+ * @param testFile1
+ * @param testFile2
+ * @param assertFlag - if true execute assertion
+ * @return
+ */
+ public boolean compareFiles(IFile testFile1, IFile testFile2, boolean assertFlag) {
boolean res = false;
InputStream is1 = null, is2 = null;
try {
@@ -222,8 +316,8 @@
}
if (is1 == null || is2 == null) {
res = is1 == is2;
- if (!res) {
- res = false;
+ if (!res && assertFlag) {
+ assertEquals(is1, is2);
}
return res;
}
@@ -231,19 +325,47 @@
String str2 = ResourceReadUtils.readStream(is2);
if (str1 == null || str2 == null) {
res = str1 == str2;
- if (!res) {
- res = false;
+ if (!res && assertFlag) {
+ assertEquals(str1, str2);
}
return res;
}
- res = 0 == str1.compareTo(str2);
- if (!res) {
- res = false;
+ final String useExt = testFile1.getFileExtension();
+ if (0 == "xml".compareToIgnoreCase(useExt)) { //$NON-NLS-1$
+ str1 = stripXmlComments(str1);
+ str2 = stripXmlComments(str2);
+ } else if (0 == "java".compareToIgnoreCase(useExt)) { //$NON-NLS-1$
+ str1 = formatJavaFile(str1);
+ str2 = formatJavaFile(str2);
+ str1 = stripJavaComments(str1);
+ str2 = stripJavaComments(str2);
}
+ if (testFile1.getName().endsWith("cfg.xml")) { //$NON-NLS-1$
+ // do not compare generated cfg.xml files till the time of
+ // open question for Environment.HBM2DDL_AUTO settings
+ //res = 0 == str1.compareTo(str2);
+ //if (!res && assertFlag) {
+ // assertEquals(str1, str2);
+ //}
+ res = true;
+ } else {
+ res = 0 == str1.compareTo(str2);
+ if (!res && assertFlag) {
+ assertEquals(str1, str2);
+ }
+ }
return res;
}
- public boolean compareFolders(IFolder testFolder1, IFolder testFolder2) {
+ /**
+ * Compares 2 folders, if identical for test purposes return true.
+ *
+ * @param testFolder1
+ * @param testFolder2
+ * @param assertFlag - if true execute assertion
+ * @return
+ */
+ public boolean compareFolders(IFolder testFolder1, IFolder testFolder2, boolean assertFlag) {
boolean res = false;
IResource[] res1 = null, res2 = null;
try {
@@ -255,9 +377,17 @@
} catch (CoreException e) {
}
if (res1 == null || res2 == null) {
- return res1 == res2;
+ res = res1 == res2;
+ if (!res && assertFlag) {
+ assertEquals(res1, res2);
+ }
+ return res;
}
- if (res1.length != res2.length) {
+ res = res1.length == res2.length;
+ if (!res) {
+ if (!res && assertFlag) {
+ assertEquals(res1.length, res2.length);
+ }
return res;
}
final ResComparator cmp = new ResComparator();
@@ -267,20 +397,26 @@
for (int i = 0; res && i < res1.length; i++) {
if (0 != res1[i].getName().compareTo(res2[i].getName())) {
res = false;
+ if (!res && assertFlag) {
+ assertEquals(res1[i].getName(), res2[i].getName());
+ }
}
if (res1[i].getType() != res2[i].getType()) {
res = false;
+ if (!res && assertFlag) {
+ assertEquals(res1[i].getType(), res2[i].getType());
+ }
}
if (res && ((IResource.FOLDER & res1[i].getType()) == IResource.FOLDER)) {
IFolder tf1 = (IFolder)res1[i];
IFolder tf2 = (IFolder)res2[i];
- res = compareFolders(tf1, tf2);
+ res = compareFolders(tf1, tf2, assertFlag);
}
- //if (res && ((IResource.FILE & res1[i].getType()) == IResource.FILE)) {
- // IFile tf1 = (IFile)res1[i];
- // IFile tf2 = (IFile)res2[i];
- // res = compareFiles(tf1, tf2);
- //}
+ if (res && ((IResource.FILE & res1[i].getType()) == IResource.FILE)) {
+ IFile tf1 = (IFile)res1[i];
+ IFile tf2 = (IFile)res2[i];
+ res = compareFiles(tf1, tf2, assertFlag);
+ }
}
return res;
}
14 years
JBoss Tools SVN: r26986 - in trunk/cdi: tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-11-26 11:53:55 -0500 (Fri, 26 Nov 2010)
New Revision: 26986
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/DisposerOk.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/LocalInt.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/TestInt.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7733 CDI validator for EJB business method is not aware of @LocalBean annotation. - Fixed.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-11-26 15:58:21 UTC (rev 26985)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-11-26 16:53:55 UTC (rev 26986)
@@ -57,6 +57,7 @@
public String STATELESS_ANNOTATION_TYPE_NAME = "javax.ejb.Stateless";
public String SINGLETON_ANNOTATION_TYPE_NAME = "javax.ejb.Singleton";
public String LOCAL_ANNOTATION_TYPE_NAME = "javax.ejb.Local";
+ public String LOCAL_BEAN_ANNOTATION_TYPE_NAME = "javax.ejb.LocalBean";
public String RESOURCE_ANNOTATION_TYPE_NAME = "javax.annotation.Resource";
public String WEB_SERVICE_REF_ANNOTATION_TYPE_NAME = "javax.xml.ws.WebServiceRef";
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-11-26 15:58:21 UTC (rev 26985)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-11-26 16:53:55 UTC (rev 26986)
@@ -12,6 +12,7 @@
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -415,12 +416,14 @@
}
/**
- * Returns the @Local interface for the session bean if it is defined.
+ * Returns the set of interfaces annotated @Local for the session bean.
+ * Returns an empty set if there is no such interfaces or if the bean class (or any supper class) annotated @LocalBean.
*
* @param bean
* @return
*/
- public static IType getLocalInterfaceForBean(ISessionBean bean) {
+ public static Set<IType> getLocalInterfaces(ISessionBean bean) {
+ Set<IType> sourceTypes = new HashSet<IType>();
try {
Set<IParametedType> types = bean.getLegalTypes();
for (IParametedType type : types) {
@@ -428,22 +431,27 @@
if (sourceType == null) {
continue;
}
- if(!sourceType.isInterface()) {
- continue;
+ // Check if the class annotated @LocalBean
+ IAnnotation[] annotations = sourceType.getAnnotations();
+ for (IAnnotation annotation : annotations) {
+ if(CDIConstants.LOCAL_BEAN_ANNOTATION_TYPE_NAME.equals(annotation.getElementName()) || "LocalBean".equals(annotation.getElementName())) {
+ return Collections.emptySet();
+ }
}
- IAnnotation annotation = sourceType.getAnnotation(CDIConstants.LOCAL_ANNOTATION_TYPE_NAME);
- if (annotation == null) {
- annotation = sourceType.getAnnotation("Local"); //$NON-NLS-N1
+ if(sourceType.isInterface()) {
+ IAnnotation annotation = sourceType.getAnnotation(CDIConstants.LOCAL_ANNOTATION_TYPE_NAME);
+ if (annotation == null) {
+ annotation = sourceType.getAnnotation("Local"); //$NON-NLS-N1
+ }
+ if (annotation != null && CDIConstants.LOCAL_ANNOTATION_TYPE_NAME.equals(EclipseJavaUtil.resolveType(sourceType, "Local"))) { //$NON-NLS-N1
+ sourceTypes.add(sourceType);
+ }
}
- if (annotation != null && CDIConstants.LOCAL_ANNOTATION_TYPE_NAME.equals(EclipseJavaUtil.resolveType(sourceType, "Local"))) { //$NON-NLS-N1
- return sourceType;
- }
}
- return null;
} catch (JavaModelException e) {
CDICorePlugin.getDefault().logError(e);
}
- return null;
+ return sourceTypes;
}
/**
@@ -460,21 +468,23 @@
int flags = method.getMethod().getFlags();
if(Flags.isStatic(flags)) {
return method.getMethod();
- } else if (!Flags.isFinal(flags) && Flags.isPublic(flags) && !method.getMethod().getElementName().startsWith("ejb")) {
+ } else if (!Flags.isFinal(flags) && Flags.isPublic(flags)) {
if(bean.getAnnotation(CDIConstants.SINGLETON_ANNOTATION_TYPE_NAME)!=null) {
return method.getMethod();
}
- IType sourceType = getLocalInterfaceForBean(bean);
- if(sourceType!=null) {
+ Set<IType> sourceTypes = getLocalInterfaces(bean);
+ if(sourceTypes.isEmpty()) {
+ return method.getMethod();
+ }
+ for (IType sourceType : sourceTypes) {
IMethod[] methods = sourceType.getMethods();
for (IMethod iMethod : methods) {
if (method.getMethod().isSimilar(iMethod)) {
return iMethod;
}
}
- return null;
}
- return method.getMethod();
+ return null;
}
} catch (JavaModelException e) {
CDICorePlugin.getDefault().logError(e);
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/DisposerOk.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/DisposerOk.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/DisposerOk.java 2010-11-26 16:53:55 UTC (rev 26986)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.disposers;
+
+import javax.ejb.LocalBean;
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+@Stateful
+@LocalBean
+public class DisposerOk implements LocalInt {
+ @PersistenceContext EntityManager em;
+
+ @Produces
+ public EntityManager retrieveEntityManager() {
+ return em;
+ }
+
+ public void disposeEntityManager(@Disposes EntityManager em) {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/DisposerOk.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/LocalInt.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/LocalInt.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/LocalInt.java 2010-11-26 16:53:55 UTC (rev 26986)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.disposers;
+
+import javax.ejb.Local;
+
+@Local
+public interface LocalInt {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/LocalInt.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java 2010-11-26 16:53:55 UTC (rev 26986)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.disposers;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+@Stateful
+public class NotBusinessMethod_Broken implements LocalInt {
+ @PersistenceContext EntityManager em;
+
+ @Produces
+ public EntityManager retrieveEntityManager() {
+ return em;
+ }
+
+ public void disposeEntityManager(@Disposes EntityManager em) {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/TestInt.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/TestInt.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/TestInt.java 2010-11-26 16:53:55 UTC (rev 26986)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.disposers;
+
+public interface TestInt {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/disposers/TestInt.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2010-11-26 15:58:21 UTC (rev 26985)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2010-11-26 16:53:55 UTC (rev 26986)
@@ -533,6 +533,33 @@
/**
* 3.3.2. Declaring a producer method
+ * - non-static method of a session bean class is annotated @Produces, and the method is not a business method of the session bean
+ * See https://jira.jboss.org/browse/JBIDE-7733
+ *
+ * @throws Exception
+ */
+ public void testProducerMethodOnLocalBeanMustBeBusinessMethodBroken() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java");
+ String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new String[]{"retrieveEntityManager", "NotBusinessMethod_Broken"});
+ assertMarkerIsCreated(file, bindedErrorMessage, 13);
+ }
+
+ /**
+ * 3.3.2. Declaring a producer method
+ * - non-static method of a session bean class is annotated @Produces, and the method is not a business method of the session bean
+ * Checking @LocalBean
+ * See https://jira.jboss.org/browse/JBIDE-7733
+ *
+ * @throws Exception
+ */
+ public void testProducerMethodOnLocalBeanMustBeBusinessMethodOk() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/DisposerOk.java");
+ String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new String[]{"retrieveEntityManager", "DisposerOk"});
+ assertMarkerIsNotCreated(file, bindedErrorMessage, 15);
+ }
+
+ /**
+ * 3.3.2. Declaring a producer method
* - decorator has a method annotated @Produces
*
* @throws Exception
@@ -649,6 +676,33 @@
/**
* 3.3.6. Declaring a disposer method
+ * - a non-static method of a session bean class has a parameter annotated @Disposes, and the method is not a business method of the session bean
+ * See https://jira.jboss.org/browse/JBIDE-7733
+ *
+ * @throws Exception
+ */
+ public void testDisposalMethodOnLocalBeanMustBeBusinessMethodBroken() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java");
+ String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new String[]{"disposeEntityManager", "NotBusinessMethod_Broken"});
+ assertMarkerIsCreated(file, bindedErrorMessage, 18);
+ }
+
+ /**
+ * 3.3.6. Declaring a disposer method
+ * - a non-static method of a session bean class has a parameter annotated @Disposes, and the method is not a business method of the session bean
+ * Checking @LocalBean
+ * See https://jira.jboss.org/browse/JBIDE-7733
+ *
+ * @throws Exception
+ */
+ public void testDisposalMethodOnLocalBeanMustBeBusinessMethodOk() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/DisposerOk.java");
+ String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new String[]{"disposeEntityManager", "DisposerOk"});
+ assertMarkerIsNotCreated(file, bindedErrorMessage, 20);
+ }
+
+ /**
+ * 3.3.6. Declaring a disposer method
* - decorators may not declare disposer methods
*
* @throws Exception
14 years
JBoss Tools SVN: r26984 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-11-26 10:50:45 -0500 (Fri, 26 Nov 2010)
New Revision: 26984
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
JBIDE-7561
https://jira.jboss.org/browse/JBIDE-7561
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java 2010-11-26 15:50:45 UTC (rev 26984)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.test;
+
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+
+import junit.framework.TestCase;
+
+public class JSFPaletteTest extends TestCase {
+
+ public void testJSFPalette() {
+ XModel model = PreferenceModelUtilities.getPreferenceModel();
+ assertNotNull("Cannot find preference model.", model);
+
+ XModelObject palette = model.getRoot("Palette");
+ assertNotNull("Cannot find Palette model object.", palette);
+
+ XModelObject jsfTab = palette.getChildByPath("JSF");
+ assertNotNull("Cannot find JSF Palette model object.", jsfTab);
+
+ XModelObject htmlGroup = jsfTab.getChildByPath("HTML");
+ assertNotNull("Cannot find JSF HTML Group model object.", htmlGroup);
+ String htmlGroupHiffen = htmlGroup.getAttributeValue("hidden");
+ assertEquals("JSF HTML Group should not be hidden", "no", htmlGroupHiffen);
+
+ XModelObject coreGroup = jsfTab.getChildByPath("Core");
+ assertNotNull("Cannot find JSF Core Group model object.", coreGroup);
+ String coreGroupHiffen = coreGroup.getAttributeValue("hidden");
+ assertEquals("JSF Core Group should be hidden", "yes", coreGroupHiffen);
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-11-26 15:47:00 UTC (rev 26983)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-11-26 15:50:45 UTC (rev 26984)
@@ -41,6 +41,7 @@
old.addTestSuite(JSFModelTest.class);
old.addTestSuite(ModelFormat_2_0_0_Test.class);
old.addTestSuite(JSFBeansTest.class);
+ suite.addTestSuite(JSFPaletteTest.class);
suite.addTest(new ProjectImportTestSetup(old,
"org.jboss.tools.jsf.test", "projects/JSFKickStartOldFormat", //$NON-NLS-1$ //$NON-NLS-2$
"JSFKickStartOldFormat")); //$NON-NLS-1$
14 years
JBoss Tools SVN: r26983 - trunk/common/plugins/org.jboss.tools.common.ui.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-11-26 10:47:00 -0500 (Fri, 26 Nov 2010)
New Revision: 26983
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
Log:
https://jira.jboss.org/browse/JBIDE-6083
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties 2010-11-26 15:44:07 UTC (rev 26982)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties 2010-11-26 15:47:00 UTC (rev 26983)
@@ -1,5 +1,5 @@
#Properties file for org.jboss.tools.common.ui
Bundle-Vendor.0 = JBoss by Red Hat
Bundle-Name.0 = JBoss Tools Common UI Plug-in
-command.newEditor.sidebyside.description = Open New Editor Side By Side for Active Editor
-command.newEditor.sidebyside.name = New Editor (Side By Side)
+command.newEditor.sidebyside.name=New Editor (Side by Side)
+command.newEditor.sidebyside.description=Open New Editor Side by Side to active Editor
14 years
JBoss Tools SVN: r26982 - in trunk/common/plugins: org.jboss.tools.common.ui/META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-11-26 10:44:07 -0500 (Fri, 26 Nov 2010)
New Revision: 26982
Added:
trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/commands/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/commands/sidebyside/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/commands/sidebyside/SideBySideHandler.java
Removed:
trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/src/org/jboss/tools/common/ui/sidebyside/handlers/SideBySideHandler.java
Modified:
trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/plugin.xml
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.ui/build.properties
trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
Log:
https://jira.jboss.org/browse/JBIDE-6083
Modified: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2010-11-26 15:37:40 UTC (rev 26981)
+++ trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2010-11-26 15:44:07 UTC (rev 26982)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.jboss.tools.common.ui
+Bundle-SymbolicName: org.jboss.tools.common.ui;singleton:=true
Bundle-Version: 3.2.0.qualifier
Require-Bundle: org.eclipse.osgi,
org.jboss.tools.common,
Modified: trunk/common/plugins/org.jboss.tools.common.ui/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/build.properties 2010-11-26 15:37:40 UTC (rev 26981)
+++ trunk/common/plugins/org.jboss.tools.common.ui/build.properties 2010-11-26 15:44:07 UTC (rev 26982)
@@ -2,4 +2,5 @@
bin.includes = META-INF/,\
plugin.properties,\
.,\
- about.html
+ about.html,\
+ plugin.xml
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties 2010-11-26 15:37:40 UTC (rev 26981)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties 2010-11-26 15:44:07 UTC (rev 26982)
@@ -1,3 +1,5 @@
#Properties file for org.jboss.tools.common.ui
Bundle-Vendor.0 = JBoss by Red Hat
-Bundle-Name.0 = JBoss Tools Common UI Plug-in
\ No newline at end of file
+Bundle-Name.0 = JBoss Tools Common UI Plug-in
+command.newEditor.sidebyside.description = Open New Editor Side By Side for Active Editor
+command.newEditor.sidebyside.name = New Editor (Side By Side)
Added: trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2010-11-26 15:44:07 UTC (rev 26982)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="%command.newEditor.sidebyside.description"
+ name="%command.newEditor.sidebyside.name"
+ categoryId="org.eclipse.ui.category.window"
+ id="org.jboss.tools.sidebyside.newEditor">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.jboss.tools.sidebyside.newEditor"
+ class="org.jboss.tools.common.ui.commands.sidebyside.SideBySideHandler">
+ <enabledWhen>
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.ui.IEditorPart">
+ </instanceof>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.jboss.tools.sidebyside.newEditor"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+8"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </key>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:window?after=newEditor">
+ <command
+ label="%command.newEditor.sidebyside.name"
+ commandId="org.jboss.tools.sidebyside.newEditor"
+ mnemonic="S"
+ id="org.jboss.tools.sidebyside.menus.newEditor">
+ </command>
+ </menuContribution>
+ </extension>
+</plugin>
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/commands/sidebyside/SideBySideHandler.java (from rev 26976, trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/src/org/jboss/tools/common/ui/sidebyside/handlers/SideBySideHandler.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/commands/sidebyside/SideBySideHandler.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/commands/sidebyside/SideBySideHandler.java 2010-11-26 15:44:07 UTC (rev 26982)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.ui.commands.sidebyside;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.EditorSashContainer;
+import org.eclipse.ui.internal.EditorStack;
+import org.eclipse.ui.internal.ILayoutContainer;
+import org.eclipse.ui.internal.LayoutPart;
+import org.eclipse.ui.internal.PartPane;
+import org.eclipse.ui.internal.PartSashContainer;
+import org.eclipse.ui.internal.PartSite;
+import org.eclipse.ui.internal.PartStack;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.internal.handlers.NewEditorHandler;
+
+/**
+ * Handler which split active editor vertically
+ * @see https://jira.jboss.org/browse/JBIDE-6083
+ * @author mareshkau
+ */
+public class SideBySideHandler extends NewEditorHandler {
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ splitEditorArea();
+ return null;
+ }
+
+ private void splitEditorArea() {
+ IWorkbenchPage workbenchPage = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ IWorkbenchPart part = workbenchPage.getActivePart();
+ PartPane partPane = ((PartSite) part.getSite()).getPane();
+ LayoutPart layoutPart = partPane.getPart();
+
+ // Get PartPane that correspond to the active editor
+ PartPane currentEditorPartPane = ((PartSite) workbenchPage
+ .getActiveEditor().getSite()).getPane();
+ EditorSashContainer editorSashContainer = null;
+ ILayoutContainer rootLayoutContainer = layoutPart.getContainer();
+ if (rootLayoutContainer instanceof LayoutPart) {
+ ILayoutContainer editorSashLayoutContainer = ((LayoutPart) rootLayoutContainer)
+ .getContainer();
+ if (editorSashLayoutContainer instanceof EditorSashContainer) {
+ editorSashContainer = ((EditorSashContainer) editorSashLayoutContainer);
+ }
+ }
+ /*
+ * Create a new part stack (i.e. a workbook) to home the
+ * currentEditorPartPane which hold the active editor
+ */
+ PartStack newPart = createStack(editorSashContainer);
+
+ editorSashContainer.stack(currentEditorPartPane, newPart);
+ if (rootLayoutContainer instanceof LayoutPart) {
+ ILayoutContainer cont = ((LayoutPart) rootLayoutContainer)
+ .getContainer();
+ if (cont instanceof PartSashContainer) {
+ // "Split" the editor area by adding the new part
+ ((PartSashContainer) cont).add(newPart);
+ }
+ }
+ }
+
+ /**
+ * A method to create a part stack container (a new workbook)
+ *
+ * @param editorSashContainer
+ * the <code>EditorSashContainer</code> to set for the returned
+ * <code>PartStack</code>
+ * @return a new part stack container
+ */
+ private PartStack createStack(EditorSashContainer editorSashContainer) {
+ WorkbenchPage workbenchPage = (WorkbenchPage) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ EditorStack newWorkbook = EditorStack.newEditorWorkbook(
+ editorSashContainer, workbenchPage);
+ return newWorkbook;
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/commands/sidebyside/SideBySideHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/plugin.xml 2010-11-26 15:37:40 UTC (rev 26981)
+++ trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/plugin.xml 2010-11-26 15:44:07 UTC (rev 26982)
@@ -14,7 +14,7 @@
point="org.eclipse.ui.handlers">
<handler
commandId="org.jboss.tools.sidebyside.newEditor"
- class="org.jboss.tools.common.ui.sidebyside.handlers.SideBySideHandler">
+ class="org.jboss.tools.common.ui.commands.sidebyside.SideBySideHandler">
<enabledWhen>
<with
variable="activeEditor">
Deleted: trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/src/org/jboss/tools/common/ui/sidebyside/handlers/SideBySideHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/src/org/jboss/tools/common/ui/sidebyside/handlers/SideBySideHandler.java 2010-11-26 15:37:40 UTC (rev 26981)
+++ trunk/common/plugins/org.jboss.tools.common.ui.sidebyside/src/org/jboss/tools/common/ui/sidebyside/handlers/SideBySideHandler.java 2010-11-26 15:44:07 UTC (rev 26982)
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2010 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.ui.sidebyside.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.EditorSashContainer;
-import org.eclipse.ui.internal.EditorStack;
-import org.eclipse.ui.internal.ILayoutContainer;
-import org.eclipse.ui.internal.LayoutPart;
-import org.eclipse.ui.internal.PartPane;
-import org.eclipse.ui.internal.PartSashContainer;
-import org.eclipse.ui.internal.PartSite;
-import org.eclipse.ui.internal.PartStack;
-import org.eclipse.ui.internal.WorkbenchPage;
-import org.eclipse.ui.internal.handlers.NewEditorHandler;
-
-/**
- * Handler which split active editor vertically
- * @see https://jira.jboss.org/browse/JBIDE-6083
- * @author mareshkau
- */
-public class SideBySideHandler extends NewEditorHandler {
-
- /**
- * the command has been executed, so extract extract the needed information
- * from the application context.
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- super.execute(event);
- splitEditorArea();
- return null;
- }
-
- private void splitEditorArea() {
- IWorkbenchPage workbenchPage = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- IWorkbenchPart part = workbenchPage.getActivePart();
- PartPane partPane = ((PartSite) part.getSite()).getPane();
- LayoutPart layoutPart = partPane.getPart();
-
- // Get PartPane that correspond to the active editor
- PartPane currentEditorPartPane = ((PartSite) workbenchPage
- .getActiveEditor().getSite()).getPane();
- EditorSashContainer editorSashContainer = null;
- ILayoutContainer rootLayoutContainer = layoutPart.getContainer();
- if (rootLayoutContainer instanceof LayoutPart) {
- ILayoutContainer editorSashLayoutContainer = ((LayoutPart) rootLayoutContainer)
- .getContainer();
- if (editorSashLayoutContainer instanceof EditorSashContainer) {
- editorSashContainer = ((EditorSashContainer) editorSashLayoutContainer);
- }
- }
- /*
- * Create a new part stack (i.e. a workbook) to home the
- * currentEditorPartPane which hold the active editor
- */
- PartStack newPart = createStack(editorSashContainer);
-
- editorSashContainer.stack(currentEditorPartPane, newPart);
- if (rootLayoutContainer instanceof LayoutPart) {
- ILayoutContainer cont = ((LayoutPart) rootLayoutContainer)
- .getContainer();
- if (cont instanceof PartSashContainer) {
- // "Split" the editor area by adding the new part
- ((PartSashContainer) cont).add(newPart);
- }
- }
- }
-
- /**
- * A method to create a part stack container (a new workbook)
- *
- * @param editorSashContainer
- * the <code>EditorSashContainer</code> to set for the returned
- * <code>PartStack</code>
- * @return a new part stack container
- */
- private PartStack createStack(EditorSashContainer editorSashContainer) {
- WorkbenchPage workbenchPage = (WorkbenchPage) PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- EditorStack newWorkbook = EditorStack.newEditorWorkbook(
- editorSashContainer, workbenchPage);
- return newWorkbook;
- }
-}
14 years
JBoss Tools SVN: r26981 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-26 10:37:40 -0500 (Fri, 26 Nov 2010)
New Revision: 26981
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
Log:
[JBIDE-7731] extracted password storage to its own class (removed duplicate code in EditCloudConnectionWizard, NewCloudConnectionWizard and DeltaCloud)
[JBIDE-7694] removed duplicate loadImage(id) / getImage(id) methods
[JBIDE-7694] corrected lazy initialisation (to signal correctly that no instances had been loaded so far)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-11-26 15:36:30 UTC (rev 26980)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-11-26 15:37:40 UTC (rev 26981)
@@ -1,3 +1,27 @@
+2010-11-26 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java:
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java:
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java:
+ (editCloud):
+ (getPassword):
+ (createClient):
+ (dispose):
+ (loadImage):
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java (removeCloud):
+ [JBIDE-7731] extracted password storage to its own class (removed duplicate code in EditCloudConnectionWizard, NewCloudConnectionWizard and DeltaCloud)
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java:
+ (loadImage):
+ [JBIDE-7694] removed duplicate loadImage(id) / getImage(id) methods
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java
+ (images):
+ (instances)
+ (getImages):
+ (getInstances):
+ (loadImages):
+ (loadInstances):
+ [JBIDE-7694] corrected lazy initialisation (to signal correctly that no instances had been loaded so far)
+
2010-11-25 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java:
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-11-26 15:36:30 UTC (rev 26980)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-11-26 15:37:40 UTC (rev 26981)
@@ -22,10 +22,6 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.security.storage.EncodingUtils;
-import org.eclipse.equinox.security.storage.ISecurePreferences;
-import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
-import org.eclipse.equinox.security.storage.StorageException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudAuthException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl;
@@ -54,8 +50,8 @@
private InternalDeltaCloudClient client;
- private DeltaCloudImagesRepository images = new DeltaCloudImagesRepository();
- private DeltaCloudInstancesRepository instances = new DeltaCloudInstancesRepository();
+ private DeltaCloudImagesRepository images;
+ private DeltaCloudInstancesRepository instances;
private IImageFilter imageFilter;
private IInstanceFilter instanceFilter;
@@ -63,10 +59,10 @@
private Map<String, Job> actionJobs;
private Object actionLock = new Object();
- // TODO: switch to readwrite lock
ListenerList instanceListeners = new ListenerList();
ListenerList imageListeners = new ListenerList();
+ private SecurePasswordStore passwordStore;
public static interface IInstanceStateMatcher {
public boolean matchesState(DeltaCloudInstance instance, String instanceState);
@@ -92,8 +88,8 @@
this.name = name;
this.username = username;
this.type = type;
- storePassword(name, username, password);
- this.client = createClient(name, url, username, password);
+ this.passwordStore = new SecurePasswordStore(new DeltaCloudPasswordStorageKey(name, username), password);
+ this.client = createClient(name, url, username, passwordStore.getPassword());
imageFilter = createImageFilter(imageFilterRules);
instanceFilter = createInstanceFilter(instanceFilterRules);
}
@@ -104,69 +100,20 @@
this.name = name;
this.username = username;
this.type = type;
- removePassword(name, username);
- storePassword(name, username, password);
- client = createClient(name, url, username, password);
+ this.passwordStore.update(new DeltaCloudPasswordStorageKey(name, username), password);
+ client = createClient(name, url, username, passwordStore.getPassword());
loadChildren();
}
private InternalDeltaCloudClient createClient(String name, String url, String username, String password)
throws DeltaCloudException {
try {
- if (password == null) {
- password = getPasswordFromPreferences(name, username);
- }
return new DeltaCloudClientImpl(url, username, password);
} catch (MalformedURLException e) {
throw new DeltaCloudException(MessageFormat.format("Could not access cloud at {0}", url), e);
- } catch (StorageException e) {
- throw new DeltaCloudException(MessageFormat.format(
- "Could not get password for user {0} on cloud at {1} in the preferences", username, url), e);
}
}
- private String getPasswordFromPreferences(String cloudName, String username) throws StorageException {
- String key = getPreferencesKey(cloudName, username); // $NON-NLS-1$
- ISecurePreferences root = SecurePreferencesFactory.getDefault();
- ISecurePreferences node = root.node(key);
- String password = node.get("password", null); //$NON-NLS-1$
- return password;
- }
-
- private void storePassword(String cloudName, String username, String passwd) throws DeltaCloudException {
- if (passwd != null) {
- ISecurePreferences root = SecurePreferencesFactory.getDefault();
- String key = getPreferencesKey(cloudName, username);
- ISecurePreferences node = root.node(key);
- try {
- node.put("password", passwd, true /* encrypt */); //$NON-NLS-1$
- } catch (StorageException e) {
- // TODO: internationalize string
- throw new DeltaCloudException("Could not store password", e);
- }
- }
- }
-
- public void removePassword(String cloudName, String userName) throws DeltaCloudException {
- String key = getPreferencesKey(cloudName, userName);
- ISecurePreferences root = SecurePreferencesFactory.getDefault();
- ISecurePreferences node = root.node(key);
- if (node == null) {
- throw new DeltaCloudException(MessageFormat.format(
- "Could not remove password for cloud {0} from secure preferences store", cloudName));
- }
- node.clear();
- }
-
- public static String getPreferencesKey(String cloudName, String username) {
- String key = new StringBuilder("/org/jboss/tools/deltacloud/core/") //$NON-NLS-1$
- .append(cloudName)
- .append('/') //$NON-NLS-1$
- .append(username)
- .toString();
- return EncodingUtils.encodeSlashes(key);
- }
-
public String getName() {
return name;
}
@@ -179,6 +126,10 @@
return username;
}
+ public String getPassword() throws DeltaCloudException {
+ return passwordStore.getPassword();
+ }
+
public String getType() {
return type;
}
@@ -257,6 +208,13 @@
return imageFilter;
}
+ /**
+ * Loads all children of this delta cloud instance (regardless if things
+ * have already been loaded before). Catched and collects individual errors
+ * that may occur and throws a multi exception.
+ *
+ * @throws DeltaCloudException
+ */
public void loadChildren() throws DeltaCloudException {
DeltaCloudMultiException multiException = new DeltaCloudMultiException(MessageFormat.format(
"Could not load children of cloud {0}", getName()));
@@ -307,14 +265,6 @@
imageListeners.remove(listener);
}
- private DeltaCloudInstance[] cloneInstancesArray() {
- return instances.get();
- }
-
- private DeltaCloudImage[] cloneImagesArray() {
- return images.get();
- }
-
private DeltaCloudImage[] notifyImageListListeners(DeltaCloudImage[] array) {
Object[] listeners = imageListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
@@ -397,9 +347,12 @@
*
* @see #notifyInstanceListListeners(DeltaCloudInstance[])
*/
- public DeltaCloudInstance[] loadInstances() throws DeltaCloudException {
+ private DeltaCloudInstance[] loadInstances() throws DeltaCloudException {
try {
clearInstances();
+ if (instances == null) {
+ instances = new DeltaCloudInstancesRepository();
+ }
instances.add(client.listInstances(), this);
// TODO: remove notification with all instances, replace by
// notifying the changed instance
@@ -411,28 +364,31 @@
}
private void clearInstances() {
- instances.clear();
- notifyInstanceListListeners(instances.get());
+ if (instances != null) {
+ instances.clear();
+ notifyInstanceListListeners(instances.get());
+ }
}
private void clearImages() {
- images.clear();
- notifyImageListListeners(images.get());
+ if (images != null) {
+ images.clear();
+ notifyImageListListeners(images.get());
+ }
}
public DeltaCloudInstance[] getInstances() throws DeltaCloudException {
if (instances == null) {
- instances = new DeltaCloudInstancesRepository();
return loadInstances();
}
- return cloneInstancesArray();
+ return instances.get();
}
public DeltaCloudImage[] getImages() throws DeltaCloudException {
if (images == null) {
return loadImages();
}
- return cloneImagesArray();
+ return images.get();
}
public void createKey(String keyname, String keystoreLocation) throws DeltaCloudException {
@@ -538,15 +494,6 @@
return profileArray;
}
- public DeltaCloudImage loadImage(String imageId) throws DeltaCloudException {
- try {
- Image image = client.listImages(imageId);
- return images.add(image, this);
- } catch (DeltaCloudClientException e) {
- throw new DeltaCloudException(e);
- }
- }
-
/**
* Loads the available images from the server and stores them locally.
* Furthermore listeners get informed.
@@ -556,9 +503,12 @@
*
* @see #notifyImageListListeners(DeltaCloudImage[])
*/
- public DeltaCloudImage[] loadImages() throws DeltaCloudException {
+ private DeltaCloudImage[] loadImages() throws DeltaCloudException {
try {
clearImages();
+ if (images == null) {
+ images = new DeltaCloudImagesRepository();
+ }
images.add(client.listImages(), this);
return notifyImageListListeners(images.get());
} catch (DeltaCloudClientException e) {
@@ -568,19 +518,15 @@
}
- public DeltaCloudImage getImage(String imageId) {
- DeltaCloudImage deltaCloudImage = null;
+ public DeltaCloudImage loadImage(String imageId) throws DeltaCloudException {
try {
Image image = client.listImages(imageId);
- deltaCloudImage = new DeltaCloudImage(image, this);
- } catch (Exception e) {
- // TODO: implement proper logging / error reporting / ignore
- e.printStackTrace();
- // do nothing and return null
+ return images.add(image, this);
+ } catch (DeltaCloudClientException e) {
+ throw new DeltaCloudException(e);
}
- return deltaCloudImage;
}
-
+
public boolean testConnection() throws DeltaCloudException {
String instanceId = "nonexistingInstance"; //$NON-NLS-1$
try {
@@ -630,4 +576,8 @@
}
return null;
}
+
+ public void dispose() throws DeltaCloudException {
+ passwordStore.remove();
+ }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-11-26 15:36:30 UTC (rev 26980)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-11-26 15:37:40 UTC (rev 26981)
@@ -194,7 +194,7 @@
public void removeCloud(DeltaCloud d) throws DeltaCloudException {
doGetClouds().remove(d);
- d.removePassword(d.getName(), d.getName());
+ d.dispose();
saveClouds();
notifyListeners(ICloudManagerListener.REMOVE_EVENT);
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java 2010-11-26 15:37:40 UTC (rev 26981)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.deltacloud.core;
+
+import org.eclipse.equinox.security.storage.EncodingUtils;
+import org.jboss.tools.deltacloud.core.SecurePasswordStore.IStorageKey;
+
+/**
+ * Implements a key to be used to store keywords with.
+ *
+ * @author Andre Dietisheim
+ *
+ */
+public class DeltaCloudPasswordStorageKey implements IStorageKey {
+
+ private static final String PREFERNCES_BASEKEY = Activator.PLUGIN_ID.replace('.', '/');
+ private String cloudName;
+ private String userName;
+
+ public DeltaCloudPasswordStorageKey(String cloudName, String userName) {
+ this.userName = userName;
+ this.cloudName = cloudName;
+ }
+
+ @Override
+ public String getKey() {
+ String key = new StringBuilder(PREFERNCES_BASEKEY)
+ .append(cloudName)
+ .append('/') //$NON-NLS-1$
+ .append(userName)
+ .toString();
+ return EncodingUtils.encodeSlashes(key);
+ }
+
+ @Override
+ public boolean equals(IStorageKey key) {
+ if (!key.getClass().isAssignableFrom(DeltaCloudPasswordStorageKey.class)) {
+ return false;
+ }
+ DeltaCloudPasswordStorageKey deltaCloudKey = (DeltaCloudPasswordStorageKey) key;
+ return userName.equals(deltaCloudKey.userName)
+ && cloudName.equals(deltaCloudKey.cloudName);
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java 2010-11-26 15:37:40 UTC (rev 26981)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.deltacloud.core;
+
+import org.eclipse.equinox.security.storage.ISecurePreferences;
+import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
+import org.eclipse.equinox.security.storage.StorageException;
+
+/**
+ * @author Andre Dietisheim
+ *
+ * TODO: remove DeltaCloudException
+ */
+public class SecurePasswordStore {
+
+ public static interface IStorageKey {
+ public String getKey();
+
+ public boolean equals(IStorageKey key);
+ }
+
+ private String password;
+ private boolean stored;
+ private IStorageKey storageKey;
+
+ public SecurePasswordStore(IStorageKey key, String password) {
+ this.storageKey = key;
+ this.password = password;
+ }
+
+ public String getPassword() throws DeltaCloudException {
+ if (password != null) {
+ if (!stored) {
+ storeInPreferences(password, storageKey);
+ stored = true;
+ }
+ return password;
+ } else {
+ try {
+ return this.password = getFromPreferences(storageKey);
+ } catch (StorageException e) {
+ throw new DeltaCloudException("Could get password", e);
+ }
+ }
+ }
+
+ public void update(IStorageKey key, String password) throws DeltaCloudException {
+ if (!storageKey.equals(key)
+ || hasPasswordChanged(password)) {
+ storeInPreferences(this.password = password, this.storageKey = key);
+ }
+ }
+
+ private boolean hasPasswordChanged(String password) {
+ if (this.password == null && password == null) {
+ return false;
+ } else {
+ return (this.password == null && password != null)
+ || (this.password != null && password == null)
+ || !password.equals(this.password);
+ }
+ }
+
+ public void remove() throws DeltaCloudException {
+ ISecurePreferences node = getNode(storageKey);
+ if (node == null) {
+ throw new DeltaCloudException("Could not remove password");
+ }
+ node.clear();
+ }
+
+ private String getFromPreferences(IStorageKey key) throws StorageException {
+ ISecurePreferences node = getNode(key);
+ String password = node.get("password", null); //$NON-NLS-1$
+ return password;
+ }
+
+ private void storeInPreferences(String password, IStorageKey key) throws DeltaCloudException {
+ try {
+ ISecurePreferences node = getNode(key);
+ node.put("password", password, true /* encrypt */); //$NON-NLS-1$
+ } catch (StorageException e) {
+ // TODO: internationalize string
+ throw new DeltaCloudException("Could not store password", e);
+ }
+ }
+
+ private ISecurePreferences getNode(IStorageKey key) {
+ ISecurePreferences root = SecurePreferencesFactory.getDefault();
+ return root.node(key.getKey());
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r26980 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-26 10:36:30 -0500 (Fri, 26 Nov 2010)
New Revision: 26980
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7731] extracted password storage to its own class (removed duplicate code in EditCloudConnectionWizard, NewCloudConnectionWizard and DeltaCloud)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-26 15:36:11 UTC (rev 26979)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-26 15:36:30 UTC (rev 26980)
@@ -1,3 +1,10 @@
+2010-11-26 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java (addPages):
+ [JBIDE-7731] extracted password storage to its own class (removed duplicate code in EditCloudConnectionWizard, NewCloudConnectionWizard and DeltaCloud)
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (.modifyText):
+ [JBIDE-7628] cleanup, added null-check
+
2010-11-25 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java (performTest):
14 years
JBoss Tools SVN: r26979 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-26 10:36:11 -0500 (Fri, 26 Nov 2010)
New Revision: 26979
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
Log:
[JBIDE-7731] extracted password storage to its own class (removed duplicate code in EditCloudConnectionWizard, NewCloudConnectionWizard and DeltaCloud)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-11-26 15:35:39 UTC (rev 26978)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-11-26 15:36:11 UTC (rev 26979)
@@ -13,8 +13,6 @@
import java.net.MalformedURLException;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.security.storage.ISecurePreferences;
-import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
@@ -45,31 +43,23 @@
@Override
public void addPages() {
- String password = getPassword();
try {
+ String cloudName = cloud.getName();
+ String userName = cloud.getUsername();
+ String password = cloud.getPassword();
mainPage = new CloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME),
- cloud.getName(), cloud.getURL(), cloud.getUsername(), password,
- cloud.getType(), this);
+ cloudName, cloud.getURL(), userName, password, cloud.getType(), this);
addPage(mainPage);
} catch (MalformedURLException e) {
ErrorUtils.handleError(WizardMessages.getString("EditCloudConnectionError.title"),
WizardMessages.getString("EditCloudConnectionError.message"), e, getShell());
+ } catch (DeltaCloudException e) {
+ // TODO: internationalize strings
+ ErrorUtils.handleError("Error",
+ "Could not create wizard page", e, getShell());
}
}
- private String getPassword() {
- String password = "";
- String key = DeltaCloud.getPreferencesKey(cloud.getURL(), cloud.getUsername());
- ISecurePreferences root = SecurePreferencesFactory.getDefault();
- ISecurePreferences node = root.node(key);
- try {
- password = node.get("password", null); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.log(e);
- }
- return password;
- }
-
@Override
public boolean canFinish() {
return mainPage.isPageComplete();
@@ -119,10 +109,10 @@
if (type == null) {
return null;
}
-
+
return type.toString();
}
-
+
@Override
public boolean needsProgressMonitor() {
return true;
14 years