JBoss Tools SVN: r21335 - in branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2010-04-08 01:58:47 -0400 (Thu, 08 Apr 2010)
New Revision: 21335
Modified:
branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java
branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java
branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java
Log:
JBIDE-6079: to 3.1.x
Modified: branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-04-08 02:08:49 UTC (rev 21334)
+++ branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-04-08 05:58:47 UTC (rev 21335)
@@ -63,4 +63,4 @@
JBossWSGenerateWebXmlWizardPage_Project_Group=Dynamic Web Project Name
JBossWSGenerateWebXmlWizardPage_Project_Group_Tooltip=If no Dynamic Web Project exists, you must create one before creating your sample web service.
JBossWSGenerateWebXmlWizardPage_Web_Service_Group=Web Service
-JBossWSGenerateWizard_NoProjectSelected=No project selected. Please select a Dynamic Web Project to continue.
+Error_JBossWSGenerateWizard_NoProjectSelected=No correct project selected. Please select a Dynamic Web Project to continue.
Modified: branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
===================================================================
--- branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-04-08 02:08:49 UTC (rev 21334)
+++ branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-04-08 05:58:47 UTC (rev 21335)
@@ -101,7 +101,7 @@
public static String JBossWSGenerateWebXmlWizardPage_Web_Service_Group;
- public static String JBossWSGenerateWizard_NoProjectSelected;
+ public static String Error_JBossWSGenerateWizard_NoProjectSelected;
static {
NLS.initializeMessages(BUNDLE_NAME, JBossWSUIMessages.class);
Modified: branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java
===================================================================
--- branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java 2010-04-08 02:08:49 UTC (rev 21334)
+++ branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java 2010-04-08 05:58:47 UTC (rev 21335)
@@ -55,7 +55,7 @@
packageName.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- wizard.setClassName(packageName.getText());
+ wizard.setPackageName(packageName.getText());
setPageComplete(isPageComplete());
}
Modified: branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java
===================================================================
--- branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java 2010-04-08 02:08:49 UTC (rev 21334)
+++ branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java 2010-04-08 05:58:47 UTC (rev 21335)
@@ -150,7 +150,7 @@
if (firstPage != null && !firstPage.getControl().isDisposed()) {
if (firstPage.hasChanged())
firstPage
- .setErrorMessage(JBossWSUIMessages.JBossWSGenerateWizard_NoProjectSelected);
+ .setErrorMessage(JBossWSUIMessages.Error_JBossWSGenerateWizard_NoProjectSelected);
}
return false;
}
Modified: branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java
===================================================================
--- branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java 2010-04-08 02:08:49 UTC (rev 21334)
+++ branches/jbosstools-3.1.x/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java 2010-04-08 05:58:47 UTC (rev 21335)
@@ -21,6 +21,7 @@
import org.eclipse.jst.javaee.web.Servlet;
import org.eclipse.jst.javaee.web.ServletMapping;
import org.eclipse.jst.javaee.web.WebApp;
+import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
import org.jboss.tools.ws.core.utils.StatusUtils;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
@@ -28,54 +29,58 @@
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
public class JBossWSGenerateWizardValidator {
-
+
private static ServiceModel model;
private static ServletDescriptor[] descriptors;
-
+
private static String JAVA = ".java"; //$NON-NLS-1$
- public static void setServiceModel ( ServiceModel inModel ) {
+ public static void setServiceModel(ServiceModel inModel) {
model = inModel;
descriptors = new ServletDescriptor[model.getServiceClasses().size()];
- List<String> serviceClasses = model.getServiceClasses();
- for (int i = 0; i < serviceClasses.size(); i++) {
- descriptors[i] = getServletDescriptor(serviceClasses.get(i));
- }
+ List<String> serviceClasses = model.getServiceClasses();
+ for (int i = 0; i < serviceClasses.size(); i++) {
+ descriptors[i] = getServletDescriptor(serviceClasses.get(i));
+ }
}
public static IStatus isWSNameValid() {
+ IModelProvider provider = null;
if (model.getWebProjectName() == null) {
- return StatusUtils.errorStatus(JBossWSUIMessages.JBossWSGenerateWizard_NoProjectSelected);
- }
- else {
+ return StatusUtils
+ .errorStatus(JBossWSUIMessages.Error_JBossWSGenerateWizard_NoProjectSelected);
+ } else {
try {
- ModelProviderManager
- .getModelProvider(JBossWSCreationUtils.getProjectByName(model
- .getWebProjectName()));
- } catch (IllegalArgumentException iae) {
- // ignore
+ IProject project = JBossWSCreationUtils.getProjectByName(model
+ .getWebProjectName());
+ if (!JavaEEProjectUtilities.isDynamicWebProject(project)) {
+ throw new Exception();
+ }
+ provider = ModelProviderManager.getModelProvider(project);
+ } catch (Exception exc) {
model.setWebProjectName(null);
- return StatusUtils.errorStatus(JBossWSUIMessages.JBossWSGenerateWizard_NoProjectSelected);
+ return StatusUtils
+ .errorStatus(JBossWSUIMessages.Error_JBossWSGenerateWizard_NoProjectSelected);
}
+
}
- final IModelProvider provider = ModelProviderManager
- .getModelProvider(JBossWSCreationUtils.getProjectByName(model
- .getWebProjectName()));
Object object = provider.getModelObject();
if (object instanceof WebApp) {
WebApp webApp = (WebApp) object;
if (model != null) {
for (int i = 0; i < descriptors.length; i++) {
- if (descriptors[i].getName().trim().length() == 0 ) {
- return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ServiceName_Empty);
+ if (descriptors[i].getName().trim().length() == 0) {
+ return StatusUtils
+ .errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ServiceName_Empty);
}
List<?> theServlets = webApp.getServlets();
for (int j = 0; j < theServlets.size(); j++) {
- Servlet aServlet = (Servlet) theServlets
- .get(j);
- if (aServlet.getServletName().equals(descriptors[i].getName())) {
- return StatusUtils.errorStatus(JBossWSCreationCoreMessages.Error_JBossWS_GenerateWizard_WSName_Same);
+ Servlet aServlet = (Servlet) theServlets.get(j);
+ if (aServlet.getServletName().equals(
+ descriptors[i].getName())) {
+ return StatusUtils
+ .errorStatus(JBossWSCreationCoreMessages.Error_JBossWS_GenerateWizard_WSName_Same);
}
}
List<?> theServletMappings = webApp.getServletMappings();
@@ -84,10 +89,14 @@
.get(j);
List<?> urlPatterns = aServletMapping.getUrlPatterns();
for (int k = 0; k < urlPatterns.size(); k++) {
- UrlPatternType upt = (UrlPatternType) urlPatterns.get(k);
- if (aServletMapping.getServletName().equals(descriptors[i].getName()) ||
- upt.getValue().equals(descriptors[i].getMappings())) {
- return StatusUtils.errorStatus(JBossWSCreationCoreMessages.Error_JBossWS_GenerateWizard_WSName_Same);
+ UrlPatternType upt = (UrlPatternType) urlPatterns
+ .get(k);
+ if (aServletMapping.getServletName().equals(
+ descriptors[i].getName())
+ || upt.getValue().equals(
+ descriptors[i].getMappings())) {
+ return StatusUtils
+ .errorStatus(JBossWSCreationCoreMessages.Error_JBossWS_GenerateWizard_WSName_Same);
}
}
}
@@ -97,25 +106,26 @@
}
return null;
}
-
+
public static IStatus isWSClassValid(String className, IProject project) {
if (model.getCustomPackage().trim().length() == 0) {
// empty package name
- return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
- }
- else if (model.getCustomClassName().trim().length() == 0 ) {
+ return StatusUtils
+ .errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
+ } else if (model.getCustomClassName().trim().length() == 0) {
// empty class name
- return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
- }
- else if (project == null) {
- return StatusUtils.errorStatus(JBossWSUIMessages.JBossWSGenerateWizard_NoProjectSelected);
- }
- else {
- File file = findFileByPath(className + JAVA, project
- .getLocation().toOSString());
+ return StatusUtils
+ .errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
+ } else if (project == null) {
+ return StatusUtils
+ .errorStatus(JBossWSUIMessages.Error_JBossWSGenerateWizard_NoProjectSelected);
+ } else {
+ File file = findFileByPath(className + JAVA, project.getLocation()
+ .toOSString());
if (file != null) {
// class already exists
- return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
+ return StatusUtils
+ .errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
}
}
return null;
@@ -134,7 +144,8 @@
sd.setName(servletName);
sd.setDisplayName(sd.getName());
sd.setClassName(clsName);
- sd.setMappings(JBossWSCreationCoreMessages.Separator_Java + sd.getDisplayName());
+ sd.setMappings(JBossWSCreationCoreMessages.Separator_Java
+ + sd.getDisplayName());
return sd;
}
14 years, 9 months
JBoss Tools SVN: r21334 - in branches/modular_build: modeshape/releng/psfs and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-07 22:08:49 -0400 (Wed, 07 Apr 2010)
New Revision: 21334
Modified:
branches/modular_build/bpel/releng/psfs/test.common.subclipse.psf
branches/modular_build/bpel/releng/psfs/test.common.subversive.psf
branches/modular_build/modeshape/releng/psfs/test.common.subclipse.psf
branches/modular_build/modeshape/releng/psfs/test.common.subversive.psf
Log:
JBDS-486: org.jboss.tools.tests moved into plugins/
Modified: branches/modular_build/bpel/releng/psfs/test.common.subclipse.psf
===================================================================
--- branches/modular_build/bpel/releng/psfs/test.common.subclipse.psf 2010-04-08 02:07:40 UTC (rev 21333)
+++ branches/modular_build/bpel/releng/psfs/test.common.subclipse.psf 2010-04-08 02:08:49 UTC (rev 21334)
@@ -6,7 +6,7 @@
<project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
- <project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
</provider>
</psf>
Modified: branches/modular_build/bpel/releng/psfs/test.common.subversive.psf
===================================================================
--- branches/modular_build/bpel/releng/psfs/test.common.subversive.psf 2010-04-08 02:07:40 UTC (rev 21333)
+++ branches/modular_build/bpel/releng/psfs/test.common.subversive.psf 2010-04-08 02:08:49 UTC (rev 21334)
@@ -6,7 +6,7 @@
<project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
<project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
- <project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
+ <project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
</provider>
</psf>
Modified: branches/modular_build/modeshape/releng/psfs/test.common.subclipse.psf
===================================================================
--- branches/modular_build/modeshape/releng/psfs/test.common.subclipse.psf 2010-04-08 02:07:40 UTC (rev 21333)
+++ branches/modular_build/modeshape/releng/psfs/test.common.subclipse.psf 2010-04-08 02:08:49 UTC (rev 21334)
@@ -6,7 +6,7 @@
<project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
- <project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
</provider>
</psf>
Modified: branches/modular_build/modeshape/releng/psfs/test.common.subversive.psf
===================================================================
--- branches/modular_build/modeshape/releng/psfs/test.common.subversive.psf 2010-04-08 02:07:40 UTC (rev 21333)
+++ branches/modular_build/modeshape/releng/psfs/test.common.subversive.psf 2010-04-08 02:08:49 UTC (rev 21334)
@@ -6,7 +6,7 @@
<project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
<project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/co..."/>
- <project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
+ <project reference="1.0.1,http://anonsvn.jboss.org/repos/jbosstools/branches/modular_build/te..."/>
</provider>
</psf>
14 years, 9 months
JBoss Tools SVN: r21333 - branches/modular_build/bpel/releng/maps.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-07 22:07:40 -0400 (Wed, 07 Apr 2010)
New Revision: 21333
Modified:
branches/modular_build/bpel/releng/maps/test.common.map
Log:
JBDS-486: org.jboss.tools.tests moved into plugins/
Modified: branches/modular_build/bpel/releng/maps/test.common.map
===================================================================
--- branches/modular_build/bpel/releng/maps/test.common.map 2010-04-08 02:07:17 UTC (rev 21332)
+++ branches/modular_build/bpel/releng/maps/test.common.map 2010-04-08 02:07:40 UTC (rev 21333)
@@ -2,4 +2,4 @@
plugin@org.jboss.tools.common=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/common/plugins/org.jboss.tools.common
plugin@org.jboss.tools.common.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/common/tests/org.jboss.tools.common.test
-plugin@org.jboss.tools.tests=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/tests/tests/org.jboss.tools.tests
+plugin@org.jboss.tools.tests=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/tests/plugins/org.jboss.tools.tests
14 years, 9 months
JBoss Tools SVN: r21332 - branches/modular_build/modeshape/releng/maps.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-07 22:07:17 -0400 (Wed, 07 Apr 2010)
New Revision: 21332
Modified:
branches/modular_build/modeshape/releng/maps/test.common.map
Log:
JBDS-486: org.jboss.tools.tests moved into plugins/
Modified: branches/modular_build/modeshape/releng/maps/test.common.map
===================================================================
--- branches/modular_build/modeshape/releng/maps/test.common.map 2010-04-08 02:05:06 UTC (rev 21331)
+++ branches/modular_build/modeshape/releng/maps/test.common.map 2010-04-08 02:07:17 UTC (rev 21332)
@@ -2,4 +2,4 @@
plugin@org.jboss.tools.common=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/common/plugins/org.jboss.tools.common
plugin@org.jboss.tools.common.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/common/tests/org.jboss.tools.common.test
-plugin@org.jboss.tools.tests=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/tests/tests/org.jboss.tools.tests
+plugin@org.jboss.tools.tests=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/branches/modular_build/tests/plugins/org.jboss.tools.tests
14 years, 9 months
JBoss Tools SVN: r21331 - branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-07 22:05:06 -0400 (Wed, 07 Apr 2010)
New Revision: 21331
Modified:
branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
Log:
JBDS-486: remove version range for o.j.tools.tests dependency
Modified: branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2010-04-07 22:48:27 UTC (rev 21330)
+++ branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2010-04-08 02:05:06 UTC (rev 21331)
@@ -7,7 +7,7 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit;bundle-version="3.8.2",
- org.jboss.tools.tests;bundle-version="2.0.0"
+ org.jboss.tools.tests
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
14 years, 9 months
JBoss Tools SVN: r21330 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-04-07 18:48:27 -0400 (Wed, 07 Apr 2010)
New Revision: 21330
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6039
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2010-04-07 22:26:17 UTC (rev 21329)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2010-04-07 22:48:27 UTC (rev 21330)
@@ -158,8 +158,8 @@
ContentAssistRequest contentAssistRequest) {
super.addAttributeNameProposals(contentAssistRequest);
this.replaceJsfcTags = true;
-// super.addAttributeNameProposals(contentAssistRequest);
-// this.replaceJsfcTags = false;
+ super.addAttributeNameProposals(contentAssistRequest);
+ this.replaceJsfcTags = false;
}
/*
@@ -170,8 +170,8 @@
protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
super.addAttributeValueProposals(contentAssistRequest);
this.replaceJsfcTags = true;
-// super.addAttributeValueProposals(contentAssistRequest);
-// this.replaceJsfcTags = false;
+ super.addAttributeValueProposals(contentAssistRequest);
+ this.replaceJsfcTags = false;
}
/*
14 years, 9 months
JBoss Tools SVN: r21329 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-04-07 18:26:17 -0400 (Wed, 07 Apr 2010)
New Revision: 21329
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6039
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2010-04-07 18:21:22 UTC (rev 21328)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2010-04-07 22:26:17 UTC (rev 21329)
@@ -158,8 +158,8 @@
ContentAssistRequest contentAssistRequest) {
super.addAttributeNameProposals(contentAssistRequest);
this.replaceJsfcTags = true;
- super.addAttributeNameProposals(contentAssistRequest);
- this.replaceJsfcTags = false;
+// super.addAttributeNameProposals(contentAssistRequest);
+// this.replaceJsfcTags = false;
}
/*
@@ -170,8 +170,8 @@
protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
super.addAttributeValueProposals(contentAssistRequest);
this.replaceJsfcTags = true;
- super.addAttributeValueProposals(contentAssistRequest);
- this.replaceJsfcTags = false;
+// super.addAttributeValueProposals(contentAssistRequest);
+// this.replaceJsfcTags = false;
}
/*
14 years, 9 months
JBoss Tools SVN: r21328 - trunk/drools/tests/org.jboss.tools.drools.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-04-07 14:21:22 -0400 (Wed, 07 Apr 2010)
New Revision: 21328
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/build.properties
Log:
Added resources directory to source property.
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/build.properties
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/build.properties 2010-04-07 17:01:08 UTC (rev 21327)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/build.properties 2010-04-07 18:21:22 UTC (rev 21328)
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ resources/
output.. = bin/
bin.includes = META-INF/,\
.
14 years, 9 months
JBoss Tools SVN: r21327 - in trunk/jsf/tests/org.jboss.tools.jsf.test: projects/JSFKickStartOldFormat and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-04-07 13:01:08 -0400 (Wed, 07 Apr 2010)
New Revision: 21327
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/higest-10-basetimes-for-methods.html
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/.project
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java
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/ModelFormat_2_0_0_Test.java
Log:
performance fix for jsf tests to reduce execution time from 300 sec to 20 sec
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test
___________________________________________________________________
Name: svn:ignore
- bin
+ bin
target
pom.xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/higest-10-basetimes-for-methods.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/higest-10-basetimes-for-methods.html (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/higest-10-basetimes-for-methods.html 2010-04-07 17:01:08 UTC (rev 21327)
@@ -0,0 +1,159 @@
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<head>
+<STYLE TYPE="text/css">
+p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
+body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
+</STYLE>
+</head>
+<body text="#000000" bgcolor="#ffffff">
+<caption align=top><B>
+Execution Statistics - org.eclipse.equinox.launcher.Main at dgolovin-desktop [ PID: 6394 ]
+</B></caption>
+<table border=0 cellspacing=2 cellpadding=2 WIDTH="100%">
+<tr>
+<th align=left>Method</th>
+<th align=left></th>
+<th align=left>Class</th>
+<th align=left>Package</th>
+<th align=left><Base Time (seconds)</th>
+<th align=left>Delta : Base Time (seconds)</th>
+<th align=left>Average Base Time (seconds)</th>
+<th align=left>Cumulative Time (seconds)</th>
+<th align=left>Delta : Cumulative Time (seconds)</th>
+<th align=left>Calls</th>
+<th align=left>Delta : Calls</th>
+</tr>
+<tr BGCOLOR="#ffffbb">
+<td align=left> setAttributeValue(java.lang.String, java.lang.String) java.lang.String</td>
+<td align=left></td>
+<td align=left>XModelObjectImpl</td>
+<td align=left>org.jboss.tools.common.model.impl</td>
+<td align=left>22.074818</td>
+<td align=left>1.631869</td>
+<td align=left>0.000675</td>
+<td align=left>204.642570</td>
+<td align=left>5.570464</td>
+<td align=left>32705</td>
+<td align=left>275</td>
+</tr>
+<tr>
+<td align=left> set(java.lang.String, java.lang.String) void</td>
+<td align=left></td>
+<td align=left>RegularObjectImpl</td>
+<td align=left>org.jboss.tools.common.model.impl</td>
+<td align=left>21.582908</td>
+<td align=left>0.000000</td>
+<td align=left>0.000985</td>
+<td align=left>201.923675</td>
+<td align=left>0.000000</td>
+<td align=left>21907</td>
+<td align=left>0</td>
+</tr>
+<tr BGCOLOR="#ffffbb">
+<td align=left> getLongPath() java.lang.String</td>
+<td align=left></td>
+<td align=left>XModelObjectImpl</td>
+<td align=left>org.jboss.tools.common.model.impl</td>
+<td align=left>105.139329</td>
+<td align=left>1.141071</td>
+<td align=left>0.002264</td>
+<td align=left>125.354073</td>
+<td align=left>2.139659</td>
+<td align=left>46432</td>
+<td align=left>364</td>
+</tr>
+<tr>
+<td align=left> getAttributeValue(java.lang.String) java.lang.String</td>
+<td align=left></td>
+<td align=left>XModelObjectImpl</td>
+<td align=left>org.jboss.tools.common.model.impl</td>
+<td align=left>30.041825</td>
+<td align=left>0.038265</td>
+<td align=left>0.000358</td>
+<td align=left>84.506342</td>
+<td align=left>0.310830</td>
+<td align=left>83932</td>
+<td align=left>469</td>
+</tr>
+<tr BGCOLOR="#ffffbb">
+<td align=left> belongsTo(java.lang.Object) boolean</td>
+<td align=left></td>
+<td align=left>XJob</td>
+<td align=left>org.jboss.tools.common.model</td>
+<td align=left>79.709347</td>
+<td align=left>0.000000</td>
+<td align=left>0.046532</td>
+<td align=left>79.709347</td>
+<td align=left>0.000000</td>
+<td align=left>1713</td>
+<td align=left>0</td>
+</tr>
+<tr>
+<td align=left> get(java.lang.String) java.lang.String</td>
+<td align=left></td>
+<td align=left>AbstractExtendedXMLFileImpl</td>
+<td align=left>org.jboss.tools.common.model.filesystems.impl</td>
+<td align=left>26.688162</td>
+<td align=left>0.000000</td>
+<td align=left>0.000790</td>
+<td align=left>74.167544</td>
+<td align=left>0.000000</td>
+<td align=left>33801</td>
+<td align=left>0</td>
+</tr>
+<tr BGCOLOR="#ffffbb">
+<td align=left> describe(java.io.InputStream, org.eclipse.core.runtime.content.IContentDescription) int</td>
+<td align=left></td>
+<td align=left>XMLContentDescriber</td>
+<td align=left>org.jboss.tools.common.model.ui.editor</td>
+<td align=left>20.608653</td>
+<td align=left>0.000000</td>
+<td align=left>0.130435</td>
+<td align=left>73.861405</td>
+<td align=left>0.000000</td>
+<td align=left>158</td>
+<td align=left>0</td>
+</tr>
+<tr>
+<td align=left> get(java.lang.String) java.lang.String</td>
+<td align=left></td>
+<td align=left>XModelObjectImpl</td>
+<td align=left>org.jboss.tools.common.model.impl</td>
+<td align=left>38.404906</td>
+<td align=left>0.000000</td>
+<td align=left>0.000293</td>
+<td align=left>51.634328</td>
+<td align=left>0.000000</td>
+<td align=left>130880</td>
+<td align=left>0</td>
+</tr>
+<tr BGCOLOR="#ffffbb">
+<td align=left> get(java.lang.String) java.lang.String</td>
+<td align=left></td>
+<td align=left>FileAnyImpl</td>
+<td align=left>org.jboss.tools.common.model.filesystems.impl</td>
+<td align=left>20.120570</td>
+<td align=left>0.000000</td>
+<td align=left>0.000320</td>
+<td align=left>49.259172</td>
+<td align=left>0.000000</td>
+<td align=left>62937</td>
+<td align=left>0</td>
+</tr>
+<tr>
+<td align=left> getParent() org.jboss.tools.common.model.XModelObject</td>
+<td align=left></td>
+<td align=left>XModelObjectImpl</td>
+<td align=left>org.jboss.tools.common.model.impl</td>
+<td align=left>24.546885</td>
+<td align=left>0.018037</td>
+<td align=left>0.000131</td>
+<td align=left>24.546885</td>
+<td align=left>0.018037</td>
+<td align=left>188038</td>
+<td align=left>878</td>
+</tr>
+</table>
+</body>
+</html>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/higest-10-basetimes-for-methods.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/.project 2010-04-07 16:53:10 UTC (rev 21326)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/.project 2010-04-07 17:01:08 UTC (rev 21327)
@@ -15,11 +15,6 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.jboss.tools.common.verification.verifybuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java 2010-04-07 16:53:10 UTC (rev 21326)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java 2010-04-07 17:01:08 UTC (rev 21327)
@@ -6,8 +6,11 @@
import java.util.Map;
import java.util.Properties;
+import junit.framework.TestCase;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
@@ -15,25 +18,21 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jsf.model.pv.JSFPromptingProvider;
-import org.jboss.tools.jsf.plugin.JsfTestPlugin;
-import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.jst.web.project.list.IWebPromptingProvider;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
-import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
-import junit.framework.TestCase;
-
public class JSFPromptingProviderTest extends TestCase {
- private static final String TEST_PROJECT_NAME = "JSFPromptingProviderTestProject";
+ public static final String TEST_PROJECT_NAME = "JSFPromptingProviderTestProject";
- private static final String TEST_PROJECT_PATH = "/projects/" + TEST_PROJECT_NAME;
+ public static final String TEST_PROJECT_PATH = "/projects/" + TEST_PROJECT_NAME;
-
+ TestProjectProvider prjProvider = null;
IProject project = null;
IModelNature nature = null;
XModel model = null;
@@ -43,12 +42,12 @@
@Override
protected void setUp() throws IOException, CoreException, InvocationTargetException, InterruptedException {
-// project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember(TEST_PROJECT_NAME);
-// if(project==null) {
- project = ResourcesUtils.importProject(
- JsfTestPlugin.getDefault().getBundle(), TEST_PROJECT_PATH);
- assertNotNull(project);
-// }
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember(TEST_PROJECT_NAME);
+ if(project==null) {
+ prjProvider = new TestProjectProvider("org.jboss.tools.jsf.test", TEST_PROJECT_PATH, TEST_PROJECT_NAME, true);
+ project = prjProvider.getProject();
+ }
project.build(IncrementalProjectBuilder.FULL_BUILD, null);
nature = EclipseResourceUtil.getModelNature(project);
@@ -167,11 +166,8 @@
@Override
protected void tearDown() throws Exception {
- if(project!=null) {
- boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
- ResourcesUtils.deleteProject(TEST_PROJECT_NAME);
- ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ if(prjProvider!=null) {
+ prjProvider.dispose();
}
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2010-04-07 16:53:10 UTC (rev 21326)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2010-04-07 17:01:08 UTC (rev 21327)
@@ -3,22 +3,17 @@
import java.util.List;
import java.util.Properties;
+import junit.framework.TestCase;
+
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.test.util.TestProjectProvider;
-import org.jboss.tools.jsf.model.pv.JSFProjectsRoot;
-import org.jboss.tools.jsf.model.pv.JSFProjectsTree;
-import org.jboss.tools.jst.web.model.pv.WebProjectNode;
import org.jboss.tools.jst.web.project.list.IWebPromptingProvider;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
-import junit.framework.TestCase;
-
public class JSFBeansTest extends TestCase {
TestProjectProvider provider = null;
IProject project = null;
@@ -27,8 +22,11 @@
public JSFBeansTest() {}
public void setUp() throws CoreException {
- provider = new TestProjectProvider("org.jboss.tools.jsf.test", null, "JSFKickStartOldFormat", false);
- project = provider.getProject();
+ project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("JSFKickStartOldFormat");
+ if(project==null) {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.test", null, "JSFKickStartOldFormat", false);
+ project = provider.getProject();
+ }
}
public void testBeanWithSuper() {
@@ -51,7 +49,10 @@
}
protected void tearDown() throws CoreException{
- provider.dispose();
+ if(provider!=null) {
+ provider.dispose();
+ provider = null;
+ }
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java 2010-04-07 16:53:10 UTC (rev 21326)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java 2010-04-07 17:01:08 UTC (rev 21327)
@@ -12,12 +12,13 @@
import java.util.ArrayList;
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.common.test.util.TestDescription;
-import org.jboss.tools.common.test.util.TestProjectProvider;
-
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.internal.core.JavaModelManager;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.impl.AbstractXMLFileImpl;
@@ -25,11 +26,12 @@
import org.jboss.tools.common.model.loaders.EntityRecognizerContext;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.test.util.TestDescription;
+import org.jboss.tools.common.test.util.TestDescriptionFactory;
+import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jsf.model.pv.JSFProjectsRoot;
import org.jboss.tools.jsf.model.pv.JSFProjectsTree;
-import junit.framework.TestCase;
-
public class JSFModelTest extends TestCase {
TestProjectProvider provider = null;
IProject project = null;
@@ -38,8 +40,12 @@
public JSFModelTest() {}
public void setUp() throws Exception {
- provider = new TestProjectProvider("org.jboss.tools.jsf.test", null, "JSFKickStartOldFormat", false);
- project = provider.getProject();
+ project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("JSFKickStartOldFormat");
+ if(project==null) {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.test", null, "JSFKickStartOldFormat", false);
+ project = provider.getProject();
+ }
+
}
public void testModelExists() {
@@ -51,7 +57,8 @@
public void testPaths() {
IModelNature n = EclipseResourceUtil.getModelNature(project);
String testName = "JSFModelTest:testPaths";
- ArrayList<TestDescription> tests = provider.getTestDescriptions(testName);
+ IFile f = project.getFile(new Path("/testCases.xml"));
+ ArrayList<TestDescription> tests = new TestDescriptionFactory(f).getTestDescriptions(testName);
System.out.println(testName + " " + (tests == null ? -1 : tests.size()));
StringBuffer sb = new StringBuffer();
int errorCount = 0;
@@ -87,7 +94,8 @@
}
void doAttributeTest(XModel model, String testName) {
- ArrayList<TestDescription> tests = provider.getTestDescriptions(testName);
+ IFile f = project.getFile(new Path("/testCases.xml"));
+ ArrayList<TestDescription> tests = new TestDescriptionFactory(f).getTestDescriptions(testName);
System.out.println(testName + " " + (tests == null ? -1 : tests.size()));
StringBuffer sb = new StringBuffer();
int errorCount = 0;
@@ -159,6 +167,7 @@
protected void tearDown() throws Exception {
if(provider != null) {
provider.dispose();
+ provider=null;
}
}
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-04-07 16:53:10 UTC (rev 21326)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-04-07 17:01:08 UTC (rev 21327)
@@ -10,9 +10,11 @@
******************************************************************************/
package org.jboss.tools.jsf.test;
+import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.eclipse.jdt.internal.core.JavaModelManager;
import org.jboss.tools.jsf.model.pv.test.JSFPromptingProviderTest;
import org.jboss.tools.jsf.test.refactoring.ELVariableRefactoringTest;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -22,19 +24,34 @@
public static Test suite() {
TestSuite suite = new TestSuite("Test model loading for JSF projects");
+ TestSuite old = new TestSuite("Tests are using JSFKickStartOldFormat");
+ old.addTestSuite(JSFModelTest.class);
+ old.addTestSuite(ModelFormat_2_0_0_Test.class);
+ old.addTestSuite(JSFBeansTest.class);
+ suite.addTest(new ProjectImportTestSetup(old,"org.jboss.tools.jsf.test","projects/JSFKickStartOldFormat","JSFKickStartOldFormat"));
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(JSFPromptingProviderTest.class),"org.jboss.tools.jsf.test", JSFPromptingProviderTest.TEST_PROJECT_PATH, JSFPromptingProviderTest.TEST_PROJECT_NAME));
- suite.addTestSuite(JSFModelTest.class);
- suite.addTestSuite(ModelFormat_2_0_0_Test.class);
- // FIXME http://jira.jboss.org/jira/browse/JBIDE-2441
- suite.addTestSuite(JSFImportTest.class);
- suite.addTestSuite(JSFBeansTest.class);
- suite.addTestSuite(JSFPromptingProviderTest.class);
-
suite.addTest(new ProjectImportTestSetup(new TestSuite(ELVariableRefactoringTest.class),
"org.jboss.tools.jsf.test",
new String[]{"projects/JSFKickStartOldFormat"},
new String[]{"JSFKickStartOldFormat"}));
- return suite;
+ return new DisableJavaIndexingSetup(suite);
}
+
+ public static class DisableJavaIndexingSetup extends TestSetup {
+ public DisableJavaIndexingSetup(Test test) {
+ super(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ JavaModelManager.getIndexManager().disable();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ JavaModelManager.getIndexManager().disable();
+ }
+ }
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/ModelFormat_2_0_0_Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/ModelFormat_2_0_0_Test.java 2010-04-07 16:53:10 UTC (rev 21326)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/ModelFormat_2_0_0_Test.java 2010-04-07 17:01:08 UTC (rev 21327)
@@ -13,21 +13,19 @@
import java.util.ArrayList;
import java.util.List;
+import junit.framework.TestCase;
+
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
-
+import org.eclipse.core.resources.ResourcesPlugin;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jsf.model.pv.JSFProjectsRoot;
import org.jboss.tools.jsf.model.pv.JSFProjectsTree;
-import junit.framework.TestCase;
-
public class ModelFormat_2_0_0_Test extends TestCase {
TestProjectProvider provider = null;
IProject project = null;
@@ -36,8 +34,11 @@
public ModelFormat_2_0_0_Test() {}
public void setUp() throws Exception {
- provider = new TestProjectProvider("org.jboss.tools.jsf.test", null, "JSFKickStartOldFormat", false);
- project = provider.getProject();
+ project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("JSFKickStartOldFormat");
+ if(project == null) {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.test", null, "JSFKickStartOldFormat", false);
+ project = provider.getProject();
+ }
}
public void testModelExists() {
@@ -89,7 +90,10 @@
}
protected void tearDown() throws Exception {
- provider.dispose();
+ if(provider!=null) {
+ provider.dispose();
+ provider=null;
+ }
}
}
14 years, 9 months
JBoss Tools SVN: r21326 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui: refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-04-07 12:53:10 -0400 (Wed, 07 Apr 2010)
New Revision: 21326
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactorContributionFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5927
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-04-07 15:57:05 UTC (rev 21325)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-04-07 16:53:10 UTC (rev 21326)
@@ -14,5 +14,5 @@
CDI_UI_IMAGESIMAGE_NAME_CANNOT_BE_NULL=Image name cannot be null.
CDI_REFACTOR_CONTRIBUTOR_MENU_NAME=CDI Refactor
CDI_REFACTOR_CONTRIBUTOR_ERROR=Error
-CDI_REFACTOR_CONTRIBUTOR_RENAME_NAMED_BEAN_ACTION_NAME=Rename Named Bean
+CDI_REFACTOR_CONTRIBUTOR_RENAME_NAMED_BEAN_ACTION_NAME=Rename ''{0}'' Named Bean
RENAME_NAMED_BEAN_WIZARD_FIELD_NAME=@Named Bean Name
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactorContributionFactory.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactorContributionFactory.java 2010-04-07 15:57:05 UTC (rev 21325)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactorContributionFactory.java 2010-04-07 16:53:10 UTC (rev 21326)
@@ -30,6 +30,7 @@
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.ltk.core.refactoring.participants.RenameRefactoring;
+import org.eclipse.ltk.internal.core.refactoring.Messages;
import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
@@ -56,9 +57,6 @@
private static final String ANNOTATION_NAMED = "javax.inject.Named"; //$NON-NLS-1$
private static final String JAVA_EXT = "java"; //$NON-NLS-1$
- static private IFile editorFile;
- static private TextSelection selection;
- private IEditorPart editor;
private Shell shell;
public CDIRefactorContributionFactory(){
@@ -75,7 +73,7 @@
if(serviceLocator.hasService(IWorkbenchLocationService.class)){
IWorkbenchLocationService service = (IWorkbenchLocationService)serviceLocator.getService(IWorkbenchLocationService.class);
- editor = service.getWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorPart editor = service.getWorkbenchWindow().getActivePage().getActiveEditor();
shell = service.getWorkbench().getActiveWorkbenchWindow().getShell();
if(!(editor.getEditorInput() instanceof FileEditorInput))
@@ -83,7 +81,7 @@
FileEditorInput input = (FileEditorInput)editor.getEditorInput();
- editorFile = input.getFile();
+ IFile editorFile = input.getFile();
String ext = editorFile.getFileExtension();
if (!JAVA_EXT.equalsIgnoreCase(ext) )
@@ -91,24 +89,20 @@
if(CDICorePlugin.getCDI(editorFile.getProject(), true) == null)
return;
-
+
MenuManager mm = new MenuManager(CDIUIMessages.CDI_REFACTOR_CONTRIBUTOR_MENU_NAME);
mm.setVisible(true);
- boolean separatorIsAdded = false;
-
if(JAVA_EXT.equalsIgnoreCase(ext)){
- selection = (TextSelection)editor.getEditorSite().getSelectionProvider().getSelection();
+ TextSelection selection = (TextSelection)editor.getEditorSite().getSelectionProvider().getSelection();
IBean bean = getBean(editorFile, selection);
if(bean != null){
- mm.add(new RenameNamedBeanAction());
+ mm.add(new RenameNamedBeanAction(bean));
additions.addContributionItem(new Separator(), null);
additions.addContributionItem(mm, null);
- separatorIsAdded = true;
}
}
-
}
}
@@ -193,14 +187,15 @@
}
class RenameNamedBeanAction extends Action{
- public RenameNamedBeanAction(){
- super(CDIUIMessages.CDI_REFACTOR_CONTRIBUTOR_RENAME_NAMED_BEAN_ACTION_NAME);
+ IBean bean;
+ public RenameNamedBeanAction(IBean bean){
+ super(Messages.format(CDIUIMessages.CDI_REFACTOR_CONTRIBUTOR_RENAME_NAMED_BEAN_ACTION_NAME, bean.getName()));
+ this.bean = bean;
}
public void run(){
saveAndBuild();
- IBean bean = getBean(editorFile, selection);
invokeRenameNamedBeanWizard(bean, shell);
}
}
14 years, 9 months