JBoss Tools SVN: r27538 - trunk/build/hudson-jobs.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-16 03:06:28 -0500 (Thu, 16 Dec 2010)
New Revision: 27538
Added:
trunk/build/hudson-jobs/pom-checker.xml
Log:
add pom-checker.xml for checker plugin
Added: trunk/build/hudson-jobs/pom-checker.xml
===================================================================
--- trunk/build/hudson-jobs/pom-checker.xml (rev 0)
+++ trunk/build/hudson-jobs/pom-checker.xml 2010-12-16 08:06:28 UTC (rev 27538)
@@ -0,0 +1,59 @@
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.hudson.jobs.all</artifactId>
+ <name>org.jboss.tools.hudson.jobs.all</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugin</groupId>
+ <artifactId>hudson-job-schedule-checker-plugin</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>install</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+<!--
+To be able to connect to server, must first import certificate or you may get this error:
+
+ javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
+
+AS USER (with Firefox):
+
+Browse to https://hudson.qa.jboss.com/hudson & accept the cert.
+
+ Edit > Preferences > Advanced > Encryption > View Certificates > find hudson cert > Export to file /tmp/hudson.qa.jboss.com.cert
+
+AS ROOT (default password is "changeit"):
+
+ # /opt/sun-java2-6.0/jre/bin/keytool -list -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts | grep hudson
+ # /opt/sun-java2-6.0/jre/bin/keytool -import -alias hudson.qa -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts -file /tmp/hudson.qa.jboss.com.cert
+ # /opt/sun-java2-6.0/jre/bin/keytool -list -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts | grep hudson
+
+To run, make sure that JAVA_HOME is set to the path where you imported the cert, eg.:
+
+ $ export JAVA_HOME=/opt/sun-java2-6.0/; mvn clean install
+-->
+ <!-- more output w/ verbose; default false -->
+ <verbose>true</verbose>
+
+ <!-- server and connection details -->
+ <!-- <hudsonURL>https://hudson.qa.jboss.com/hudson/</hudsonURL> -->
+ <hudsonURL>http://localhost:8080/</hudsonURL>
+ <username>SET USERNAME HERE</username>
+ <password>SET PASSWORD HERE</password>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
14 years
JBoss Tools SVN: r27537 - trunk/build/hudson-jobs.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-16 03:06:17 -0500 (Thu, 16 Dec 2010)
New Revision: 27537
Added:
trunk/build/hudson-jobs/pom-publisher.xml
Removed:
trunk/build/hudson-jobs/pom.xml
Log:
refactor pom.xml to pom-publisher.xml
Copied: trunk/build/hudson-jobs/pom-publisher.xml (from rev 27516, trunk/build/hudson-jobs/pom.xml)
===================================================================
--- trunk/build/hudson-jobs/pom-publisher.xml (rev 0)
+++ trunk/build/hudson-jobs/pom-publisher.xml 2010-12-16 08:06:17 UTC (rev 27537)
@@ -0,0 +1,84 @@
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.hudson.jobs.all</artifactId>
+ <name>org.jboss.tools.hudson.jobs.all</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugin</groupId>
+ <artifactId>hudson-job-publisher-plugin</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>install</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+<!--
+To be able to connect to server, must first import certificate or you may get this error:
+
+ javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
+
+AS USER (with Firefox):
+
+Browse to https://hudson.qa.jboss.com/hudson & accept the cert.
+
+ Edit > Preferences > Advanced > Encryption > View Certificates > find hudson cert > Export to file /tmp/hudson.qa.jboss.com.cert
+
+AS ROOT (default password is "changeit"):
+
+ # /opt/sun-java2-6.0/jre/bin/keytool -list -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts | grep hudson
+ # /opt/sun-java2-6.0/jre/bin/keytool -import -alias hudson.qa -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts -file /tmp/hudson.qa.jboss.com.cert
+ # /opt/sun-java2-6.0/jre/bin/keytool -list -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts | grep hudson
+
+To run, make sure that JAVA_HOME is set to the path where you imported the cert, eg.:
+
+ $ export JAVA_HOME=/opt/sun-java2-6.0/; mvn clean install
+-->
+ <!-- more output w/ verbose; default false -->
+ <verbose>true</verbose>
+
+ <!-- server and connection details -->
+ <hudsonURL>http://localhost:8080/</hudsonURL>
+ <!-- <hudsonURL>https://hudson.qa.jboss.com/hudson/</hudsonURL> -->
+ <username>SET USERNAME HERE</username>
+ <password>SET PASSWORD HERE</password>
+
+ <!-- default true: existing jobs will be overwritten; set false to throw
+ an error if job exists -->
+ <replaceExistingJob>true</replaceExistingJob>
+
+ <!-- local file path to use as template when publishing jobs -->
+ <jobTemplateFile>config.xml</jobTemplateFile>
+
+ <!-- job configuration: one buildURL -->
+ <buildURL>https://svn.jboss.org/repos/jbosstools/trunk/build</buildURL>
+ <!-- then many identically configured components -->
+ <components>TESTING</components>
+ <!-- <components>archives, as, birt, bpel, bpmn, cdi, common, deltacloud,
+ esb, examples, flow, freemarker, gwt, hibernatetools, jbpm, jmx, jsf, jst,
+ maven, modeshape, portlet, profiler, runtime, seam, smooks, struts, tptp,
+ usage, vpe, ws</components> -->
+
+ <componentJobNameSuffix>-TESTTESTTEST</componentJobNameSuffix>
+ <!-- then some special-case components (not in JBT tree) -->
+ <!--<properties> <property> <name>jbosstools-pi4soa-stable-branch</name>
+ <value>https://pi4soa.svn.sourceforge.net/svnroot/pi4soa/branches/pi4soa-3.1.x</value>
+ </property> <property> <name>jbosstools-teiid-designer-stable-branch</name>
+ <value>http://anonsvn.jboss.org/repos/tdesigner/branches/7.1</value> </property>
+ <property> <name>jbosstools-savara-stable-branch</name> <value>http://anonsvn.jboss.org/repos/savara/branches/1.1.x</value>
+ </property> </properties> -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
Deleted: trunk/build/hudson-jobs/pom.xml
===================================================================
--- trunk/build/hudson-jobs/pom.xml 2010-12-16 07:50:45 UTC (rev 27536)
+++ trunk/build/hudson-jobs/pom.xml 2010-12-16 08:06:17 UTC (rev 27537)
@@ -1,84 +0,0 @@
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.hudson.jobs.all</artifactId>
- <name>org.jboss.tools.hudson.jobs.all</name>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugin</groupId>
- <artifactId>hudson-job-publisher-plugin</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <executions>
- <execution>
- <phase>install</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
-<!--
-To be able to connect to server, must first import certificate or you may get this error:
-
- javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
-
-AS USER (with Firefox):
-
-Browse to https://hudson.qa.jboss.com/hudson & accept the cert.
-
- Edit > Preferences > Advanced > Encryption > View Certificates > find hudson cert > Export to file /tmp/hudson.qa.jboss.com.cert
-
-AS ROOT (default password is "changeit"):
-
- # /opt/sun-java2-6.0/jre/bin/keytool -list -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts | grep hudson
- # /opt/sun-java2-6.0/jre/bin/keytool -import -alias hudson.qa -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts -file /tmp/hudson.qa.jboss.com.cert
- # /opt/sun-java2-6.0/jre/bin/keytool -list -keystore /opt/sun-java2-6.0/jre/lib/security/cacerts | grep hudson
-
-To run, make sure that JAVA_HOME is set to the path where you imported the cert, eg.:
-
- $ export JAVA_HOME=/opt/sun-java2-6.0/; mvn clean install
--->
- <!-- more output w/ verbose; default false -->
- <verbose>true</verbose>
-
- <!-- server and connection details -->
- <hudsonURL>http://localhost:8080/</hudsonURL>
- <!-- <hudsonURL>https://hudson.qa.jboss.com/hudson/</hudsonURL> -->
- <username>SET USERNAME HERE</username>
- <password>SET PASSWORD HERE</password>
-
- <!-- default true: existing jobs will be overwritten; set false to throw
- an error if job exists -->
- <replaceExistingJob>true</replaceExistingJob>
-
- <!-- local file path to use as template when publishing jobs -->
- <jobTemplateFile>config.xml</jobTemplateFile>
-
- <!-- job configuration: one buildURL -->
- <buildURL>https://svn.jboss.org/repos/jbosstools/trunk/build</buildURL>
- <!-- then many identically configured components -->
- <components>TESTING</components>
- <!-- <components>archives, as, birt, bpel, bpmn, cdi, common, deltacloud,
- esb, examples, flow, freemarker, gwt, hibernatetools, jbpm, jmx, jsf, jst,
- maven, modeshape, portlet, profiler, runtime, seam, smooks, struts, tptp,
- usage, vpe, ws</components> -->
-
- <componentJobNameSuffix>-TESTTESTTEST</componentJobNameSuffix>
- <!-- then some special-case components (not in JBT tree) -->
- <!--<properties> <property> <name>jbosstools-pi4soa-stable-branch</name>
- <value>https://pi4soa.svn.sourceforge.net/svnroot/pi4soa/branches/pi4soa-3.1.x</value>
- </property> <property> <name>jbosstools-teiid-designer-stable-branch</name>
- <value>http://anonsvn.jboss.org/repos/tdesigner/branches/7.1</value> </property>
- <property> <name>jbosstools-savara-stable-branch</name> <value>http://anonsvn.jboss.org/repos/savara/branches/1.1.x</value>
- </property> </properties> -->
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
-
14 years
JBoss Tools SVN: r27536 - trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-16 02:50:45 -0500 (Thu, 16 Dec 2010)
New Revision: 27536
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
Log:
JBIDE-7899
https://issues.jboss.org/browse/JBIDE-7899
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2010-12-16 07:48:18 UTC (rev 27535)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2010-12-16 07:50:45 UTC (rev 27536)
@@ -29,11 +29,14 @@
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IStereotype;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
//import org.jboss.tools.cdi.ui.wizard.NewCDIAnnotationWizardPage;
import org.jboss.tools.cdi.ui.wizard.NewAnnotationLiteralWizardPage;
@@ -59,6 +62,7 @@
static String PACK_NAME = "test";
static String QUALIFIER_NAME = "MyQualifier";
static String STEREOTYPE_NAME = "MyStereotype";
+ static String STEREOTYPE2_NAME = "MyStereotype2";
static String SCOPE_NAME = "MyScope";
static String INTERCEPTOR_BINDING_NAME = "MyInterceptorBinding";
static String INTERCEPTOR_NAME = "MyInterceptor";
@@ -196,6 +200,30 @@
}
+ public void testNewStereotypeWizardWithStereotype() {
+ WizardContext context = new WizardContext();
+ context.init("org.jboss.tools.cdi.ui.wizard.NewStereotypeCreationWizard",
+ PACK_NAME, STEREOTYPE2_NAME);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(context.tck, true);
+ IStereotype s = cdi.getStereotype(PACK_NAME + "." + STEREOTYPE_NAME);
+ assertNotNull(s);
+
+ try {
+ NewStereotypeWizardPage page = (NewStereotypeWizardPage)context.page;
+ page.setInherited(true);
+ page.setTarget("METHOD,FIELD");
+ page.setNamed(true);
+ page.addStereotype(s);
+
+ String message = page.getErrorMessage();
+ String testmessage = NLS.bind(CDIUIMessages.MESSAGE_STEREOTYPE_CANNOT_BE_APPLIED_TO_TYPE, s.getSourceType().getElementName());
+ assertEquals(testmessage, message);
+ } finally {
+ context.close();
+ }
+
+ }
+
public void testNewScopeWizard() {
WizardContext context = new WizardContext();
context.init("org.jboss.tools.cdi.ui.wizard.NewScopeCreationWizard",
14 years
JBoss Tools SVN: r27535 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-16 02:48:18 -0500 (Thu, 16 Dec 2010)
New Revision: 27535
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
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/wizard/NewStereotypeWizardPage.java
Log:
JBIDE-7899
https://issues.jboss.org/browse/JBIDE-7899
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-12-16 07:22:46 UTC (rev 27534)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-12-16 07:48:18 UTC (rev 27535)
@@ -72,6 +72,8 @@
public static String MESSAGE_INTERCEPTOR_BINDINGS_EMPTY;
+ public static String MESSAGE_STEREOTYPE_CANNOT_BE_APPLIED_TO_TYPE;
+
public static String MESSAGE_QUALIFIER_NOT_SET;
public static String MAKE_FIELD_STATIC_MARKER_RESOLUTION_TITLE;
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-12-16 07:22:46 UTC (rev 27534)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-12-16 07:48:18 UTC (rev 27535)
@@ -56,6 +56,8 @@
MESSAGE_INTERCEPTOR_BINDINGS_EMPTY=Interceptor Bindings list is empty
+MESSAGE_STEREOTYPE_CANNOT_BE_APPLIED_TO_TYPE={0} cannot be applied to a type.
+
MESSAGE_QUALIFIER_NOT_SET=Qualifier is not set
MAKE_FIELD_STATIC_MARKER_RESOLUTION_TITLE=Make ''{0}'' field static
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java 2010-12-16 07:22:46 UTC (rev 27534)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java 2010-12-16 07:48:18 UTC (rev 27535)
@@ -18,14 +18,24 @@
import java.util.Set;
import java.util.TreeMap;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
+import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.CDIUtil;
+import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IStereotype;
+import org.jboss.tools.cdi.internal.core.validation.AnnotationValidationDelegate;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUIPlugin;
import org.jboss.tools.common.ui.widget.editor.ITaggedFieldEditor;
import org.jboss.tools.common.ui.widget.editor.ListFieldEditor;
@@ -44,6 +54,7 @@
protected ListFieldEditor stereotypes = null;
protected ListFieldEditor interceptorBindings = null;
+ protected StatusInfo targetStatus = new StatusInfo();
public NewStereotypeWizardPage() {
setTitle(CDIUIMessages.NEW_STEREOTYPE_WIZARD_PAGE_NAME);
@@ -150,6 +161,10 @@
targetOptions.add("METHOD");
targetOptions.add("FIELD");
createTargetField(composite, targetOptions);
+ target.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ validateTargetAndStereotype();
+ }});
}
protected void createInterceptorBindingField(Composite composite) {
@@ -176,6 +191,10 @@
stereotypesProvider.setEditorField(stereotypes);
stereotypes.doFillIntoGrid(composite);
setStereotypes(getPackageFragmentRoot());
+ stereotypes.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ validateTargetAndStereotype();
+ }});
}
public void setPackageFragmentRoot(IPackageFragmentRoot root, boolean canBeModified) {
@@ -237,5 +256,72 @@
public void setNamed(boolean b) {
if(named != null) named.composite.setValue(b);
}
+
+ void validateTargetAndStereotype() {
+ try {
+ getTargetAndStereotypeError();
+ } catch (JavaModelException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ }
+ doStatusUpdate();
+ }
+ private void doStatusUpdate() {
+ // status of all used components
+ IStatus[] status= new IStatus[] {
+ fContainerStatus,
+ isEnclosingTypeSelected() ? fEnclosingTypeStatus : fPackageStatus,
+ fTypeNameStatus,
+ fModifierStatus,
+ fSuperClassStatus,
+ fSuperInterfacesStatus
+ };
+
+ // the mode severe status will be displayed and the OK button enabled/disabled.
+ updateStatus(status);
+ }
+
+ protected void updateStatus(IStatus[] status) {
+ IStatus[] ns = new IStatus[status.length + 1];
+ System.arraycopy(status, 0, ns, 0, status.length);
+ ns[status.length] = targetStatus;
+ status = ns;
+ updateStatus(StatusUtil.getMostSevere(status));
+ }
+
+ void getTargetAndStereotypeError() throws JavaModelException {
+ targetStatus = new StatusInfo();
+ if(stereotypes != null && target != null) {
+ String value = (String)target.getValue();
+ boolean hasMethodOrField = value != null && (value.indexOf("METHOD") >= 0 || value.indexOf("FIELD") >= 0);
+ List list = (List)stereotypes.getValue();
+ for (Object o: list) {
+ if(o instanceof IStereotype) {
+ IStereotype a = (IStereotype)o;
+ IAnnotationDeclaration target = a.getAnnotationDeclaration(CDIConstants.TARGET_ANNOTATION_TYPE_NAME);
+ if(target != null) {
+ Set<String> targets = CDIUtil.getTargetAnnotationValues(target);
+ if(targets != null && targets.size() == 1 && targets.contains("TYPE") && hasMethodOrField) {
+ String message = a.getSourceType().getElementName() + " annotated with @Target({TYPE}) is not compatible with target";
+ targetStatus.setWarning(message);
+ }
+ if(targets != null && !targets.contains("TYPE")) {
+ String message = NLS.bind(CDIUIMessages.MESSAGE_STEREOTYPE_CANNOT_BE_APPLIED_TO_TYPE, a.getSourceType().getElementName());
+ targetStatus.setError(message);
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void addStereotype(IStereotype s) {
+ List vs = (List)stereotypes.getValue();
+ List nvs = new ArrayList();
+ if(vs != null) nvs.addAll(vs);
+ nvs.add(s);
+ stereotypes.setValue(nvs);
+ }
+
}
14 years
JBoss Tools SVN: r27534 - in trunk/cdi/tests: org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-12-16 02:22:46 -0500 (Thu, 16 Dec 2010)
New Revision: 27534
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer1.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer2.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducerLocal.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/LocalInt.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken1.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken2.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Terrier.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken1.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken2.qfxresult
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7673
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer1.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer1.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer1.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+
+@Stateful
+public class FooProducer implements FooProducerLocal
+{
+ @Produces public Foo createFoo() { return new Foo(); }
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer2.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer2.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducer2.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+import javax.ejb.LocalBean;
+
+@LocalBean
+@Stateful
+public class FooProducer implements FooProducerLocal
+{
+ @Produces public Foo createFoo() { return new Foo(); }
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducerLocal.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducerLocal.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/FooProducerLocal.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Local;
+
+@Local
+public interface FooProducerLocal
+{
+
+ public Foo createFoo();
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/LocalInt.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/LocalInt.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/LocalInt.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Local;
+import javax.persistence.EntityManager;
+
+@Local
+public interface LocalInt {
+
+ public void disposeEntityManager(EntityManager em);
+
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken1.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken1.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken1.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+@Stateful
+public class NotBusinessMethod_Broken implements LocalInt {
+ @PersistenceContext EntityManager em;
+
+ @Produces
+ public EntityManager retrieveEntityManager() {
+ return em;
+ }
+
+ public void disposeEntityManager(@Disposes EntityManager em) {
+ }
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken2.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken2.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken2.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.ejb.LocalBean;
+
+@LocalBean
+@Stateful
+public class NotBusinessMethod_Broken implements LocalInt {
+ @PersistenceContext EntityManager em;
+
+ @Produces
+ public EntityManager retrieveEntityManager() {
+ return em;
+ }
+
+ public void disposeEntityManager(@Disposes EntityManager em) {
+ }
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Terrier.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Terrier.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Terrier.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Local;
+
+@Local
+interface Terrier
+{
+
+ public void observeSomeEvent(String someEvent);
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken1.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken1.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken1.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateless;
+import javax.enterprise.event.Observes;
+
+@Stateless
+class TibetanTerrier_Broken implements Terrier
+{
+ public void observeSomeEvent(@Observes String someEvent)
+ {
+ }
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken2.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken2.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TibetanTerrier_Broken2.qfxresult 2010-12-16 07:22:46 UTC (rev 27534)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateless;
+import javax.enterprise.event.Observes;
+import javax.ejb.LocalBean;
+
+@LocalBean
+@Stateless
+class TibetanTerrier_Broken implements Terrier
+{
+ public void observeSomeEvent(@Observes String someEvent)
+ {
+ }
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2010-12-16 05:38:48 UTC (rev 27533)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2010-12-16 07:22:46 UTC (rev 27534)
@@ -178,6 +178,10 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducer.java",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducerLocal.java"
},
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducer1.qfxresult",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducerLocal.qfxresult"
+ },
MARKER_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
@@ -188,9 +192,11 @@
checkResolution(
tckProject,
new String[]{
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducer.java",
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducerLocal.java"
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducer.java"
},
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducer2.qfxresult",
+ },
MARKER_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
@@ -217,6 +223,10 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_Broken.java",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Terrier.java"
},
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_Broken1.qfxresult",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Terrier.qfxresult"
+ },
MARKER_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_OBSERVER_IN_SESSION_BEAN_ID,
@@ -226,9 +236,11 @@
public void testAddLocalBeanResolution2() throws CoreException {
checkResolution(tckProject,
new String[]{
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_Broken.java",
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Terrier.java"
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_Broken.java"
},
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_Broken2.qfxresult"
+ },
MARKER_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_OBSERVER_IN_SESSION_BEAN_ID,
@@ -255,6 +267,10 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken.java",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/LocalInt.java"
},
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken1.qfxresult",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/LocalInt.qfxresult"
+ },
MARKER_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_DISPOSER_IN_SESSION_BEAN_ID,
@@ -264,9 +280,11 @@
public void testAddLocalBeanResolution3() throws CoreException {
checkResolution(tckProject,
new String[]{
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken.java",
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/LocalInt.java"
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken.java"
},
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken2.qfxresult"
+ },
MARKER_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_DISPOSER_IN_SESSION_BEAN_ID,
14 years
JBoss Tools SVN: r27533 - in trunk/as/plugins: org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-12-16 00:38:48 -0500 (Thu, 16 Dec 2010)
New Revision: 27533
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogReader.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/ServerLogView.java
Log:
JBIDE-7814 - updates to server log view
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java 2010-12-15 21:41:16 UTC (rev 27532)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java 2010-12-16 05:38:48 UTC (rev 27533)
@@ -15,12 +15,16 @@
import java.util.HashMap;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.osgi.service.prefs.BackingStoreException;
public class ServerLogger {
+ private static final String RELOG_ERROR_PREF_KEY = "package org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger.RELOG_ERROR_PREF_KEY"; //$NON-NLS-1$
private static ServerLogger instance;
public static ServerLogger getDefault() {
if( instance == null ) {
@@ -56,6 +60,9 @@
map.put(server.getId(), log);
}
log.log(status);
+ if( shouldDoubleLogErrors() && status.getSeverity() == IStatus.ERROR) {
+ JBossServerCorePlugin.getDefault().getLog().log(status);
+ }
ArrayList<IServerLogListener> list = listeners.get(server.getId());
if( list != null ) {
@@ -66,6 +73,20 @@
}
}
+ public static boolean shouldDoubleLogErrors() {
+ IEclipsePreferences prefs = new InstanceScope().getNode(JBossServerCorePlugin.PLUGIN_ID);
+ return prefs.getBoolean(RELOG_ERROR_PREF_KEY, true);
+ }
+
+ public static void setDoubleLogErrors(boolean val) {
+ IEclipsePreferences prefs = new InstanceScope().getNode(JBossServerCorePlugin.PLUGIN_ID);
+ prefs.putBoolean(RELOG_ERROR_PREF_KEY, val);
+ try {
+ prefs.flush();
+ } catch( BackingStoreException bse) {
+ }
+ }
+
public static File getServerLogFile(IServer server) {
File f = JBossServerCorePlugin.getServerStateLocation(
server).append(IJBossToolingConstants.LOG).toFile();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-12-15 21:41:16 UTC (rev 27532)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-12-16 05:38:48 UTC (rev 27533)
@@ -231,6 +231,9 @@
public static String LogLabelProvider_SecondsAgo;
public static String LogLabelProvider_StartupShutdownEventType;
public static String LogLabelProvider_UnknownEventType;
+ public static String LogAction_AlsoLogErrorsToErrorLog;
+ public static String LogAction_DoNotLogErrorsToErrorLog;
+
public static String RequiredCredentialsDialog_IgnoreButton;
public static String RequiredCredentialsDialog_ShellText;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-12-15 21:41:16 UTC (rev 27532)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-12-16 05:38:48 UTC (rev 27533)
@@ -61,7 +61,7 @@
ServerContentProvider_ErrorInServersViewAnimation=Error in Servers view animation
ServerDialogHeading=JBoss Server
ServerLogView_ImportingLogTaskName=Importing Server Log
-ServerLogView_NoLogSelected=No Log Selected
+ServerLogView_NoLogSelected=Please select a server in the Servers View
#View's Module extension
DeleteModuleText=Remove
@@ -202,5 +202,8 @@
LogLabelProvider_SecondsAgo={0} seconds ago
LogLabelProvider_StartupShutdownEventType=Server Startup / Shutdown
LogLabelProvider_UnknownEventType=Unknown Event Type
+LogAction_AlsoLogErrorsToErrorLog=Also log errors to the Error Log
+LogAction_DoNotLogErrorsToErrorLog=Don't log errors to the Error Log
+
RequiredCredentialsDialog_IgnoreButton=Ignore
RequiredCredentialsDialog_ShellText=Server Credentials Required
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogReader.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogReader.java 2010-12-15 21:41:16 UTC (rev 27532)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogReader.java 2010-12-16 05:38:48 UTC (rev 27533)
@@ -25,7 +25,7 @@
private static final int UNKNOWN_STATE = 70;
public static LogSession parseLogFile(File file, List entries, IMemento memento) {
- if (!file.exists())
+ if (file == null || !file.exists())
return null;
// if (memento.getString(LogView.P_USE_LIMIT).equals("true") //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/ServerLogView.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/ServerLogView.java 2010-12-15 21:41:16 UTC (rev 27532)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/ServerLogView.java 2010-12-16 05:38:48 UTC (rev 27533)
@@ -10,7 +10,6 @@
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
-import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
@@ -23,15 +22,15 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.util.Policy;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -52,14 +51,19 @@
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IMemento;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.XMLMemento;
import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.internal.views.log.Messages;
import org.eclipse.ui.internal.views.log.SharedImages;
import org.eclipse.ui.part.FileEditorInput;
@@ -70,7 +74,7 @@
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-public class ServerLogView extends ViewPart implements IServerLogListener {
+public class ServerLogView extends ViewPart implements IServerLogListener, ISelectionListener {
public static final String VIEW_ID = "org.jboss.ide.eclipse.as.ui.view.serverLogView"; //$NON-NLS-1$
public final static byte MESSAGE = 0x0;
public final static byte DATE = 0x1;
@@ -90,7 +94,8 @@
private String fDirectory;
private IMemento fMemento;
private Action fDeleteLogAction, fOpenLogAction,
- fReadLogAction, fExportLogAction;
+ fReadLogAction, fExportLogAction,
+ fReLogErrorsAction;
private TreeColumn fColumn1;
private TreeColumn fColumn2;
private Comparator fComparator;
@@ -102,6 +107,8 @@
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
+ ISelectionService service = (ISelectionService) getSite().getService(ISelectionService.class);
+ service.addSelectionListener(this);
if (memento == null)
this.fMemento = XMLMemento.createWriteRoot("SERVERLOGVIEW"); //$NON-NLS-1$
else
@@ -163,6 +170,10 @@
IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
+ fReLogErrorsAction = createReLogErrorAction();
+ updateReLogActionText();
+ toolBarManager.add(fReLogErrorsAction);
+ toolBarManager.add(new Separator());
fExportLogAction = createExportLogAction();
toolBarManager.add(fExportLogAction);
toolBarManager.add(new Separator());
@@ -174,7 +185,6 @@
toolBarManager.add(fOpenLogAction);
fReadLogAction = createReadLogAction();
toolBarManager.add(fReadLogAction);
-
setLogFile(null);
}
@@ -227,6 +237,8 @@
}
public void dispose() {
+ ISelectionService service = (ISelectionService) getSite().getService(ISelectionService.class);
+ service.removeSelectionListener(this);
super.dispose();
}
@@ -237,26 +249,38 @@
reloadLog();
}
- protected void reloadLog() {
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- monitor.beginTask(org.jboss.ide.eclipse.as.ui.Messages.ServerLogView_ImportingLogTaskName, IProgressMonitor.UNKNOWN);
- List<AbstractEntry> entries = new ArrayList<AbstractEntry>();
- LogReader.parseLogFile(fInputFile, entries, fMemento);
+ private class ReloadLogJob extends Job {
+
+ public ReloadLogJob() {
+ super(org.jboss.ide.eclipse.as.ui.Messages.ServerLogView_ImportingLogTaskName);
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ List<AbstractEntry> entries = new ArrayList<AbstractEntry>();
+ LogReader.parseLogFile(fInputFile, entries, fMemento);
+ if( !monitor.isCanceled()) {
elements.addAll(entries);
+ Display.getDefault().asyncExec(new Runnable(){
+ public void run(){
+ asyncRefresh(false);
+ updateButtons();
+ }
+ });
}
- };
- ProgressMonitorDialog pmd = new ProgressMonitorDialog(getViewSite().getShell());
- try {
- pmd.run(true, true, op);
- } catch (InvocationTargetException e) { // do nothing
- } catch (InterruptedException e) { // do nothing
- } finally {
- asyncRefresh(false);
- updateButtons();
+ return Status.OK_STATUS;
}
}
+
+ private ReloadLogJob reloadJob = null;
+ protected void reloadLog() {
+ if( reloadJob != null && reloadJob.getResult() == null ) {
+ reloadJob.cancel();
+ }
+
+ reloadJob = new ReloadLogJob();
+ reloadJob.schedule();
+ }
private void updateButtons() {
fDeleteLogAction.setEnabled(exists(fInputFile));
@@ -428,6 +452,30 @@
return action;
}
+ private Action createReLogErrorAction() {
+ Action action = new Action("") {
+ public void run() {
+ handleLogErrorAction();
+ }
+ };
+ action.setImageDescriptor(SharedImages.getImageDescriptor(SharedImages.DESC_ERROR_ST_OBJ));
+ return action;
+ }
+
+ private void handleLogErrorAction() {
+ boolean currentVal = ServerLogger.shouldDoubleLogErrors();
+ ServerLogger.setDoubleLogErrors(!currentVal);
+ updateReLogActionText();
+ }
+
+ private void updateReLogActionText() {
+ String newVal = !ServerLogger.shouldDoubleLogErrors() ?
+ org.jboss.ide.eclipse.as.ui.Messages.LogAction_DoNotLogErrorsToErrorLog :
+ org.jboss.ide.eclipse.as.ui.Messages.LogAction_AlsoLogErrorsToErrorLog;
+ fReLogErrorsAction.setText(newVal);
+ fReLogErrorsAction.setToolTipText(newVal);
+ }
+
private Action createExportLogAction() {
Action action = new Action(Messages.LogView_export) {
public void run() {
@@ -640,5 +688,17 @@
};
}
}
+
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ if( selection != null && selection instanceof IStructuredSelection ) {
+ IStructuredSelection sel2 = (IStructuredSelection)selection;
+ if( sel2.size() > 0 ) {
+ Object o = sel2.getFirstElement();
+ if( o instanceof IServer ) {
+ setServer((IServer)o);
+ }
+ }
+ }
+ }
}
14 years
JBoss Tools SVN: r27532 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-12-15 16:41:16 -0500 (Wed, 15 Dec 2010)
New Revision: 27532
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated with added fixed issues
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-12-15 21:31:52 UTC (rev 27531)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-12-15 21:41:16 UTC (rev 27532)
@@ -25,6 +25,21 @@
<itemizedlist>
<listitem>
<para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7897">JBIDE-7897</ulink>: Stereotypes that were declared with <property>@Target(type)</property> annotation could not be applied to steretypes where the <property>@Target</property> annotaiton only accepted values of <property>type, method, field</property>, <property>method</property>, <property>field</property> or <property>method, field</property>. This has been corrected for this release. A stereotype allows a developer to use the same recurring bean role within a framework.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7895">JBIDE-7895</ulink>: A bug existed that would cause interceptor binding types that were declared using the <property>@Target(type)</property> annotation to not be applied correctly to interceptor binding types declared using <property>@Target({type, method})</property> annotation. This bug has now been corrected by modifying the following files: <filename>CDICoreValidator.java</filename>, <filename>AnnotationValidationDelegate.java</filename> and <filename>CDIValidationMessages.java</filename>. This now allows interceptor binding types that are declared using the <property>@Target(type)</property> annotation to be applied correctly to interceptor binding types declared using <property>@Target({type, method})</property> annotation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7894">JBIDE-7894</ulink>: Stereotype declaration has been improved for this release. If the stereotype role declares interceptor bindings it must also be defined using the <property>@Target(type)</property> annotation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-7842">JBIDE-7842</ulink>: A new wizard has been added for the <filename>beans.xml</filename> file. This new wizard uses the <guilabel>New File</guilabel> wizard as a foundation, setting the <guilabel>File Name</guilabel> input field set to <filename>beans.xml</filename> and the <guilabel>Parent Folder</guilabel> to the projects <filename>beans.xml</filename> default location (if determinable).
</para>
</listitem>
14 years
JBoss Tools SVN: r27531 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-15 16:31:52 -0500 (Wed, 15 Dec 2010)
New Revision: 27531
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
Log:
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-12-15 21:31:38 UTC (rev 27530)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-12-15 21:31:52 UTC (rev 27531)
@@ -279,23 +279,20 @@
<handler
class="org.jboss.tools.deltacloud.ui.commands.CreateInstanceFromAnyImageHandler"
commandId="org.jboss.tools.deltacloud.ui.createinstanceFromAnyImage">
- <activeWhen>
+ <enabledWhen>
<with
variable="selection">
- <iterate operator="and">
- <adapt
- type="org.jboss.tools.deltacloud.core.DeltaCloud">
- <test property="org.jboss.tools.deltacloud.ui.commands.hasImages"
- value="true"/>
- </adapt>
- </iterate>
+ <and>
+ <count value="+" />
+ <iterate operator="and">
+ <adapt
+ type="org.jboss.tools.deltacloud.core.DeltaCloud">
+ <test property="org.jboss.tools.deltacloud.ui.commands.hasImages"
+ value="true"/>
+ </adapt>
+ </iterate>
+ </and>
</with>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <count value="+" />
- </with>
</enabledWhen>
</handler>
</extension>
14 years
JBoss Tools SVN: r27530 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-15 16:31:38 -0500 (Wed, 15 Dec 2010)
New Revision: 27530
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
Log:
[JBIDE-7917] fixed error reporting
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2010-12-15 21:31:05 UTC (rev 27529)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2010-12-15 21:31:38 UTC (rev 27530)
@@ -125,11 +125,11 @@
}
if (instance != null && instance.getState().equals(DeltaCloudInstance.State.PENDING)) {
// TODO use chained job? Maybe. But chainedJob needs to be moved
- ChainedJob first =
- new InstanceStateJob(
- WizardMessages.getFormattedString(STARTING_INSTANCE_TITLE, instance.getName()),
- instance,
- DeltaCloudInstance.State.RUNNING);
+ ChainedJob first =
+ new InstanceStateJob(
+ WizardMessages.getFormattedString(STARTING_INSTANCE_TITLE, instance.getName()),
+ instance,
+ DeltaCloudInstance.State.RUNNING);
first.setUser(true);
ChainedJob last = first;
ChainedJob temp;
@@ -148,8 +148,8 @@
if (!result) {
ErrorUtils.handleError(
WizardMessages.getString(CREATE_INSTANCE_FAILURE_TITLE),
- WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG, new String[] { name, imageId,
- realmId, profileId }),
+ WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG,
+ new String[] { name, imageId, realmId, profileId }),
e, getShell());
}
return result;
14 years
JBoss Tools SVN: r27529 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools: internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-15 16:31:05 -0500 (Wed, 15 Dec 2010)
New Revision: 27529
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
[JBIDE-7917] fixed error reporting
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java 2010-12-15 21:26:15 UTC (rev 27528)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java 2010-12-15 21:31:05 UTC (rev 27529)
@@ -25,7 +25,7 @@
public class ErrorUtils {
public static IStatus handleError(final String title, final String message, Throwable e, final Shell shell) {
IStatus status = createStatus(e);
- openErrorDialog(title, status, shell);
+ openErrorDialog(title, message, status, shell);
log(status);
return status;
}
@@ -64,13 +64,13 @@
}
}
- private static void openErrorDialog(final String title, final IStatus status, final Shell shell) {
+ private static void openErrorDialog(final String title, String message, final IStatus status, final Shell shell) {
// Display.getDefault().syncExec(new Runnable() {
// public void run() {
// ErrorDialog.openError(shell, title, status.getMessage(), status);
// }
// });
- ErrorDialog.openError(shell, title, status.getMessage(), status);
+ ErrorDialog.openError(shell, title, message, status);
}
public static IStatus createMultiStatus(DeltaCloudMultiException throwable) {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-12-15 21:26:15 UTC (rev 27528)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-12-15 21:31:05 UTC (rev 27529)
@@ -61,8 +61,8 @@
Defaulted=Defaulted
Loading.value=Loading...
-CreateInstanceError.title=Launch Instance Failure
-CreateInstanceError.msg=The attempt to launch instance: name={0}, image={1}, realm={2}, profile={3}
+CreateInstanceError.title=Error
+CreateInstanceError.msg=Could not launch instance \"{0}\" from image \"{1}\" using realm \"{2}\" and profile \"{3}\"
CreateInstanceErrorReason.msg=Server did not launch instance
ConfirmCreate.title=Confirm Launch Instance
14 years