JBoss Tools SVN: r24587 - trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-08-31 18:43:27 -0400 (Tue, 31 Aug 2010)
New Revision: 24587
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
Log:
https://jira.jboss.org/browse/JBDS-1302 Servers added during installation are not readded to a deleted workspace
Modified: trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2010-08-31 22:40:47 UTC (rev 24586)
+++ trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2010-08-31 22:43:27 UTC (rev 24587)
@@ -210,19 +210,32 @@
}
private void saveWorkspacePreferences() {
+ Activator.getDefault().getPreferenceStore().setValue(Activator.FIRST_START, false);
String workspaces = getWorkspaces();
String newWorkspaces = "";
+ boolean addWorkspace = true;
if (workspaces == null || workspaces.trim().length() == 0) {
newWorkspaces = getWorkspace();
} else {
- newWorkspaces = workspaces + "," + getWorkspace();
+ StringTokenizer tokenizer = new StringTokenizer(workspaces, ",");
+ while (tokenizer.hasMoreTokens()) {
+ String workspace = tokenizer.nextToken();
+ if (workspace.equals(getWorkspace())) {
+ addWorkspace = false;
+ }
+ }
+ if (addWorkspace) {
+ newWorkspaces = workspaces + "," + getWorkspace();
+ }
}
- IEclipsePreferences prefs = getPreferences();
- prefs.put(Activator.WORKSPACES, newWorkspaces);
- try {
- prefs.flush();
- } catch (BackingStoreException e) {
- Activator.log(e);
+ if (addWorkspace) {
+ IEclipsePreferences prefs = getPreferences();
+ prefs.put(Activator.WORKSPACES, newWorkspaces);
+ try {
+ prefs.flush();
+ } catch (BackingStoreException e) {
+ Activator.log(e);
+ }
}
}
@@ -230,6 +243,11 @@
* @return
*/
private boolean willBeInitialized() {
+ boolean firstStart = Activator.getDefault().getPreferenceStore().getBoolean(Activator.FIRST_START);
+ if (firstStart) {
+ return true;
+ }
+
String workspaces = getWorkspaces();
if (workspaces == null || workspaces.trim().length() == 0) {
return true;
14 years, 3 months
JBoss Tools SVN: r24586 - branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-08-31 18:40:47 -0400 (Tue, 31 Aug 2010)
New Revision: 24586
Modified:
branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
Log:
https://jira.jboss.org/browse/JBDS-1302 Servers added during installation are not readded to a deleted workspace
Modified: branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
===================================================================
--- branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2010-08-31 17:13:31 UTC (rev 24585)
+++ branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2010-08-31 22:40:47 UTC (rev 24586)
@@ -210,19 +210,32 @@
}
private void saveWorkspacePreferences() {
+ Activator.getDefault().getPreferenceStore().setValue(Activator.FIRST_START, false);
String workspaces = getWorkspaces();
String newWorkspaces = "";
+ boolean addWorkspace = true;
if (workspaces == null || workspaces.trim().length() == 0) {
newWorkspaces = getWorkspace();
} else {
- newWorkspaces = workspaces + "," + getWorkspace();
+ StringTokenizer tokenizer = new StringTokenizer(workspaces, ",");
+ while (tokenizer.hasMoreTokens()) {
+ String workspace = tokenizer.nextToken();
+ if (workspace.equals(getWorkspace())) {
+ addWorkspace = false;
+ }
+ }
+ if (addWorkspace) {
+ newWorkspaces = workspaces + "," + getWorkspace();
+ }
}
- IEclipsePreferences prefs = getPreferences();
- prefs.put(Activator.WORKSPACES, newWorkspaces);
- try {
- prefs.flush();
- } catch (BackingStoreException e) {
- Activator.log(e);
+ if (addWorkspace) {
+ IEclipsePreferences prefs = getPreferences();
+ prefs.put(Activator.WORKSPACES, newWorkspaces);
+ try {
+ prefs.flush();
+ } catch (BackingStoreException e) {
+ Activator.log(e);
+ }
}
}
@@ -230,6 +243,11 @@
* @return
*/
private boolean willBeInitialized() {
+ boolean firstStart = Activator.getDefault().getPreferenceStore().getBoolean(Activator.FIRST_START);
+ if (firstStart) {
+ return true;
+ }
+
String workspaces = getWorkspaces();
if (workspaces == null || workspaces.trim().length() == 0) {
return true;
14 years, 3 months
JBoss Tools SVN: r24585 - in trunk/seam: tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-08-31 13:13:31 -0400 (Tue, 31 Aug 2010)
New Revision: 24585
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamProblemMarkerResolutionGenerator.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
Log:
https://jira.jboss.org/browse/JBIDE-4064
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamProblemMarkerResolutionGenerator.java 2010-08-31 16:54:03 UTC (rev 24584)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamProblemMarkerResolutionGenerator.java 2010-08-31 17:13:31 UTC (rev 24585)
@@ -55,7 +55,7 @@
if(messageId == SeamCoreValidator.NONUNIQUE_COMPONENT_NAME_MESSAGE_ID)
return new IMarkerResolution[]{new DeleteAnnotaionMarkerResolution(SeamUIMessages.DELETE_NAME_ANNOTATION_MARKER_RESOLUTION_TITLE, "org.jboss.seam.annotations.Name",file, start, end)};
else if(messageId == SeamCoreValidator.DUPLICATE_REMOVE_MESSAGE_ID)
- return new IMarkerResolution[]{new DeleteAnnotaionMarkerResolution(SeamUIMessages.DELETE_REMOVE_ANNOTATION_MARKER_RESOLUTION_TITLE, "org.jboss.seam.annotations.Remove", file, start, end)};
+ return new IMarkerResolution[]{new DeleteAnnotaionMarkerResolution(SeamUIMessages.DELETE_REMOVE_ANNOTATION_MARKER_RESOLUTION_TITLE, "javax.ejb.Remove", file, start, end)};
else if(messageId == SeamCoreValidator.DUPLICATE_DESTROY_MESSAGE_ID)
return new IMarkerResolution[]{new DeleteAnnotaionMarkerResolution(SeamUIMessages.DELETE_DESTROY_ANNOTATION_MARKER_RESOLUTION_TITLE, "org.jboss.seam.annotations.Destroy", file, start, end)};
else if(messageId == SeamCoreValidator.DUPLICATE_CREATE_MESSAGE_ID)
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2010-08-31 16:54:03 UTC (rev 24584)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2010-08-31 17:13:31 UTC (rev 24585)
@@ -15,12 +15,10 @@
import junit.framework.TestSuite;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.wst.validation.ValidationFramework;
import org.eclipse.wst.validation.internal.operations.ValidatorManager;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -43,10 +41,8 @@
import org.jboss.tools.seam.ui.test.wizard.SeamFormNewWizardTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNamesTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNewWizardTest;
-import org.jboss.tools.test.util.JUnitUtils;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
-import org.jboss.tools.test.util.ResourcesUtils;
/**
* @author eskimo
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2010-08-31 16:54:03 UTC (rev 24584)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2010-08-31 17:13:31 UTC (rev 24585)
@@ -52,8 +52,6 @@
IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
- System.out.println("Markers - "+markers.length);
-
boolean found = false;
for (int i = 0; i < markers.length; i++) {
IMarker marker = markers[i];
@@ -62,7 +60,7 @@
for (int j = 0; j < resolutions.length; j++) {
IMarkerResolution resolution = resolutions[j];
if (resolution instanceof DeleteAnnotaionMarkerResolution) {
- assertEquals("org.jboss.seam.annotations.Remove", ((DeleteAnnotaionMarkerResolution)resolution).getQualifiedName());
+ assertEquals("javax.ejb.Remove", ((DeleteAnnotaionMarkerResolution)resolution).getQualifiedName());
found = true;
break;
}
@@ -82,8 +80,6 @@
IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
- System.out.println("Markers - "+markers.length);
-
boolean found = false;
for (int i = 0; i < markers.length; i++) {
IMarker marker = markers[i];
@@ -112,8 +108,6 @@
IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
- System.out.println("Markers - "+markers.length);
-
boolean found = false;
for (int i = 0; i < markers.length; i++) {
IMarker marker = markers[i];
@@ -142,8 +136,6 @@
IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
- System.out.println("Markers - "+markers.length);
-
boolean found = false;
for (int i = 0; i < markers.length; i++) {
IMarker marker = markers[i];
14 years, 3 months
JBoss Tools SVN: r24584 - in trunk/seam: tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-08-31 12:54:03 -0400 (Tue, 31 Aug 2010)
New Revision: 24584
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateCreateComponent.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateDestroyComponent.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateRemoveComponent.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateUnwrapComponent.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/DeleteAnnotaionMarkerResolution.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-4064
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/DeleteAnnotaionMarkerResolution.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/DeleteAnnotaionMarkerResolution.java 2010-08-31 16:17:12 UTC (rev 24583)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/DeleteAnnotaionMarkerResolution.java 2010-08-31 16:54:03 UTC (rev 24584)
@@ -34,5 +34,13 @@
public void run(IMarker marker) {
deleteAnnotation(qualifiedName);
}
+
+ /**
+ * Returns qualified name for test purpose
+ * @return
+ */
+ public String getQualifiedName(){
+ return qualifiedName;
+ }
}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateCreateComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateCreateComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateCreateComponent.java 2010-08-31 16:54:03 UTC (rev 24584)
@@ -0,0 +1,64 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("StatefulDuplicateCreateComponent")
+
+@Stateful
+(a)Scope(ScopeType.APPLICATION)
+public class StatefulDuplicateCreateComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+
+ @Create
+ public void createMethod(){
+
+ }
+
+ @Create
+ public void createMethod2(){
+
+ }
+
+ @Destroy
+ public void destroyMethod(){
+
+ }
+
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+
+ public void setAbc(String abc) {
+ this.abc = abc;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateCreateComponent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateDestroyComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateDestroyComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateDestroyComponent.java 2010-08-31 16:54:03 UTC (rev 24584)
@@ -0,0 +1,56 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("StatefulDuplicateDestroyComponent")
+
+@Stateful
+(a)Scope(ScopeType.APPLICATION)
+public class StatefulDuplicateDestroyComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+ @Destroy
+ public void destroyMethod(){
+
+ }
+
+ @Destroy
+ public void destroyMethod2(){
+
+ }
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+
+ public void setAbc(String abc) {
+ this.abc = abc;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateDestroyComponent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateRemoveComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateRemoveComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateRemoveComponent.java 2010-08-31 16:54:03 UTC (rev 24584)
@@ -0,0 +1,24 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Name;
+
+@Stateful
+@Name("StatefulDuplicateRemoveComponent")
+public class StatefulDuplicateRemoveComponent {
+
+ @Destroy
+ public void destroyMethod(){
+ }
+
+ @Remove
+ public void removeMethod1(){
+ }
+
+ @Remove
+ public void removeMethod2(){
+ }
+}
\ No newline at end of file
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateRemoveComponent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateUnwrapComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateUnwrapComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateUnwrapComponent.java 2010-08-31 16:54:03 UTC (rev 24584)
@@ -0,0 +1,62 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Unwrap;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("StatefulDuplicateUnwrapComponent")
+
+@Stateful
+(a)Scope(ScopeType.APPLICATION)
+public class StatefulDuplicateUnwrapComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+ @Destroy
+ public void destroyMethod(){
+
+ }
+
+ @Unwrap
+ public void unwrapMethod(){
+
+ }
+
+ @Unwrap
+ public void unwrapMethod2(){
+
+ }
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+
+ public void setAbc(String abc) {
+ this.abc = abc;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateUnwrapComponent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2010-08-31 16:17:12 UTC (rev 24583)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2010-08-31 16:54:03 UTC (rev 24584)
@@ -14,12 +14,23 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.eclipse.wst.validation.internal.operations.ValidatorManager;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.ui.test.ca.SeamELContentAssistJbide1645Test;
import org.jboss.tools.seam.ui.test.ca.SeamELContentAssistJbide1676Test;
import org.jboss.tools.seam.ui.test.ca.SeamELContentAssistTest;
import org.jboss.tools.seam.ui.test.el.ELExprPartitionerTest;
import org.jboss.tools.seam.ui.test.hyperlink.SeamViewHyperlinkPartitionerTest;
import org.jboss.tools.seam.ui.test.jbide.JBide3989Test;
+import org.jboss.tools.seam.ui.test.marker.SeamMarkerResolutionTest;
import org.jboss.tools.seam.ui.test.preferences.SeamPreferencesPageTest;
import org.jboss.tools.seam.ui.test.preferences.SeamSettingsPreferencesPageTest;
import org.jboss.tools.seam.ui.test.view.SeamComponentsViewAllTests;
@@ -32,7 +43,10 @@
import org.jboss.tools.seam.ui.test.wizard.SeamFormNewWizardTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNamesTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNewWizardTest;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
+import org.jboss.tools.test.util.ResourcesUtils;
/**
* @author eskimo
@@ -61,7 +75,23 @@
suite.addTestSuite(SeamCreateTestProjectTest.class);
suite.addTestSuite(Seam20XCreateTestProjectTest.class);
suite.addTestSuite(SeamProjectNamesTest.class);
- suite.addTestSuite(Seam20XProjectNamesTest.class);
+ suite.addTestSuite(Seam20XProjectNamesTest.class);
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamMarkerResolutionTest.class),"org.jboss.tools.seam.core.test","projects/SeamWebWarTestProject","SeamWebWarTestProject") {
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ IProject project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("SeamWebWarTestProject");
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ JobUtils.waitForIdle();
+ ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
+ seamProject.setRuntimeName("UNKNOWN");
+ ValidatorManager.addProjectBuildValidationSupport(project);
+ project.build(IncrementalProjectBuilder.FULL_BUILD,
+ new NullProgressMonitor());
+
+ JobUtils.waitForIdle();
+ }
+ } );
return suite;
}
}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2010-08-31 16:54:03 UTC (rev 24584)
@@ -0,0 +1,167 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2009 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.seam.ui.test.marker;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.seam.ui.marker.DeleteAnnotaionMarkerResolution;
+import org.jboss.tools.test.util.JobUtils;
+
+/**
+ * @author Daniel Azarov
+ *
+ */
+public class SeamMarkerResolutionTest extends TestCase {
+ public static final String MARKER_TYPE = "org.eclipse.wst.validation.problemmarker";
+
+ private IProject project;
+
+ @Override
+ protected void setUp() throws Exception {
+ JobUtils.waitForIdle();
+ IResource project = ResourcesPlugin.getWorkspace().getRoot().findMember("SeamWebWarTestProject");
+ this.project = project.getProject();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ }
+
+ public void testDuplicateRemoveAnnotationResolution() throws CoreException {
+ String TARGET_FILE_NAME = "src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateRemoveComponent.java";
+ IFile file = project.getFile(TARGET_FILE_NAME);
+
+ assertTrue("File - "+TARGET_FILE_NAME+" must be exists",file.exists());
+
+ IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
+
+ System.out.println("Markers - "+markers.length);
+
+ boolean found = false;
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
+ .getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution instanceof DeleteAnnotaionMarkerResolution) {
+ assertEquals("org.jboss.seam.annotations.Remove", ((DeleteAnnotaionMarkerResolution)resolution).getQualifiedName());
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ assertTrue("The quickfix \"Delete @Remove annotation\" doesn't exist.", found);
+ }
+
+ public void testDuplicateDestroyAnnotationResolution() throws CoreException {
+ String TARGET_FILE_NAME = "src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateDestroyComponent.java";
+ IFile file = project.getFile(TARGET_FILE_NAME);
+
+ assertTrue("File - "+TARGET_FILE_NAME+" must be exists",file.exists());
+
+ IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
+
+ System.out.println("Markers - "+markers.length);
+
+ boolean found = false;
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
+ .getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution instanceof DeleteAnnotaionMarkerResolution) {
+ assertEquals("org.jboss.seam.annotations.Destroy", ((DeleteAnnotaionMarkerResolution)resolution).getQualifiedName());
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ assertTrue("The quickfix \"Delete @Destroy annotation\" doesn't exist.", found);
+ }
+
+ public void testDuplicateCreateAnnotationResolution() throws CoreException {
+ String TARGET_FILE_NAME = "src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateCreateComponent.java";
+ IFile file = project.getFile(TARGET_FILE_NAME);
+
+ assertTrue("File - "+TARGET_FILE_NAME+" must be exists",file.exists());
+
+ IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
+
+ System.out.println("Markers - "+markers.length);
+
+ boolean found = false;
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
+ .getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution instanceof DeleteAnnotaionMarkerResolution) {
+ assertEquals("org.jboss.seam.annotations.Create", ((DeleteAnnotaionMarkerResolution)resolution).getQualifiedName());
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ assertTrue("The quickfix \"Delete @Create annotation\" doesn't exist.", found);
+ }
+
+ public void testDuplicateUnwrapAnnotationResolution() throws CoreException {
+ String TARGET_FILE_NAME = "src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateUnwrapComponent.java";
+ IFile file = project.getFile(TARGET_FILE_NAME);
+
+ assertTrue("File - "+TARGET_FILE_NAME+" must be exists",file.exists());
+
+ IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
+
+ System.out.println("Markers - "+markers.length);
+
+ boolean found = false;
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
+ .getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution instanceof DeleteAnnotaionMarkerResolution) {
+ assertEquals("org.jboss.seam.annotations.Unwrap", ((DeleteAnnotaionMarkerResolution)resolution).getQualifiedName());
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ assertTrue("The quickfix \"Delete @Unwrap annotation\" doesn't exist.", found);
+ }
+
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 3 months
JBoss Tools SVN: r24583 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2010-08-31 12:17:12 -0400 (Tue, 31 Aug 2010)
New Revision: 24583
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/WSDLBrowseDialog.java
Log:
REOPENED - issue JBIDE-6851: [tester] provide ability to read WSDL exposed over HTTPS
https://jira.jboss.org/browse/JBIDE-6851
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/WSDLBrowseDialog.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/WSDLBrowseDialog.java 2010-08-31 16:13:18 UTC (rev 24582)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/WSDLBrowseDialog.java 2010-08-31 16:17:12 UTC (rev 24583)
@@ -327,13 +327,19 @@
try {
final URL testURL = new URL(inDialog.getValue());
locationCombo.setText(testURL.toExternalForm());
- IStatus status = parseWSDLFromURL(testURL, true);
+ IStatus status = validate(false);
if (status != null && !status.isOK()) {
- setMessage(status.getMessage());
+ setMessage(status.getMessage(), IMessageProvider.WARNING);
} else {
- setMessage(JBossWSUIMessages.WSDLBrowseDialog_Message);
- if (showServicePortOperaton)
- updateServiceCombo();
+ status = parseWSDLFromURL(testURL, true);
+ if (status != null && !status.isOK()) {
+ setMessage(status.getMessage(), IMessageProvider.WARNING);
+ } else {
+ setMessage(JBossWSUIMessages.WSDLBrowseDialog_Message);
+ if (showServicePortOperaton) {
+ updateServiceCombo();
+ }
+ }
}
} catch (MalformedURLException e) {
JBossWSUIPlugin.log(e);
14 years, 3 months
JBoss Tools SVN: r24582 - trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-08-31 12:13:18 -0400 (Tue, 31 Aug 2010)
New Revision: 24582
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
Log:
[JBIDE-6376] corrected reporting url
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java 2010-08-31 15:56:25 UTC (rev 24581)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java 2010-08-31 16:13:18 UTC (rev 24582)
@@ -44,13 +44,11 @@
private static final String HOST_NAME = ReportingMessages.UsageReport_HostName;
-// private FocusPoint focusPoint = new FocusPoint("tools") //$NON-NLS-1$
-// .setChild(new FocusPoint("usage") //$NON-NLS-1$
-// .setChild(new FocusPoint("action") //$NON-NLS-1$
-// .setChild(new FocusPoint("wsstartup")))); //$NON-NLS-1$
+ private FocusPoint focusPoint = new FocusPoint("tools") //$NON-NLS-1$
+ .setChild(new FocusPoint("usage") //$NON-NLS-1$
+ .setChild(new FocusPoint("action") //$NON-NLS-1$
+ .setChild(new FocusPoint("wsstartup")))); //$NON-NLS-1$
- private FocusPoint focusPoint = new FocusPoint("pureTest"); //$NON-NLS-1$
-
private GlobalUsageReportingSettings globalSettings = new GlobalUsageReportingSettings(JBossToolsUsageActivator
.getDefault());
14 years, 3 months
JBoss Tools SVN: r24581 - trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-08-31 11:56:25 -0400 (Tue, 31 Aug 2010)
New Revision: 24581
Modified:
trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF
Log:
com.google.gwt.eclipse.sdkbundle.2.0.4 is needed. The (builder of the) project that gets created is looking for it
Modified: trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF 2010-08-31 15:49:51 UTC (rev 24580)
+++ trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF 2010-08-31 15:56:25 UTC (rev 24581)
@@ -8,6 +8,7 @@
Require-Bundle:
org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
com.google.gwt.eclipse.core;bundle-version="[1.3.3,2.0.0)",
+ com.google.gwt.eclipse.sdkbundle.2.0.4;bundle-version="[2.0.4,3.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.wst.common.project.facet.core;bundle-version="[1.4.0,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
14 years, 3 months
JBoss Tools SVN: r24580 - in trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui: editor/form and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-31 11:49:51 -0400 (Tue, 31 Aug 2010)
New Revision: 24580
Modified:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/ActionClassValueFilter.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBActionForm.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizardPage.java
Log:
https://jira.jboss.org/browse/JBIDE-6616
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/ActionClassValueFilter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/ActionClassValueFilter.java 2010-08-31 15:37:49 UTC (rev 24579)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/ActionClassValueFilter.java 2010-08-31 15:49:51 UTC (rev 24580)
@@ -11,13 +11,18 @@
package org.jboss.tools.esb.ui.editor.attribute;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.attribute.IValueFilter;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.esb.ui.wizard.NewActionWizardPage;
/**
*
@@ -42,7 +47,27 @@
boolean b = value.startsWith("org.jboss.soa.esb.actions.")
|| EclipseJavaUtil.isDerivedClass(value, AbstractActionLifecycle, project)
|| EclipseJavaUtil.isDerivedClass(value, AbstractActionPipelineProcessor, project);
-
+ if(!b) {
+ IType t = EclipseResourceUtil.getValidType(project, value);
+ if(t != null) {
+ try {
+ boolean q = NewActionWizardPage.PROCESS.equals(EclipseJavaUtil.resolveType(t, "Process")) ;
+ IMethod[] ms = t.getMethods();
+ for (int i = 0; i < ms.length; i++) {
+ IAnnotation a = ms[i].getAnnotation(NewActionWizardPage.PROCESS);
+ if((a == null || !a.exists()) && q) {
+ a = ms[i].getAnnotation("Process");
+ }
+ if(a != null && a.exists()) {
+ b = true;
+ break;
+ }
+ }
+ } catch (CoreException e) {
+
+ }
+ }
+ }
return b;
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBActionForm.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBActionForm.java 2010-08-31 15:37:49 UTC (rev 24579)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBActionForm.java 2010-08-31 15:49:51 UTC (rev 24580)
@@ -7,6 +7,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
@@ -29,6 +30,7 @@
import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.esb.core.model.ESBConstants;
+import org.jboss.tools.esb.ui.wizard.NewActionWizardPage;
public class ESBActionForm extends Form {
static IFormData formData = ModelFormLayoutData.createGeneralFormData(
@@ -100,10 +102,15 @@
if(ms[i].isConstructor()) continue;
if(!Flags.isPublic(ms[i].getFlags())) continue;
String[] ps = ms[i].getParameterTypes();
- if(ps == null || ps.length != 1) continue;
+ if(ps == null || ps.length == 0) continue;
String t = EclipseJavaUtil.resolveTypeAsString(type, ps[0]);
- if(!t.endsWith("Message")) continue;
- list.add(ms[i].getElementName());
+ if(t.endsWith("Message") && ps.length == 1) {
+ list.add(ms[i].getElementName());
+ continue;
+ }
+ if(hasProcessAnnotation(ms[i])) {
+ list.add(ms[i].getElementName());
+ }
}
String st = type.getSuperclassName();
if(st != null && st.length() > 0) {
@@ -114,4 +121,19 @@
}
}
+
+ static boolean hasProcessAnnotation(IMethod m) throws JavaModelException {
+ boolean q = NewActionWizardPage.PROCESS.equals(EclipseJavaUtil.resolveType(m.getDeclaringType(), "Process"));
+ IAnnotation[] as = m.getAnnotations();
+ for (IAnnotation a: as) {
+ String n = a.getElementName();
+ if(NewActionWizardPage.PROCESS.equals(n)) {
+ return true;
+ }
+ if(q && "Process".equals(n)) {
+ return true;
+ }
+ }
+ return false;
+ }
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizardPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizardPage.java 2010-08-31 15:37:49 UTC (rev 24579)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizardPage.java 2010-08-31 15:49:51 UTC (rev 24580)
@@ -45,6 +45,8 @@
*
*/
public class NewActionWizardPage extends NewClassWizardPageEx {
+ public static String PROCESS = "org.jboss.soa.esb.actions.annotation.Process";
+
RadioFieldEditor pojo = null;
public NewActionWizardPage() {
@@ -187,7 +189,7 @@
buf.append(comment);
buf.append(lineDelim);
}
- imports.addImport("org.jboss.soa.esb.actions.annotation.Process"); //$NON-NLS-1$
+ imports.addImport(PROCESS); //$NON-NLS-1$
buf.append("@Process").append(lineDelim); //$NON-NLS-1$
buf.append("public Message process("); //$NON-NLS-1$
buf.append(imports.addImport("org.jboss.soa.esb.message.Message")); //$NON-NLS-1$
14 years, 3 months
JBoss Tools SVN: r24579 - in trunk/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: bfitzpat
Date: 2010-08-31 11:37:49 -0400 (Tue, 31 Aug 2010)
New Revision: 24579
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizardPage.java
Log:
OPEN - issue JBIDE-6753: [restwizard] provide option to not generate servlet stuff in web.xml
https://jira.jboss.org/browse/JBIDE-6753
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-08-31 15:22:49 UTC (rev 24578)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-08-31 15:37:49 UTC (rev 24579)
@@ -10,7 +10,8 @@
JBossRSGenerateWizardPage_Error_RestEasyJarsNotFoundInRuntime=RESTEasy jars not found in the runtime associated with the selected project. Make sure RESTEasy is installed and try again.
JBossRSGenerateWizardPage_Label_Application_Class_Name=Application Class Name:
JBossRSGenerateWizardPage_Page_title=Specify the Dynamic Web Project, service, package and class name for the sample web service and web service classes.
-JBossRSGenerateWizardValidator_ERROR_Can_Only_Add_Sample_Once=Project already has the sample RESTful service installed. Cannot be added a second time.
+JBossRSGenerateWizardPage_UpdateWebXMLCheckbox=Update web.xml
+JBossRSGenerateWizardValidator_ERROR_Can_Only_Add_Sample_Once=Project already has a RESTful service installed. The sample can only be installed in an empty project.
JBossRuntimeListFieldEditor_ActionAdd=&Add
JBossRuntimeListFieldEditor_ActionEdit=&Edit
JBossRuntimeListFieldEditor_ActionRemove=&Remove
@@ -162,6 +163,6 @@
TesterWSDLUtils_WSDL_HTTPS_Secured_Inaccessible=WSDL is secured and inaccessible. Try saving a copy of the WSDL and using the file copy instead.
TesterWSDLUtils_WSDL_Inaccessible=WSDL is inaccessible.
UidPwdDialog_Description=Specify the user name and password to access this web service via basic authentication.
-UidPwdDialog_PWD_Label=Password:
+UidPwdDialog_PWD_Label=Password\:
UidPwdDialog_Title=User Name/ Password
-UidPwdDialog_UID_Label=User Name:
+UidPwdDialog_UID_Label=User Name\:
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-08-31 15:22:49 UTC (rev 24578)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-08-31 15:37:49 UTC (rev 24579)
@@ -42,6 +42,7 @@
public static String JBossRSGenerateWizardPage_Error_RestEasyJarsNotFoundInRuntime;
public static String JBossRSGenerateWizardPage_Label_Application_Class_Name;
public static String JBossRSGenerateWizardPage_Page_title;
+ public static String JBossRSGenerateWizardPage_UpdateWebXMLCheckbox;
public static String JBossRSGenerateWizardValidator_ERROR_Can_Only_Add_Sample_Once;
public static String JBossRuntimeListFieldEditor_ActionAdd;
public static String JBossRuntimeListFieldEditor_ActionEdit;
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java 2010-08-31 15:22:49 UTC (rev 24578)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java 2010-08-31 15:37:49 UTC (rev 24579)
@@ -61,6 +61,7 @@
private String appClassName = APPCLASSDEFAULT;
private boolean useDefaultServiceName = true;
private boolean useDefaultClassName = true;
+ private boolean updateWebXML = true;
private IStructuredSelection selection;
private IProject project;
@@ -109,20 +110,22 @@
}
IStatus status = null;
- try {
- RSMergeWebXMLCommand mergeCommand = new RSMergeWebXMLCommand(model);
- status = mergeCommand.execute(null, null);
- } catch (ExecutionException e) {
- JBossWSUIPlugin.log(e);
+ if (getUpdateWebXML()) {
+ try {
+ RSMergeWebXMLCommand mergeCommand = new RSMergeWebXMLCommand(model);
+ status = mergeCommand.execute(null, null);
+ } catch (ExecutionException e) {
+ JBossWSUIPlugin.log(e);
+ }
+ if (status != null && status.getSeverity() == Status.ERROR) {
+ MessageDialog
+ .openError(
+ this.getShell(),
+ JBossWSUIMessages.JBossWS_GenerateWizard_MessageDialog_Title,
+ status.getMessage());
+ return false;
+ }
}
- if (status != null && status.getSeverity() == Status.ERROR) {
- MessageDialog
- .openError(
- this.getShell(),
- JBossWSUIMessages.JBossWS_GenerateWizard_MessageDialog_Title,
- status.getMessage());
- return false;
- }
try {
new AddRestEasyJarsCommand(model).execute(null, null);
RSServiceSampleCreationCommand createCommand =
@@ -217,6 +220,14 @@
this.useDefaultClassName = useDefaultClassName;
}
+ public void setUpdateWebXML(boolean updateWebXML) {
+ this.updateWebXML = updateWebXML;
+ }
+
+ public boolean getUpdateWebXML() {
+ return updateWebXML;
+ }
+
public IProject getProject() {
return project;
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizardPage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizardPage.java 2010-08-31 15:22:49 UTC (rev 24578)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizardPage.java 2010-08-31 15:37:49 UTC (rev 24579)
@@ -29,6 +29,7 @@
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
@@ -48,6 +49,7 @@
private Text packageName;
private Text className;
private Text appClassName;
+ private Button updateWebXML;
protected JBossRSGenerateWizardPage(String pageName) {
super(pageName);
@@ -97,7 +99,7 @@
gd.horizontalSpan = 2;
group2.setLayout(new GridLayout(2, false));
group2.setLayoutData(gd);
-
+
new Label(group2, SWT.NONE)
.setText(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_ServiceName_Label);
name = new Text(group2, SWT.BORDER);
@@ -114,6 +116,23 @@
});
+ updateWebXML = new Button(group2, SWT.CHECK);
+ updateWebXML.setText(JBossWSUIMessages.JBossRSGenerateWizardPage_UpdateWebXMLCheckbox);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ updateWebXML.setLayoutData(gd);
+ updateWebXML.setSelection(wizard.getUpdateWebXML());
+ updateWebXML.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ wizard.setUpdateWebXML(updateWebXML.getSelection());
+ name.setEnabled(wizard.getUpdateWebXML());
+ setPageComplete(isPageComplete());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+
Group group3 = new Group(composite, SWT.NONE);
group3.setText(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_Class_Group);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -344,14 +363,16 @@
}
// already has a REST sample installed - can't use wizard again
- IStatus alreadyHasREST = JBossRSGenerateWizardValidator.RESTAppExists();
- if (alreadyHasREST != null) {
- if (alreadyHasREST.getSeverity() == IStatus.ERROR) {
- setMessage(alreadyHasREST.getMessage(), DialogPage.ERROR);
- return false;
- } else if (alreadyHasREST.getSeverity() == IStatus.WARNING) {
- setMessage(alreadyHasREST.getMessage(), DialogPage.WARNING);
- return true;
+ if (wizard.getUpdateWebXML()) {
+ IStatus alreadyHasREST = JBossRSGenerateWizardValidator.RESTAppExists();
+ if (alreadyHasREST != null) {
+ if (alreadyHasREST.getSeverity() == IStatus.ERROR) {
+ setMessage(alreadyHasREST.getMessage(), DialogPage.ERROR);
+ return false;
+ } else if (alreadyHasREST.getSeverity() == IStatus.WARNING) {
+ setMessage(alreadyHasREST.getMessage(), DialogPage.WARNING);
+ return true;
+ }
}
}
14 years, 3 months
JBoss Tools SVN: r24578 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-08-31 11:22:49 -0400 (Tue, 31 Aug 2010)
New Revision: 24578
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://jira.jboss.org/browse/JBIDE-6950 Improved CDI injection point incremental validation.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-08-31 15:12:05 UTC (rev 24577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-08-31 15:22:49 UTC (rev 24578)
@@ -434,6 +434,10 @@
Set<IInjectionPoint> points = bean.getInjectionPoints();
for (IInjectionPoint point : points) {
+ IType type = getTypeOfInjection(point);
+ if(type!=null && !type.isBinary()) {
+ getValidationContext().addLinkedCoreResource(beanPath, type.getPath(), false);
+ }
validateInjectionPoint(point);
}
@@ -459,6 +463,11 @@
validateSpecializingBean(bean);
}
+ private IType getTypeOfInjection(IInjectionPoint injection) {
+ IParametedType parametedType = injection.getType();
+ return parametedType==null?null:parametedType.getType();
+ }
+
private void addLinkedStereotypes(String beanPath, IStereotyped stereotyped) {
Set<IStereotypeDeclaration> stereotypeDeclarations = stereotyped.getStereotypeDeclarations();
for (IStereotypeDeclaration stereotypeDeclaration : stereotypeDeclarations) {
@@ -1192,7 +1201,8 @@
* 5.2.1. Unsatisfied and ambiguous dependencies
* - If an unsatisfied or unresolvable ambiguous dependency exists, the container automatically detects the problem and treats it as a deployment problem.
*/
- if(beans.isEmpty()) {
+ IType type = getTypeOfInjection(injection);
+ if(type!=null && beans.isEmpty()) {
addError(CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, CDIPreferences.UNSATISFIED_INJECTION_POINTS, reference, injection.getResource());
} else if(beans.size()>1) {
addError(CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource());
@@ -1220,7 +1230,6 @@
* 5.5.7. Injection point metadata
* - bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default
*/
- IType type = injection.getType() == null ? null : injection.getType().getType();
if(type!=null && CDIConstants.INJECTIONPOINT_TYPE_NAME.equals(type.getFullyQualifiedName())) {
IScope beanScope = injection.getClassBean().getScope();
if(injection.hasDefaultQualifier() && beanScope!=null && !CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(beanScope.getSourceType().getFullyQualifiedName())) {
14 years, 3 months