JBoss Tools SVN: r25841 - branches/jbosstools-3.2.0.Beta1/documentation/guides/GettingStartedGuide.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-10-14 16:20:04 -0400 (Thu, 14 Oct 2010)
New Revision: 25841
Modified:
branches/jbosstools-3.2.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml
Log:
updated for org styles
Modified: branches/jbosstools-3.2.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml 2010-10-14 19:59:23 UTC (rev 25840)
+++ branches/jbosstools-3.2.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml 2010-10-14 20:20:04 UTC (rev 25841)
@@ -15,27 +15,27 @@
<id>release</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-release.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-release.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
</properties>
</profile>
<profile>
<id>releaseTest</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release-nomarker.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release-nomarker.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-release-nomarker.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-release-nomarker.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
</properties>
</profile>
<profile>
<id>releaseJBDS</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-release.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-release.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
<cssdir>${pom.basedir}/target/docbook/staging/css/com/css</cssdir>
</properties>
</profile>
@@ -43,9 +43,9 @@
<id>diffmk</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-diff.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-diff.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf-diff.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-diff.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-diff.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf-diff.xsl</xsl-pdf>
</properties>
</profile>
</profiles>
@@ -103,7 +103,7 @@
</format>
<format>
<formatName>eclipse</formatName>
- <stylesheetResource>classpath:/xslt/com/jboss/tools/eclipse.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/tools/eclipse.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -168,11 +168,11 @@
</distributionManagement>
<properties>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
<stylesdir>classpath:/xslt</stylesdir>
- <cssdir>${pom.basedir}/target/docbook/staging/css/com/css</cssdir>
+ <cssdir>${pom.basedir}/target/docbook/staging/css/org/css</cssdir>
<master>master.xml</master>
</properties>
</project>
14 years, 3 months
JBoss Tools SVN: r25840 - branches/jbosstools-3.2.0.Beta1/documentation/guides/Beginners_Guide.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-10-14 15:59:23 -0400 (Thu, 14 Oct 2010)
New Revision: 25840
Modified:
branches/jbosstools-3.2.0.Beta1/documentation/guides/Beginners_Guide/pom.xml
Log:
updated for org styles
Modified: branches/jbosstools-3.2.0.Beta1/documentation/guides/Beginners_Guide/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.Beta1/documentation/guides/Beginners_Guide/pom.xml 2010-10-14 19:37:51 UTC (rev 25839)
+++ branches/jbosstools-3.2.0.Beta1/documentation/guides/Beginners_Guide/pom.xml 2010-10-14 19:59:23 UTC (rev 25840)
@@ -14,27 +14,27 @@
<id>release</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-release.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-release.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
</properties>
</profile>
<profile>
<id>releaseTest</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release-nomarker.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release-nomarker.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-release-nomarker.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-release-nomarker.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
</properties>
</profile>
<profile>
<id>releaseJBDS</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-release.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-release.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
<cssdir>${pom.basedir}/target/docbook/staging/css/com/css</cssdir>
</properties>
</profile>
@@ -42,9 +42,9 @@
<id>diffmk</id>
<properties>
<master>master_output.xml</master>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-diff.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-diff.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf-diff.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single-diff.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml-diff.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf-diff.xsl</xsl-pdf>
</properties>
</profile>
</profiles>
@@ -100,7 +100,7 @@
</format>
<format>
<formatName>eclipse</formatName>
- <stylesheetResource>classpath:/xslt/com/jboss/tools/eclipse.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/tools/eclipse.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -161,11 +161,11 @@
</snapshotRepository>
</distributionManagement>
<properties>
- <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single.xsl</xsl-single>
- <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml.xsl</xsl-chunked>
- <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+ <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single.xsl</xsl-single>
+ <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml.xsl</xsl-chunked>
+ <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
<stylesdir>classpath:/xslt</stylesdir>
- <cssdir>${pom.basedir}/target/docbook/staging/css/com/css</cssdir>
+ <cssdir>${pom.basedir}/target/docbook/staging/css/org/css</cssdir>
<master>master.xml</master>
</properties>
</project>
14 years, 3 months
JBoss Tools SVN: r25839 - in trunk: cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 17 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-10-14 15:37:51 -0400 (Thu, 14 Oct 2010)
New Revision: 25839
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/el.jsp
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/lineNumbers.xhtml
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/validation/
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.properties
trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml
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/CDIValidationErrorManager.java
trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.properties
trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.properties
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/action/EnableKBOnProject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.properties
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7147 Limited the number of problem markers per file.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.properties 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.properties 2010-10-14 19:37:51 UTC (rev 25839)
@@ -0,0 +1 @@
+KBProblemName=CDI Problem
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2010-10-14 19:37:51 UTC (rev 25839)
@@ -96,6 +96,13 @@
<initializer class="org.jboss.tools.cdi.core.preferences.CDIPreferenceInitializer"/>
</extension>
+ <extension id="cdiproblem" name="%KBProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.jboss.tools.jst.web.kb.kbproblemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
<extension
point="org.jboss.tools.jst.web.kb.validator">
<validator
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-10-14 19:14:12 UTC (rev 25838)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -98,7 +98,8 @@
* @author Alexey Kazakov
*/
public class CDICoreValidator extends CDIValidationErrorManager implements IValidator {
- public static final String ID = "org.jboss.tools.cdi.core.CoreValidator";
+ public static final String ID = "org.jboss.tools.cdi.core.CoreValidator"; //$NON-NLS-1$
+ public static final String PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem"; //$NON-NLS-1$
ICDIProject cdiProject;
String projectName;
@@ -109,6 +110,15 @@
/*
* (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
+ */
+ @Override
+ public String getMarkerType() {
+ return PROBLEM_TYPE;
+ }
+
+ /*
+ * (non-Javadoc)
*
* @see org.jboss.tools.jst.web.kb.validation.IValidator#getId()
*/
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.core.preferences.CDIPreferences;
import org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager;
-public class CDIValidationErrorManager extends ValidationErrorManager {
+abstract public class CDIValidationErrorManager extends ValidationErrorManager {
/*
* (non-Javadoc)
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.properties 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.properties 2010-10-14 19:37:51 UTC (rev 25839)
@@ -1,4 +1,6 @@
providerName=JBoss by Red Hat
pluginName=ESB Validator Plugin
-PreferencePage_Validator=ESB Validator
\ No newline at end of file
+PreferencePage_Validator=ESB Validator
+
+KBProblemName=ESB Problem
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml 2010-10-14 19:37:51 UTC (rev 25839)
@@ -6,6 +6,13 @@
<initializer class="org.jboss.tools.esb.validator.ESBPreferenceInitializer"/>
</extension>
+ <extension id="esbproblem" name="%KBProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.jboss.tools.jst.web.kb.kbproblemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
<extension
point="org.jboss.tools.jst.web.kb.validator">
<validator
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -7,7 +7,6 @@
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
-import java.util.TreeSet;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
@@ -21,7 +20,6 @@
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.model.util.PositionSearcher;
import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.esb.core.ESBProjectConstant;
import org.jboss.tools.esb.core.facet.IJBossESBFacetDataModelProperties;
@@ -38,6 +36,7 @@
public class ESBCoreValidator extends ESBValidationErrorManager implements IValidator {
public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
+ public static final String PROBLEM_TYPE = "org.jboss.tools.esb.validator.esbproblem"; //$NON-NLS-1$
static String XML_EXT = ".xml"; //$NON-NLS-1$
static String ATTR_PATH = "path"; //$NON-NLS-1$
@@ -46,6 +45,15 @@
String projectName;
Map<IProject, IValidationContext> contexts = new HashMap<IProject, IValidationContext>();
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
+ */
+ @Override
+ public String getMarkerType() {
+ return PROBLEM_TYPE;
+ }
+
public String getId() {
return ID;
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -13,7 +13,7 @@
import org.eclipse.core.resources.IProject;
import org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager;
-public class ESBValidationErrorManager extends ValidationErrorManager {
+abstract public class ESBValidationErrorManager extends ValidationErrorManager {
/*
* (non-Javadoc)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.properties 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.properties 2010-10-14 19:37:51 UTC (rev 25839)
@@ -5,4 +5,6 @@
JSF2_ComponentsValidator.name = JSF2 Components Validator
-JSF2ProblemName = JSF 2 Problem
\ No newline at end of file
+JSF2ProblemName = JSF 2 Problem
+
+KBProblemName=JSF EL Problem
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-10-14 19:37:51 UTC (rev 25839)
@@ -488,6 +488,13 @@
<initializer class="org.jboss.tools.jsf.preferences.JSFPreferenceInitializer"/>
</extension>
+ <extension id="elproblem" name="%KBProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.jboss.tools.jst.web.kb.kbproblemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
<extension
point="org.jboss.tools.jst.web.kb.validator">
<validator
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -20,7 +20,6 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -77,6 +76,7 @@
public class ELValidator extends ValidationErrorManager implements IValidator {
public static final String ID = "org.jboss.tools.jsf.ELValidator"; //$NON-NLS-1$
+ public static final String PROBLEM_TYPE = "org.jboss.tools.jsf.elproblem"; //$NON-NLS-1$
private ELResolver[] resolvers;
protected ELParserFactory mainFactory;
@@ -92,6 +92,15 @@
/*
* (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
+ */
+ @Override
+ public String getMarkerType() {
+ return PROBLEM_TYPE;
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.validation.IValidator#isEnabled(org.eclipse.core.resources.IProject)
*/
public boolean isEnabled(IProject project) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -57,7 +57,7 @@
IMarker marker = markers[i];
String _type = marker.getType();
if (_type != null
- && _type.equals(KbProject.KB_PROBLEM_MARKER_TYPE)) {
+ && _type.equals(KbProject.KB_BUILDER_PROBLEM_MARKER_TYPE)) {
kbProblemMarker = marker;
break;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -239,7 +239,7 @@
IMarker marker = markers[i];
String _type = marker.getType();
if (_type != null
- && _type.equals(KbProject.KB_PROBLEM_MARKER_TYPE)) {
+ && _type.equals(KbProject.KB_BUILDER_PROBLEM_MARKER_TYPE)) {
kbProblemMarker = marker;
break;
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/el.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/el.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/el.jsp 2010-10-14 19:37:51 UTC (rev 25839)
@@ -0,0 +1,3 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<h:outputText value="#{user.name1}" />
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/el.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/lineNumbers.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/lineNumbers.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/lineNumbers.xhtml 2010-10-14 19:37:51 UTC (rev 25839)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+ <h:outputText value="#{wrongUserName}"/>
+
+</ui:composition>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/lineNumbers.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -1,6 +1,8 @@
package org.jboss.tools.jsf.test.validation;
import java.text.MessageFormat;
+import java.util.HashSet;
+import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
@@ -11,10 +13,15 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.validation.ValidationFramework;
import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.operations.WorkbenchReporter;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.preferences.JSFSeverityPreferences;
+import org.jboss.tools.jsf.web.validation.ELValidator;
import org.jboss.tools.jsf.web.validation.JSFValidationMessages;
+import org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
+import org.jboss.tools.jst.web.kb.validation.IValidator;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
public class ELValidatorTest extends AbstractResourceMarkerTest{
@@ -34,54 +41,88 @@
store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.ERROR);
- copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.1");
-
- assertMarkerIsCreatedForLine(
- "WebContent/testElRevalidation.xhtml",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
- new Object[] {"user"},
- 14);
-
- // Check if the validator was not invoked.
- copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.original");
-
- assertMarkerIsNotCreatedForLine(
- "WebContent/testElRevalidation.xhtml",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
- new Object[] {"user"},
- 14);
-
- store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
- store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.IGNORE);
+ try {
+ copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.1");
+
+ assertMarkerIsCreatedForLine(
+ "WebContent/testElRevalidation.xhtml",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"user"},
+ 14);
+
+ // Check if the validator was not invoked.
+ copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.original");
+
+ assertMarkerIsNotCreatedForLine(
+ "WebContent/testElRevalidation.xhtml",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"user"},
+ 14);
+ } finally {
+ store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.IGNORE);
+ }
}
public void testRevalidationUnresolvedELs() throws CoreException, ValidationException{
IPreferenceStore store = JSFModelPlugin.getDefault().getPreferenceStore();
store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.DISABLE);
store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.ERROR);
-
- copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.1");
-
- assertMarkerIsCreatedForLine(
- "WebContent/testElRevalidation.xhtml",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
- new Object[] {"user"},
- 14);
- // Check if the validator was not invoked.
- copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.original");
-
- assertMarkerIsNotCreatedForLine(
- "WebContent/testElRevalidation.xhtml",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
- new Object[] {"user"},
- 14);
+ try {
+ copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.1");
+
+ assertMarkerIsCreatedForLine(
+ "WebContent/testElRevalidation.xhtml",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"user"},
+ 14);
- store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
- store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.IGNORE);
+ IFile file = project.getFile("WebContent/testElRevalidation.xhtml");
+ file.deleteMarkers(IValidator.KB_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ZERO);
+
+ // Check if the validator was not invoked.
+ copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.original");
+
+ assertMarkerIsNotCreatedForLine(
+ "WebContent/testElRevalidation.xhtml",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"user"},
+ 14);
+ } finally {
+ store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.IGNORE);
+ }
}
/**
+ * See https://jira.jboss.org/browse/JBIDE-7067
+ * @throws CoreException
+ * @throws ValidationException
+ */
+ public void testELValidationEnablement() throws CoreException, ValidationException {
+ JSFModelPlugin.getDefault().getPreferenceStore().setValue(JSFSeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, false);
+
+ try {
+ IFile file = project.getFile("WebContent/pages/el.jsp");
+
+ file.deleteMarkers(IValidator.KB_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ZERO);
+ validateFile("WebContent/pages/el.jsp", 0);
+
+ int number = getMarkersNumberByGroupName(IValidator.KB_PROBLEM_MARKER_TYPE, file, IValidator.MARKED_RESOURCE_MESSAGE_GROUP);
+ assertEquals("Problem marker was found.", 0, number);
+
+ JSFModelPlugin.getDefault().getPreferenceStore().setValue(JSFSeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ validateFile("WebContent/pages/el.jsp", 0);
+
+ number = getMarkersNumberByGroupName(IValidator.KB_PROBLEM_MARKER_TYPE, file, IValidator.MARKED_RESOURCE_MESSAGE_GROUP);
+ assertEquals("Problem marker was not found.", 1, number);
+ } finally {
+ JSFModelPlugin.getDefault().getPreferenceStore().setValue(JSFSeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ }
+ }
+
+ /**
* See https://jira.jboss.org/browse/JBIDE-7147
* @throws CoreException
*/
@@ -95,12 +136,12 @@
try {
assertMarkerIsCreatedForLine(
"WebContent/pages/maxNumberOfMarkers.jsp",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_NAME,
new Object[] {"wrongUserName"},
3);
assertMarkerIsNotCreatedForLine(
"WebContent/pages/maxNumberOfMarkers.jsp",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_NAME,
new Object[] {"wrongUserName2"},
4);
@@ -108,12 +149,12 @@
assertMarkerIsCreatedForLine(
"WebContent/pages/maxNumberOfMarkers.jsp",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_NAME,
new Object[] {"wrongUserName"},
3);
assertMarkerIsCreatedForLine(
"WebContent/pages/maxNumberOfMarkers.jsp",
- JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_NAME,
new Object[] {"wrongUserName2"},
4);
} finally {
@@ -122,6 +163,73 @@
}
}
+ /**
+ * See https://jira.jboss.org/browse/JBIDE-7264
+ * @throws CoreException
+ * @throws ValidationException
+ */
+ public void testPerformanceOfCalculatingLineNumbers() throws CoreException, ValidationException {
+ IPreferenceStore store = JSFModelPlugin.getDefault().getPreferenceStore();
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.ERROR);
+
+ try {
+ IFile file = project.getFile("WebContent/pages/lineNumbers.xhtml");
+ String messagePattern = MessageFormat.format(JSFValidationMessages.UNKNOWN_EL_VARIABLE_NAME, new Object[] {"wrongUserName"});
+
+ long time = validateFile("WebContent/pages/lineNumbers.xhtml", 100);
+ System.out.println("Time: " + time);
+ int[] lines = new int[100];
+ for (int i = 8; i < 108; i++) {
+ lines[i-8]=i;
+ }
+ assertMarkerIsCreated(file, ELValidator.PROBLEM_TYPE, messagePattern, lines);
+ time = validateFile("WebContent/pages/lineNumbers.xhtml", 100);
+ System.out.println("Time: " + time);
+ } finally {
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.IGNORE);
+ }
+ }
+
+ private long validateFile(String fileName, int numberOfMarkers) throws ValidationException {
+ Set<String> files = new HashSet<String>();
+ files.add(fileName);
+ return validateFile(files, numberOfMarkers);
+ }
+
+ private long validateFile(Set<String> fileNames, int numberOfMarkers) throws ValidationException {
+ IPreferenceStore store = JSFModelPlugin.getDefault().getPreferenceStore();
+ int max = store.getInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+ if(numberOfMarkers>0) {
+ store.setValue(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, numberOfMarkers);
+ }
+ String errorSeverity = store.getString(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME);
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.ERROR);
+
+ try {
+ ELValidator validator = new ELValidator();
+
+ ContextValidationHelper helper = new ContextValidationHelper();
+ helper.setProject(project);
+ helper.initialize();
+ Set<IFile> files = new HashSet<IFile>();
+ for (String fileName : fileNames) {
+ IFile file = project.getFile(fileName);
+ helper.registerResource(file);
+ files.add(file);
+ }
+ ValidatorManager manager = new ValidatorManager();
+ WorkbenchReporter reporter = new WorkbenchReporter(project, new NullProgressMonitor());
+
+ long current = System.currentTimeMillis();
+ validator.validate(files, project, helper, manager, reporter);
+ long result = System.currentTimeMillis() - current;
+ return result;
+ } finally {
+ store.setValue(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, max);
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, errorSeverity);
+ }
+ }
+
private void assertMarkerIsCreatedForLine(String fileName, String template, Object[] parameters, int lineNumber) throws CoreException{
String messagePattern = MessageFormat.format(template, parameters);
IFile file = project.getFile(fileName);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -28,7 +28,6 @@
import org.jboss.tools.jsf.jsp.ca.test.JsfJspJbide6259Test;
import org.jboss.tools.jsf.jsp.ca.test.WebContentAssistProviderTest;
import org.jboss.tools.jsf.ui.test.refactoring.ELReferencesRenameTest;
-import org.jboss.tools.jsf.ui.test.validation.ELValidationTest;
import org.jboss.tools.test.util.ProjectImportTestSetup;
public class JsfUiAllTests {
@@ -80,10 +79,6 @@
"org.jboss.tools.jsf.ui.test",
new String[]{"projects/test_jsf_project"},
new String[]{"test_jsf_project"}));
- suite.addTest(new ProjectImportTestSetup(new TestSuite(
- ELValidationTest.class), "org.jboss.tools.jsf.ui.test", //$NON-NLS-1$
- new String[] { "projects/testJSFProject", }, //$NON-NLS-1$
- new String[] { "testJSFProject" })); //$NON-NLS-1$
return new TestWizardsProject(suite);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.properties 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.properties 2010-10-14 19:37:51 UTC (rev 25839)
@@ -3,4 +3,5 @@
Bundle-Name.0 = Web KB
# END NON-TRANSLATABLE
-KBProblemName=KB Problem
\ No newline at end of file
+KBProblemName=KB Problem
+KBBuilderProblemName=KB Builder Problem
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2010-10-14 19:37:51 UTC (rev 25839)
@@ -125,19 +125,26 @@
</cssholder>
</extension>
- <extension id="kbproblemmarker" name="%KBProblemName" point="org.eclipse.core.resources.markers">
+ <extension id="kbBuilderProblemMarker" name="%KBBuilderProblemName" point="org.eclipse.core.resources.markers">
<super type="org.eclipse.core.resources.problemmarker">
</super>
<persistent value="true">
</persistent>
</extension>
+ <extension id="kbproblemmarker" name="%KBProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.wst.validation.problemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
<extension point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
- markerType="org.jboss.tools.jst.web.kb.kbproblemmarker"
+ markerType="org.jboss.tools.jst.web.kb.kbBuilderProblemMarker"
class="org.jboss.tools.jst.web.kb.action.KBProblemMarkerResolutionGenerator">
</markerResolutionGenerator>
- </extension>
+ </extension>
<extension
point="org.eclipse.wst.validation.validator"
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/action/EnableKBOnProject.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/action/EnableKBOnProject.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/action/EnableKBOnProject.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -44,7 +44,7 @@
try {
EclipseResourceUtil.addNatureToProject(project, IKbProject.NATURE_ID);
// Find existing KBNATURE problem marker and kill it if exists
- project.deleteMarkers(KbProject.KB_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ONE);
+ project.deleteMarkers(KbProject.KB_BUILDER_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ONE);
} catch (CoreException e) {
WebKbPlugin.getDefault().logError(e);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -894,7 +894,7 @@
IMarker[] markers = getOwnedMarkers(project);
if (markers != null && markers.length > 0) {
try {
- project.deleteMarkers(KB_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ONE);
+ project.deleteMarkers(KB_BUILDER_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ONE);
project.setPersistentProperty(KbProjectFactory.NATURE_MOCK, null);
} catch (CoreException ex) {
WebKbPlugin.getDefault().logError(ex);
@@ -924,7 +924,7 @@
return false;
}
- public static final String KB_PROBLEM_MARKER_TYPE = "org.jboss.tools.jst.web.kb.kbproblemmarker"; //$NON-NLS-1$
+ public static final String KB_BUILDER_PROBLEM_MARKER_TYPE = "org.jboss.tools.jst.web.kb.kbBuilderProblemMarker"; //$NON-NLS-1$
private static IMarker[] getOwnedMarkers(IResource r) {
ArrayList<IMarker> l = null;
@@ -937,7 +937,7 @@
String _type = ms[i].getType();
if(_type == null) continue;
- if(!_type.equals(KB_PROBLEM_MARKER_TYPE)) continue;
+ if(!_type.equals(KB_BUILDER_PROBLEM_MARKER_TYPE)) continue;
if(!ms[i].isSubtypeOf(IMarker.PROBLEM)) continue;
if(l == null)
@@ -960,7 +960,7 @@
String message = MessageFormat.format(KbMessages.KBPROBLEM, args.toArray());
if (m == null) {
- m = r.createMarker(KB_PROBLEM_MARKER_TYPE);
+ m = r.createMarker(KB_BUILDER_PROBLEM_MARKER_TYPE);
r.setPersistentProperty(KbProjectFactory.NATURE_MOCK, "true"); //$NON-NLS-1$
KbProjectFactory.getKbProject(r.getProject(), true);
}
@@ -997,5 +997,4 @@
if(validationContext != null)
System.out.println("validationContext " + validationContext.getModificationsSinceLastStore());
}
-
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -40,7 +40,7 @@
*/
public abstract class ValidationErrorManager implements IValidationErrorManager {
- static String VALIDATION_MARKER = ValidationPlugin.PLUGIN_ID + ".problemmarker"; //$NON-NLS-1$
+ public static String DEFAULT_VALIDATION_MARKER = ValidationPlugin.PLUGIN_ID + ".problemmarker"; //$NON-NLS-1$
static String VALIDATION_MARKER_OWNER = "owner"; //$NON-NLS-1$
static String VALIDATION_MARKER_GROUP = "groupName"; //$NON-NLS-1$
@@ -209,7 +209,7 @@
return addError(message, severity, messageArguments, lineNumber, length, offset, target, getDocumentProvider(), getMarkerId(), getMarkerOwner());
}
- public static IMarker addError(String message, int severity, Object[] messageArguments, int lineNumber, int length, int offset, IResource target, TextFileDocumentProvider documentProvider, String markerId, Class markerOwner, int maxNumberOfMarkersPerFile) {
+ public static IMarker addError(String message, int severity, Object[] messageArguments, int lineNumber, int length, int offset, IResource target, TextFileDocumentProvider documentProvider, String markerId, Class markerOwner, int maxNumberOfMarkersPerFile, String markerType) {
IMarker marker = null;
try {
if(lineNumber<1) {
@@ -227,7 +227,7 @@
}
marker = addTask(markerOwner.getName().intern(), target, lineNumber,
MessageFormat.format(message, messageArguments),
- severity, null, markerId, offset, length, maxNumberOfMarkersPerFile);
+ severity, null, markerId, offset, length, maxNumberOfMarkersPerFile, markerType);
} catch (CoreException e) {
WebKbPlugin.getDefault().logError(
NLS.bind(KbMessages.EXCEPTION_DURING_CREATING_MARKER, target.getFullPath()), e);
@@ -254,28 +254,33 @@
* @return
*/
public IMarker addError(String message, int severity, Object[] messageArguments, int lineNumber, int length, int offset, IResource target, TextFileDocumentProvider documentProvider, String markerId, Class markerOwner) {
- return addError(message, severity, messageArguments, lineNumber, length, offset, target, documentProvider, markerId, markerOwner, getMaxNumberOfMarkersPerFile(target.getProject()));
+ return addError(message, severity, messageArguments, lineNumber, length, offset, target, documentProvider, markerId, markerOwner, getMaxNumberOfMarkersPerFile(target.getProject()), getMarkerType());
}
abstract public int getMaxNumberOfMarkersPerFile(IProject project);
+ public abstract String getMarkerType();
+
private static IMarker addTask(String pluginId, IResource resource, int location,
- String message, int markerType, String targetObjectName,
- String groupName, int offset, int length, int maxNumberOfMarkersPerFile) throws CoreException {
+ String message, int severityEnumValue, String targetObjectName,
+ String groupName, int offset, int length, int maxNumberOfMarkersPerFile, String markerType) throws CoreException {
if ((message == null) || (resource == null) || (!resource.exists())) {
return null;
}
- int severity = getSeverity(markerType);
+ int severity = getSeverity(severityEnumValue);
+ if(markerType==null) {
+ markerType = DEFAULT_VALIDATION_MARKER;
+ }
if(maxNumberOfMarkersPerFile>0) {
- int existingMarkers = resource.findMarkers(VALIDATION_MARKER, true, IResource.DEPTH_ZERO).length;
+ int existingMarkers = resource.findMarkers(markerType, true, IResource.DEPTH_ZERO).length;
if(existingMarkers>maxNumberOfMarkersPerFile) {
return null;
}
}
- IMarker item = resource.createMarker(VALIDATION_MARKER); // add a validation marker
+ IMarker item = resource.createMarker(markerType); // add a validation marker
boolean offsetSet = ((offset != IMessage.OFFSET_UNSET) && (length != IMessage.OFFSET_UNSET));
int size = (offsetSet) ? 7 : 5;
@@ -307,12 +312,6 @@
return item;
}
- private IMarker addTask(String pluginId, IResource resource, int location,
- String message, int markerType, String targetObjectName,
- String groupName, int offset, int length) throws CoreException {
- return addTask(pluginId, resource, location, message, markerType, targetObjectName, groupName, offset, length, getMaxNumberOfMarkersPerFile(resource.getProject()));
- }
-
private static int getSeverity(int severityEnumValue) {
switch (severityEnumValue) {
case (IMessage.HIGH_SEVERITY) : {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -16,12 +16,15 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.validation.IValidator;
/**
@@ -88,13 +91,25 @@
}
private IStatus validate(List<IValidator> validators, Set<IFile> changedFiles, IProject rootProject, ContextValidationHelper validationHelper, IReporter reporter) throws ValidationException {
+ removeMarkers(changedFiles);
for (IValidator validator : validators) {
validator.validate(changedFiles, rootProject, validationHelper, this, reporter);
}
return OK_STATUS;
}
+ private void removeMarkers(Set<IFile> files) {
+ try {
+ for (IFile file : files) {
+ file.deleteMarkers(IValidator.KB_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ZERO);
+ }
+ } catch (CoreException e) {
+ WebKbPlugin.getDefault().logError(e);
+ }
+ }
+
private IStatus validateAll(List<IValidator> validators, IProject rootProject, ContextValidationHelper validationHelper, IReporter reporter) throws ValidationException {
+ removeMarkers(validationHelper.getProjectSetRegisteredFiles());
for (IValidator validator : validators) {
validator.validateAll(rootProject, validationHelper, this, reporter);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidator.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidator.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -26,6 +26,7 @@
*/
public interface IValidator {
+ public static final String KB_PROBLEM_MARKER_TYPE = "org.jboss.tools.jst.web.kb.kbproblemmarker"; //$NON-NLS-1$
public static final String MARKED_RESOURCE_MESSAGE_GROUP = "markedKbResource"; //$NON-NLS-1$
public static final String RESOURCE_MESSAGE_ID = "org.jboss.tools.kb.problem"; //$NON-NLS-1$
public static final String EXTENSION_POINT_ID = "org.jboss.tools.jst.web.kb.validator"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.properties 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.properties 2010-10-14 19:37:51 UTC (rev 25839)
@@ -2,4 +2,6 @@
pluginName=Seam Core
Bundle-Vendor.0 = JBoss by Red Hat
-Bundle-Name.0 = Seam Tools
\ No newline at end of file
+Bundle-Name.0 = Seam Tools
+
+KBProblemName=Seam Problem
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2010-10-14 19:37:51 UTC (rev 25839)
@@ -510,6 +510,13 @@
<project-set id="seam.searcher" projectset-class="org.jboss.tools.seam.internal.core.refactoring.ELProjectSet" />
</extension>
+ <extension id="seamproblem" name="%KBProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.jboss.tools.jst.web.kb.kbproblemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
<extension
point="org.jboss.tools.jst.web.kb.validator">
<validator
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -83,8 +83,9 @@
* @author Alexey Kazakov
*/
public class SeamCoreValidator extends SeamValidationErrorManager implements IValidator {
- public static final String ID = "org.jboss.tools.seam.core.CoreValidator";
-
+ public static final String ID = "org.jboss.tools.seam.core.CoreValidator"; //$NON-NLS-1$
+ public static final String PROBLEM_TYPE = "org.jboss.tools.seam.core.seamproblem"; //$NON-NLS-1$
+
public static final String MESSAGE_ID_ATTRIBUTE_NAME = "Seam_message_id"; //$NON-NLS-1$
public static final int NONUNIQUE_COMPONENT_NAME_MESSAGE_ID = 1;
@@ -102,12 +103,20 @@
public static final int ENTITY_COMPONENT_WRONG_SCOPE_ID = 13;
public static final int UNKNOWN_COMPONENT_PROPERTY_ID = 14;
-
private ISeamProject seamProject;
private String projectName;
/*
* (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
+ */
+ @Override
+ public String getMarkerType() {
+ return PROBLEM_TYPE;
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.validation.IValidator#getId()
*/
public String getId() {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -188,11 +188,11 @@
int position = offset + text.indexOf(jarName);
int length = jarName.length();
if(SEAM_JAR_NAME.equals(jarName)) {
- ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.HIGH_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass(), 0);
+ ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.HIGH_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass(), 0, null);
break;
}
if(jarName.startsWith(JARS[jarIndex])) {
- ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.NORMAL_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass(), 0);
+ ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.NORMAL_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass(), 0, null);
break;
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -37,6 +37,7 @@
import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
import org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper;
import org.jboss.tools.jst.web.kb.internal.validation.ProblemMessage;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager;
import org.jboss.tools.jst.web.kb.validation.IValidationErrorManager;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -108,6 +109,11 @@
setReporter(reporter);
setMarkerId(SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP);
}
+
+ @Override
+ public String getMarkerType() {
+ return ValidationErrorManager.DEFAULT_VALIDATION_MARKER;
+ }
};
errorManager.init(project, null, this, reporter);
@@ -352,5 +358,4 @@
String[] messageArguments, IResource target) {
return errorManager.addError(message, preferenceKey, messageArguments, target);
}
-
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -17,7 +17,7 @@
/**
* @author Alexey Kazakov
*/
-public class SeamValidationErrorManager extends ValidationErrorManager {
+abstract public class SeamValidationErrorManager extends ValidationErrorManager {
public static final String MARKED_SEAM_PROJECT_MESSAGE_GROUP = "markedSeamProject"; //$NON-NLS-1$
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -14,6 +14,7 @@
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager;
import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
import org.jboss.tools.jst.web.kb.validation.IValidatingProjectSet;
import org.jboss.tools.jst.web.kb.validation.IValidationErrorManager;
@@ -88,6 +89,11 @@
setReporter(reporter);
setMarkerId(SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP);
}
+
+ @Override
+ public String getMarkerType() {
+ return ValidationErrorManager.DEFAULT_VALIDATION_MARKER;
+ }
};
//errorManager.init(project, null, this, reporter);
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2010-10-14 19:14:12 UTC (rev 25838)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2010-10-14 19:37:51 UTC (rev 25839)
@@ -286,12 +286,9 @@
return numbers.toArray(new Integer[0]);
}
- public static int getMarkersNumberByGroupName(IResource resource, String messageGroup) {
+ public static int getMarkersNumberByGroupName(String type, IResource resource, String messageGroup) {
try{
- IMarker[] markers = resource.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
-// for(int i=0;i<markers.length;i++){
-// System.out.println("Marker - "+markers[i].getAttribute(IMarker.MESSAGE, ""));
-// }
+ IMarker[] markers = resource.findMarkers(type, true, IResource.DEPTH_INFINITE);
int length = markers.length;
for (int i = 0; i < markers.length; i++) {
String groupName = markers[i].getAttribute("groupName", null);
@@ -306,6 +303,10 @@
return -1;
}
+ public static int getMarkersNumberByGroupName(IResource resource, String messageGroup) {
+ return getMarkersNumberByGroupName(MARKER_TYPE, resource, messageGroup);
+ }
+
/**
*
* @author eskimo
14 years, 3 months
JBoss Tools SVN: r25838 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 15:14:12 -0400 (Thu, 14 Oct 2010)
New Revision: 25838
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
Log:
[JBIDE-7329] split menu in parts, added separators
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 19:13:43 UTC (rev 25837)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 19:14:12 UTC (rev 25838)
@@ -258,6 +258,22 @@
<menuContribution
allPopups="true"
locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
+ <separator
+ name="instances"
+ visible="true" />
+ <separator
+ name="connections"
+ visible="true" />
+ <separator
+ name="images"
+ visible="true" />
+ <separator
+ name="filters"
+ visible="true" />
+ </menuContribution>
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView?after=instances">
<!-- instance commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.startinstance"
@@ -337,14 +353,12 @@
name="additions"
visible="true">
</separator>
+ </menuContribution>
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView?after=connections">
<!-- connection commands -->
<command
- commandId="org.eclipse.ui.edit.delete"
- label="%command.disconnectcloud.label"
- style="push"
- tooltip="%command.disconnectcloud.tooltip">
- </command>
- <command
commandId="org.jboss.tools.deltacloud.ui.newconnection"
label="%command.newconnection.label"
style="push"
@@ -357,11 +371,21 @@
tooltip="%command.editconnection.tooltip">
</command>
<command
+ commandId="org.eclipse.ui.edit.delete"
+ label="%command.disconnectcloud.label"
+ style="push"
+ tooltip="%command.disconnectcloud.tooltip">
+ </command>
+ <command
commandId="org.eclipse.ui.file.refresh"
label="%command.refresh.label"
style="push"
tooltip="%command.refresh.tooltip">
</command>
+ </menuContribution>
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView?after=images">
<!-- image commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.createinstance"
@@ -381,6 +405,10 @@
</with>
</visibleWhen>
</command>
+ </menuContribution>
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView?after=filters">
<command
commandId="org.jboss.tools.deltacloud.ui.filterimages"
label="%command.filterimages.label"
@@ -501,12 +529,6 @@
</separator>
<!-- connection commands -->
<command
- commandId="org.eclipse.ui.edit.delete"
- label="%command.disconnectcloud.label"
- style="push"
- tooltip="%command.disconnectcloud.tooltip">
- </command>
- <command
commandId="org.jboss.tools.deltacloud.ui.newconnection"
label="%command.newconnection.label"
style="push"
@@ -518,6 +540,12 @@
style="push"
tooltip="%command.editconnection.tooltip">
</command>
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ label="%command.disconnectcloud.label"
+ style="push"
+ tooltip="%command.disconnectcloud.tooltip">
+ </command>
<!-- image commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.createinstance"
14 years, 3 months
JBoss Tools SVN: r25837 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 15:13:43 -0400 (Thu, 14 Oct 2010)
New Revision: 25837
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
Log:
[JBIDE-7329] internationalized plugin.xml and manifest
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-10-14 18:20:22 UTC (rev 25836)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-10-14 19:13:43 UTC (rev 25837)
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Deltacloud UI (Experimental)
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.jboss.tools.deltacloud.ui; singleton:=true
Bundle-Version: 0.0.1.qualifier
Bundle-Activator: org.jboss.tools.deltacloud.ui.Activator
-Bundle-Vendor: Red Hat Inc.
+Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.equinox.security;bundle-version="1.0.100",
14 years, 3 months
JBoss Tools SVN: r25836 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 14:20:22 -0400 (Thu, 14 Oct 2010)
New Revision: 25836
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
Log:
[JBIDE-7329] internationalized plugin.xml and manifest
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties 2010-10-14 17:04:20 UTC (rev 25835)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties 2010-10-14 18:20:22 UTC (rev 25836)
@@ -1,6 +1,3 @@
-Bundle-Vendor = Red Hat Inc.
-Bundle-Name = Deltacloud UI (Experimental)
-
DeltaCloudCategory=Deltacloud
CloudViewerName=Cloud Viewer
InstanceViewer.name=Instances
@@ -10,63 +7,51 @@
Advanced.label=Advanced
NewWizard.name=Cloud Connection
-
-command.label = New Connection
-command.tooltip = New Connection
-command.label.0 = Edit Connection
-command.tooltip.0 = Edit Conncetion
-command.label.1 = Disconnect Cloud
-command.tooltip.1 = Disconnect Cloud
-command.label.2 = Refresh Cloud
-command.tooltip.2 = Refresh Cloud
-command.label.3 = Launch Instance
-command.tooltip.3 = Launch Instance
-command.label.4 = Start
-command.tooltip.4 = Start
-command.label.5 = Stop
-command.tooltip.5 = Stop
-command.label.6 = Reboot
-command.tooltip.6 = Reboot
-command.label.7 = Destroy
-command.tooltip.7 = Destroy
-command.label.8 = Filter images...
-command.tooltip.8 = Filter Images...
-command.label.9 = Filter Instances...
-command.tooltip.9 = Filter Instances...
-command.label.10 = New Connection
-command.tooltip.10 = New Connection
-command.label.11 = Edit Connection
-command.tooltip.11 = Edit Conncetion
-command.label.12 = Disconnect Cloud
-command.tooltip.12 = Disconnect Cloud
-command.label.13 = Launch Instance
-command.tooltip.13 = Launch Instance
-command.label.14 = Start
-command.tooltip.14 = Start
-command.label.15 = Stop
-command.tooltip.15 = Stop
-command.label.16 = Reboot
-command.tooltip.16 = Reboot
-command.label.17 = Destroy
-command.tooltip.17 = Destroy
-command.label.18 = Filter Images...
-command.tooltip.18 = Filter Images...
-command.label.19 = Filter Instances...
-command.tooltip.19 = Filter Instances...
-command.description = Creates a new cloud connection
-command.name = New Connection
-command.name.0 = Edit Connection
-command.description.0 = Launches an instance
-command.name.1 = Launch Instance
-command.description.1 = Starts a cloud instance
-command.name.2 = Start
-command.description.2 = Stops a cloud instance
-command.name.3 = Stop
-command.description.3 = Reboots a cloud instance
-command.name.4 = Reboot
-command.description.4 = Stops a cloud instance
-command.name.5 = Destroy
-command.description.5 = Filters images
-command.name.6 = Filter Images...
-command.description.6 = Filters instances
-command.name.7 = Filter Instances...
\ No newline at end of file
+command.label = Start
+command.tooltip = Start
+command.stopinstance.label = Stop
+command.stopinstance.tooltip = Stop
+command.rebootinstance = Reboot
+command.rebootinstance = Reboot
+command.destroyinstance.label = Destroy
+command.destroyinstance.tooltip = Destroy
+command.disconnectcloud.label = Disconnect Cloud
+command.disconnectcloud.tooltip = Disconnect Cloud
+command.newconnection.label = New Connection
+command.newconnection.tooltip. = New Connection
+command.editconnection.label = Edit Connection
+command.editconnection.tooltip = Edit Conncetion
+command.refresh.label = Refresh Cloud
+command.refresh.tooltip = Refresh Cloud
+command.createinstance.label = Launch Instance
+command.createinstance.tooltip = Launch Instance
+command.filterimages.label = Filter images...
+command.filterimages.tooltip = Filter Images...
+command.filterinstances.label = Filter Instances...
+command.filterinstances.tooltip = Filter Instances...
+command.startinstance.label = Start
+command.startinstance.tooltip = Start
+command.stopinstance.label = Stop
+command.stopinstance.tooltip = Stop
+command.rebootinstance.label = Reboot
+command.rebootinstance.tooltip = Reboot
+command.newconnection.description = Creates a new cloud connection
+command.newconnection.name = New Connection
+command.editconnection.description = Edits a Connection
+command.editconnection.name = Edit Connection
+command.createinstance.description.0 = Launches an instance
+command.createinstance.name = Launch Instance
+command.startinstance.description = Starts a cloud instance
+command.startinstance.name = Start
+command.stopinstance.description = Stops a cloud instance
+command.stopinstance.name = Stop
+command.rebootinstance.description = Reboots a cloud instance
+command.rebootinstance.name = Reboot
+command.stopinstance.name = Stop
+command.stopinstance.description = Stops a cloud instance
+command.destroyinstance.name = Destroy
+command.destroyinstance.description = Destroys a cloud instance
+command.filterimages.description = Filters images
+command.filterimages.name = Filter Images...
+command.filterinstances.description = Filters instances
+command.filterinstancesname = Filter Instances...
\ No newline at end of file
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 17:04:20 UTC (rev 25835)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 18:20:22 UTC (rev 25836)
@@ -258,58 +258,14 @@
<menuContribution
allPopups="true"
locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
- <!-- connection commands -->
- <command
- commandId="org.jboss.tools.deltacloud.ui.newconnection"
- label="%command.label"
- style="push"
- tooltip="%command.tooltip">
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.editconnection"
- label="%command.label.0"
- style="push"
- tooltip="%command.tooltip.0">
- </command>
- <command
- commandId="org.eclipse.ui.edit.delete"
- label="%command.label.1"
- style="push"
- tooltip="%command.tooltip.1">
- </command>
- <command
- commandId="org.eclipse.ui.file.refresh"
- label="%command.label.2"
- style="push"
- tooltip="%command.tooltip.2">
- </command>
- <!-- image commands -->
- <command
- commandId="org.jboss.tools.deltacloud.ui.createinstance"
- icon="icons/instance.gif"
- label="%command.label.3"
- style="push"
- tooltip="%command.tooltip.3">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
<!-- instance commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.startinstance"
disabledIcon="icons/runningd.gif"
icon="icons/running.gif"
- label="%command.label.4"
+ label="%command.label"
style="push"
- tooltip="%command.tooltip.4">
+ tooltip="%command.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -326,9 +282,9 @@
commandId="org.jboss.tools.deltacloud.ui.stopinstance"
disabledIcon="icons/stoppedd.gif"
icon="icons/stopped.gif"
- label="%command.label.5"
+ label="%command.stopinstance.label"
style="push"
- tooltip="%command.tooltip.5">
+ tooltip="%command.stopinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -345,9 +301,9 @@
commandId="org.jboss.tools.deltacloud.ui.rebootinstance"
disabledIcon="icons/rebootd.gif"
icon="icons/reboot.gif"
- label="%command.label.6"
+ label="%command.rebootinstance.label"
style="push"
- tooltip="%command.tooltip.6">
+ tooltip="%command.rebootinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -362,9 +318,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.destroyinstance"
- label="%command.label.7"
+ label="%command.destroyinstance.label"
style="push"
- tooltip="%command.tooltip.7">
+ tooltip="%command.destroyinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -377,28 +333,59 @@
</with>
</visibleWhen>
</command>
+ <separator
+ name="additions"
+ visible="true">
+ </separator>
+ <!-- connection commands -->
<command
- commandId="org.jboss.tools.deltacloud.ui.filterimages"
- label="%command.label.8"
+ commandId="org.eclipse.ui.edit.delete"
+ label="%command.disconnectcloud.label"
style="push"
- tooltip="%command.tooltip.8">
+ tooltip="%command.disconnectcloud.tooltip">
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.newconnection"
+ label="%command.newconnection.label"
+ style="push"
+ tooltip="%command.newconnection.tooltip">
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.editconnection"
+ label="%command.editconnection.label"
+ style="push"
+ tooltip="%command.editconnection.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.ui.file.refresh"
+ label="%command.refresh.label"
+ style="push"
+ tooltip="%command.refresh.tooltip">
+ </command>
+ <!-- image commands -->
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.createinstance"
+ icon="icons/instance.gif"
+ label="%command.createinstance.label"
+ style="push"
+ tooltip="%command.createinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
variable="selection">
<iterate>
<instanceof
- value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
</instanceof>
</iterate>
</with>
</visibleWhen>
</command>
<command
- commandId="org.jboss.tools.deltacloud.ui.filterinstances"
- label="%command.label.9"
+ commandId="org.jboss.tools.deltacloud.ui.filterimages"
+ label="%command.filterimages.label"
style="push"
- tooltip="%command.tooltip.9">
+ tooltip="%command.filterimages.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -411,57 +398,36 @@
</with>
</visibleWhen>
</command>
- </menuContribution>
- <!-- DeltaCloudView local menu ========================================= -->
- <menuContribution
- allPopups="true"
- locationURI="menu:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
- <!-- connection commands -->
<command
- commandId="org.jboss.tools.deltacloud.ui.newconnection"
- label="%command.label.10"
+ commandId="org.jboss.tools.deltacloud.ui.filterinstances"
+ label="%command.filterinstances.label"
style="push"
- tooltip="%command.tooltip.10">
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.editconnection"
- label="%command.label.11"
- style="push"
- tooltip="%command.tooltip.11">
- </command>
- <command
- commandId="org.eclipse.ui.edit.delete"
- label="%command.label.12"
- style="push"
- tooltip="%command.tooltip.12">
- </command>
- <!-- image commands -->
- <command
- commandId="org.jboss.tools.deltacloud.ui.createinstance"
- icon="icons/instance.gif"
- label="%command.label.13"
- style="push"
- tooltip="%command.tooltip.13">
+ tooltip="%command.filterinstances.tooltip">
<visibleWhen
checkEnabled="true">
<with
variable="selection">
<iterate>
<instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
</instanceof>
</iterate>
</with>
</visibleWhen>
</command>
+ </menuContribution>
+ <!-- DeltaCloudView local menu ========================================= -->
+ <menuContribution
+ allPopups="true"
+ locationURI="menu:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
<!-- instance commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.startinstance"
disabledIcon="icons/runningd.gif"
icon="icons/running.gif"
- label="%command.label.14"
+ label="%command.startinstance.label"
style="push"
- tooltip="%command.tooltip.14">
+ tooltip="%command.startinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -478,9 +444,9 @@
commandId="org.jboss.tools.deltacloud.ui.stopinstance"
disabledIcon="icons/stoppedd.gif"
icon="icons/stopped.gif"
- label="%command.label.15"
+ label="%command.stopinstance.label"
style="push"
- tooltip="%command.tooltip.15">
+ tooltip="%command.stopinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -497,9 +463,9 @@
commandId="org.jboss.tools.deltacloud.ui.rebootinstance"
disabledIcon="icons/rebootd.gif"
icon="icons/reboot.gif"
- label="%command.label.16"
+ label="%command.rebootinstance.label"
style="push"
- tooltip="%command.tooltip.16">
+ tooltip="%command.rebootinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -514,9 +480,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.destroyinstance"
- label="%command.label.17"
+ label="%command.destroyinstance.label"
style="push"
- tooltip="%command.tooltip.17">
+ tooltip="%command.destroyinstance.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -529,11 +495,53 @@
</with>
</visibleWhen>
</command>
+ <separator
+ name="additions"
+ visible="true">
+ </separator>
+ <!-- connection commands -->
<command
+ commandId="org.eclipse.ui.edit.delete"
+ label="%command.disconnectcloud.label"
+ style="push"
+ tooltip="%command.disconnectcloud.tooltip">
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.newconnection"
+ label="%command.newconnection.label"
+ style="push"
+ tooltip="%command.newconnection.tooltip">
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.editconnection"
+ label="%command.editconnection.label"
+ style="push"
+ tooltip="%command.editconnection.tooltip">
+ </command>
+ <!-- image commands -->
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.createinstance"
+ icon="icons/instance.gif"
+ label="%command.createinstance.label"
+ style="push"
+ tooltip="%command.createinstance.tooltip">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
commandId="org.jboss.tools.deltacloud.ui.filterimages"
- label="%command.label.18"
+ label="%command.filterimages.label"
style="push"
- tooltip="%command.tooltip.18">
+ tooltip="%command.filterimages.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -548,9 +556,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.filterinstances"
- label="%command.label.19"
+ label="%command.filterinstances.label"
style="push"
- tooltip="%command.tooltip.19">
+ tooltip="%command.filterinstances.tooltip">
<visibleWhen
checkEnabled="true">
<with
@@ -569,51 +577,52 @@
<extension
point="org.eclipse.ui.commands">
<command
- description="%command.description"
+ description="%command.newconnection.description"
id="org.jboss.tools.deltacloud.ui.newconnection"
- name="%command.name">
+ name="%command.newconnection.name">
</command>
<command
+ description="%command.editconnection.description"
id="org.jboss.tools.deltacloud.ui.editconnection"
- name="%command.name.0">
+ name="%command.editconnection.name">
</command>
<!-- image commands -->
<command
- description="%command.description.0"
+ description="%command.createinstance.description"
id="org.jboss.tools.deltacloud.ui.createinstance"
- name="%command.name.1">
+ name="%command.createinstance.name">
</command>
<!-- instance commands -->
<command
- description="%command.description.1"
+ description="%command.startinstance.description"
id="org.jboss.tools.deltacloud.ui.startinstance"
- name="%command.name.2">
+ name="%command.startinstance.name">
</command>
<command
- description="%command.description.2"
+ description="%command.stopinstance.description"
id="org.jboss.tools.deltacloud.ui.stopinstance"
- name="%command.name.3">
+ name="%command.stopinstance.name">
</command>
<command
- description="%command.description.3"
+ description="%command.rebootinstance.description"
id="org.jboss.tools.deltacloud.ui.rebootinstance"
- name="%command.name.4">
+ name="%command.rebootinstance.name">
</command>
<command
- description="%command.description.4"
+ description="%command.destroyinstance.description"
id="org.jboss.tools.deltacloud.ui.destroyinstance"
- name="%command.name.5">
+ name="%command.destroyinstance.name">
</command>
<!-- filter commands -->
<command
- description="%command.description.5"
+ description="%command.filterimages.description"
id="org.jboss.tools.deltacloud.ui.filterimages"
- name="%command.name.6">
+ name="%command.filterimages.name">
</command>
<command
- description="%command.description.6"
+ description="%command.filterinstances.description"
id="org.jboss.tools.deltacloud.ui.filterinstances"
- name="%command.name.7">
+ name="%command.filterinstances.name">
</command>
</extension>
14 years, 3 months
JBoss Tools SVN: r25835 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-10-14 13:04:20 -0400 (Thu, 14 Oct 2010)
New Revision: 25835
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/browse/JBIDE-7216, https://jira.jboss.org/browse/JBIDE-7202
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2010-10-14 16:03:53 UTC (rev 25834)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2010-10-14 17:04:20 UTC (rev 25835)
@@ -147,7 +147,7 @@
.createTextEditor(
ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_ENTITY_BEAN_PACKAGE_NAME,
- "com.mydomain.projectname.entity"); //$NON-NLS-1$
+ ""); //$NON-NLS-1$
private IFieldEditor createTestProjectCheckboxeditor = IFieldEditorFactory.INSTANCE
.createCheckboxEditor(
@@ -165,7 +165,7 @@
.createTextEditor(
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_TEST_PACKAGE_NAME,
- "com.mydomain.projectname.test"); //$NON-NLS-1$
+ ""); //$NON-NLS-1$
private Group databaseGroup;
14 years, 3 months
JBoss Tools SVN: r25834 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 12:03:53 -0400 (Thu, 14 Oct 2010)
New Revision: 25834
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
Log:
[JBIDE-7329] internationalized plugin.xml and manifest
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties 2010-10-14 15:41:33 UTC (rev 25833)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties 2010-10-14 16:03:53 UTC (rev 25834)
@@ -1,3 +1,6 @@
+Bundle-Vendor = Red Hat Inc.
+Bundle-Name = Deltacloud UI (Experimental)
+
DeltaCloudCategory=Deltacloud
CloudViewerName=Cloud Viewer
InstanceViewer.name=Instances
@@ -6,4 +9,64 @@
Preferences.name=Deltacloud
Advanced.label=Advanced
-NewWizard.name=Cloud Connection
\ No newline at end of file
+NewWizard.name=Cloud Connection
+
+command.label = New Connection
+command.tooltip = New Connection
+command.label.0 = Edit Connection
+command.tooltip.0 = Edit Conncetion
+command.label.1 = Disconnect Cloud
+command.tooltip.1 = Disconnect Cloud
+command.label.2 = Refresh Cloud
+command.tooltip.2 = Refresh Cloud
+command.label.3 = Launch Instance
+command.tooltip.3 = Launch Instance
+command.label.4 = Start
+command.tooltip.4 = Start
+command.label.5 = Stop
+command.tooltip.5 = Stop
+command.label.6 = Reboot
+command.tooltip.6 = Reboot
+command.label.7 = Destroy
+command.tooltip.7 = Destroy
+command.label.8 = Filter images...
+command.tooltip.8 = Filter Images...
+command.label.9 = Filter Instances...
+command.tooltip.9 = Filter Instances...
+command.label.10 = New Connection
+command.tooltip.10 = New Connection
+command.label.11 = Edit Connection
+command.tooltip.11 = Edit Conncetion
+command.label.12 = Disconnect Cloud
+command.tooltip.12 = Disconnect Cloud
+command.label.13 = Launch Instance
+command.tooltip.13 = Launch Instance
+command.label.14 = Start
+command.tooltip.14 = Start
+command.label.15 = Stop
+command.tooltip.15 = Stop
+command.label.16 = Reboot
+command.tooltip.16 = Reboot
+command.label.17 = Destroy
+command.tooltip.17 = Destroy
+command.label.18 = Filter Images...
+command.tooltip.18 = Filter Images...
+command.label.19 = Filter Instances...
+command.tooltip.19 = Filter Instances...
+command.description = Creates a new cloud connection
+command.name = New Connection
+command.name.0 = Edit Connection
+command.description.0 = Launches an instance
+command.name.1 = Launch Instance
+command.description.1 = Starts a cloud instance
+command.name.2 = Start
+command.description.2 = Stops a cloud instance
+command.name.3 = Stop
+command.description.3 = Reboots a cloud instance
+command.name.4 = Reboot
+command.description.4 = Stops a cloud instance
+command.name.5 = Destroy
+command.description.5 = Filters images
+command.name.6 = Filter Images...
+command.description.6 = Filters instances
+command.name.7 = Filter Instances...
\ No newline at end of file
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 15:41:33 UTC (rev 25833)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 16:03:53 UTC (rev 25834)
@@ -260,36 +260,36 @@
locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
<!-- connection commands -->
<command
- commandId="org.eclipse.ui.edit.delete"
- label="Disconnect Cloud"
+ commandId="org.jboss.tools.deltacloud.ui.newconnection"
+ label="%command.label"
style="push"
- tooltip="Disconnect Cloud">
+ tooltip="%command.tooltip">
</command>
<command
- commandId="org.jboss.tools.deltacloud.ui.newconnection"
- label="New Connection"
+ commandId="org.jboss.tools.deltacloud.ui.editconnection"
+ label="%command.label.0"
style="push"
- tooltip="New Connection">
+ tooltip="%command.tooltip.0">
</command>
<command
- commandId="org.jboss.tools.deltacloud.ui.editconnection"
- label="Edit Connection"
+ commandId="org.eclipse.ui.edit.delete"
+ label="%command.label.1"
style="push"
- tooltip="Edit Conncetion">
+ tooltip="%command.tooltip.1">
</command>
<command
commandId="org.eclipse.ui.file.refresh"
- label="Refresh Cloud"
+ label="%command.label.2"
style="push"
- tooltip="Refresh Cloud">
+ tooltip="%command.tooltip.2">
</command>
<!-- image commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.createinstance"
icon="icons/instance.gif"
- label="Launch Instance"
+ label="%command.label.3"
style="push"
- tooltip="Launch Instance">
+ tooltip="%command.tooltip.3">
<visibleWhen
checkEnabled="true">
<with
@@ -307,9 +307,9 @@
commandId="org.jboss.tools.deltacloud.ui.startinstance"
disabledIcon="icons/runningd.gif"
icon="icons/running.gif"
- label="Start"
+ label="%command.label.4"
style="push"
- tooltip="Start">
+ tooltip="%command.tooltip.4">
<visibleWhen
checkEnabled="true">
<with
@@ -326,9 +326,9 @@
commandId="org.jboss.tools.deltacloud.ui.stopinstance"
disabledIcon="icons/stoppedd.gif"
icon="icons/stopped.gif"
- label="Stop"
+ label="%command.label.5"
style="push"
- tooltip="Stop">
+ tooltip="%command.tooltip.5">
<visibleWhen
checkEnabled="true">
<with
@@ -345,9 +345,9 @@
commandId="org.jboss.tools.deltacloud.ui.rebootinstance"
disabledIcon="icons/rebootd.gif"
icon="icons/reboot.gif"
- label="Reboot"
+ label="%command.label.6"
style="push"
- tooltip="Reboot">
+ tooltip="%command.tooltip.6">
<visibleWhen
checkEnabled="true">
<with
@@ -362,9 +362,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.destroyinstance"
- label="Destroy"
+ label="%command.label.7"
style="push"
- tooltip="Destroy">
+ tooltip="%command.tooltip.7">
<visibleWhen
checkEnabled="true">
<with
@@ -379,9 +379,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.filterimages"
- label="Filter images..."
+ label="%command.label.8"
style="push"
- tooltip="Filter Images...">
+ tooltip="%command.tooltip.8">
<visibleWhen
checkEnabled="true">
<with
@@ -396,9 +396,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.filterinstances"
- label="Filter Instances..."
+ label="%command.label.9"
style="push"
- tooltip="Filter Instances...">
+ tooltip="%command.tooltip.9">
<visibleWhen
checkEnabled="true">
<with
@@ -418,30 +418,30 @@
locationURI="menu:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
<!-- connection commands -->
<command
- commandId="org.eclipse.ui.edit.delete"
- label="Disconnect Cloud"
+ commandId="org.jboss.tools.deltacloud.ui.newconnection"
+ label="%command.label.10"
style="push"
- tooltip="Disconnect Cloud">
+ tooltip="%command.tooltip.10">
</command>
<command
- commandId="org.jboss.tools.deltacloud.ui.newconnection"
- label="New Connection"
+ commandId="org.jboss.tools.deltacloud.ui.editconnection"
+ label="%command.label.11"
style="push"
- tooltip="New Connection">
+ tooltip="%command.tooltip.11">
</command>
<command
- commandId="org.jboss.tools.deltacloud.ui.editconnection"
- label="Edit Connection"
+ commandId="org.eclipse.ui.edit.delete"
+ label="%command.label.12"
style="push"
- tooltip="Edit Conncetion">
+ tooltip="%command.tooltip.12">
</command>
<!-- image commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.createinstance"
icon="icons/instance.gif"
- label="Launch Instance"
+ label="%command.label.13"
style="push"
- tooltip="Launch Instance">
+ tooltip="%command.tooltip.13">
<visibleWhen
checkEnabled="true">
<with
@@ -459,9 +459,9 @@
commandId="org.jboss.tools.deltacloud.ui.startinstance"
disabledIcon="icons/runningd.gif"
icon="icons/running.gif"
- label="Start"
+ label="%command.label.14"
style="push"
- tooltip="Start">
+ tooltip="%command.tooltip.14">
<visibleWhen
checkEnabled="true">
<with
@@ -478,9 +478,9 @@
commandId="org.jboss.tools.deltacloud.ui.stopinstance"
disabledIcon="icons/stoppedd.gif"
icon="icons/stopped.gif"
- label="Stop"
+ label="%command.label.15"
style="push"
- tooltip="Stop">
+ tooltip="%command.tooltip.15">
<visibleWhen
checkEnabled="true">
<with
@@ -497,9 +497,9 @@
commandId="org.jboss.tools.deltacloud.ui.rebootinstance"
disabledIcon="icons/rebootd.gif"
icon="icons/reboot.gif"
- label="Reboot"
+ label="%command.label.16"
style="push"
- tooltip="Reboot">
+ tooltip="%command.tooltip.16">
<visibleWhen
checkEnabled="true">
<with
@@ -514,9 +514,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.destroyinstance"
- label="Destroy"
+ label="%command.label.17"
style="push"
- tooltip="Destroy">
+ tooltip="%command.tooltip.17">
<visibleWhen
checkEnabled="true">
<with
@@ -531,9 +531,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.filterimages"
- label="Filter Images..."
+ label="%command.label.18"
style="push"
- tooltip="Filter Images...">
+ tooltip="%command.tooltip.18">
<visibleWhen
checkEnabled="true">
<with
@@ -548,9 +548,9 @@
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.filterinstances"
- label="Filter Instances..."
+ label="%command.label.19"
style="push"
- tooltip="Filter Instances...">
+ tooltip="%command.tooltip.19">
<visibleWhen
checkEnabled="true">
<with
@@ -569,51 +569,51 @@
<extension
point="org.eclipse.ui.commands">
<command
- description="Creates a new cloud connection"
+ description="%command.description"
id="org.jboss.tools.deltacloud.ui.newconnection"
- name="New Connection">
+ name="%command.name">
</command>
<command
id="org.jboss.tools.deltacloud.ui.editconnection"
- name="Edit Connection">
+ name="%command.name.0">
</command>
<!-- image commands -->
<command
- description="Launches an instance"
+ description="%command.description.0"
id="org.jboss.tools.deltacloud.ui.createinstance"
- name="Launch Instance">
+ name="%command.name.1">
</command>
<!-- instance commands -->
<command
- description="Starts a cloud instance"
+ description="%command.description.1"
id="org.jboss.tools.deltacloud.ui.startinstance"
- name="Start">
+ name="%command.name.2">
</command>
<command
- description="Stops a cloud instance"
+ description="%command.description.2"
id="org.jboss.tools.deltacloud.ui.stopinstance"
- name="Stop">
+ name="%command.name.3">
</command>
<command
- description="Reboots a cloud instance"
+ description="%command.description.3"
id="org.jboss.tools.deltacloud.ui.rebootinstance"
- name="Reboot">
+ name="%command.name.4">
</command>
<command
- description="Stops a cloud instance"
+ description="%command.description.4"
id="org.jboss.tools.deltacloud.ui.destroyinstance"
- name="Destroy">
+ name="%command.name.5">
</command>
<!-- filter commands -->
<command
- description="Filters images"
+ description="%command.description.5"
id="org.jboss.tools.deltacloud.ui.filterimages"
- name="Filter Images...">
+ name="%command.name.6">
</command>
<command
- description="Filters instances"
+ description="%command.description.6"
id="org.jboss.tools.deltacloud.ui.filterinstances"
- name="Filter Instances...">
+ name="%command.name.7">
</command>
</extension>
14 years, 3 months
JBoss Tools SVN: r25833 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 11:41:33 -0400 (Thu, 14 Oct 2010)
New Revision: 25833
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
Log:
[JBIDE-7329] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-14 15:30:40 UTC (rev 25832)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-14 15:41:33 UTC (rev 25833)
@@ -16,28 +16,20 @@
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.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
-import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.core.ICloudManagerListener;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
-import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilter;
public class DeltaCloudView extends ViewPart implements ICloudManagerListener,
ITabbedPropertySheetPageContributor {
@@ -50,36 +42,15 @@
private static final String CONTEXT_MENU_ID = "popup:" + ID;
private static final String VIEW_MENU_ID = "menu:" + ID;
-// private static final String REFRESH = "Refresh.label"; //$NON-NLS-1$
-// private static final String CREATE_INSTANCE = "CreateInstance.label"; //$NON-NLS-1$
- // private final static String START_LABEL = "Start.label"; //$NON-NLS-1$
- // private final static String STOP_LABEL = "Stop.label"; //$NON-NLS-1$
- // private final static String REBOOT_LABEL = "Reboot.label"; //$NON-NLS-1$
- // private final static String DESTROY_LABEL = "Destroy.label"; //$NON-NLS-1$
-// private final static String IMAGE_FILTER = "ImageFilter.label"; //$NON-NLS-1$
- private final static String INSTANCE_FILTER = "InstanceFilter.label"; //$NON-NLS-1$
public static final String COLLAPSE_ALL = "CollapseAll.label"; //$NON-NLS-1$
+ private static final String HELP_CONTEXTID = "org.jboss.tools.deltacloud.ui.viewer";
+
private TreeViewer viewer;
-// private Action refreshAction;
private Action collapseall;
private Action doubleClickAction;
-// private Action imageFilterAction;
-// private Action instanceFilterAction;
- private CloudViewElement selectedElement;
-
- /**
- * The constructor.
- */
- public DeltaCloudView() {
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
public void createPartControl(Composite parent) {
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
viewer.setContentProvider(new CloudViewContentProvider());
@@ -89,11 +60,10 @@
getSite().setSelectionProvider(viewer); // for tabbed properties
// Create the help context id for the viewer's control
- PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "org.jboss.tools.deltacloud.ui.viewer");
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), HELP_CONTEXTID);
makeActions();
hookContextMenu();
hookDoubleClickAction();
- hookSelection();
contributeToActionBars();
DeltaCloudManager.getDefault().addCloudManagerListener(this);
}
@@ -104,67 +74,24 @@
super.dispose();
}
- private void hookSelection() {
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- handleSelection();
- }
- });
- }
-
private void hookContextMenu() {
IMenuManager contextMenu = UIUtils.createContextMenu(viewer.getControl());
- // TODO: replace by declarative commands
- fillContextMenu(contextMenu);
UIUtils.registerContributionManager(CONTEXT_MENU_ID, contextMenu, viewer.getControl());
}
private void contributeToActionBars() {
- // IActionBars bars = getViewSite().getActionBars();
- // IMenuManager menuMgr = bars.getMenuManager();
- IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
+ // TODO: replace by declarative command
+ fillLocalToolBar(getViewSite().getActionBars().getToolBarManager());
IActionBars actionBars = getViewSite().getActionBars();
IMenuManager menuManager = actionBars.getMenuManager();
UIUtils.registerContributionManager(VIEW_MENU_ID, menuManager, viewer.getControl());
}
- private void handleSelection() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- selectedElement = (CloudViewElement) selection.getFirstElement();
-// refreshAction.setEnabled(selectedElement != null);
-// imageFilterAction.setEnabled(selectedElement != null);
-// instanceFilterAction.setEnabled(selectedElement != null);
- }
-
- private void fillLocalPullDown(IMenuManager manager) {
- manager.removeAll();
-// manager.add(refreshAction);
-// manager.add(imageFilterAction);
-// manager.add(instanceFilterAction);
- }
-
- private void fillContextMenu(IMenuManager manager) {
-// manager.add(imageFilterAction);
-// manager.add(instanceFilterAction);
- // Other plug-ins can contribute there actions here
- // manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
private void fillLocalToolBar(IToolBarManager manager) {
manager.add(collapseall);
}
private void makeActions() {
-// refreshAction = createRefreshAction();
- // startAction = createStartAction();
- // stopAction = createStopAction();
- // rebootAction = createRebootAction();
- // destroyAction = createDestroyAction();
-
-// imageFilterAction = createImageFilterAction();
-// instanceFilterAction = createInstanceFilterAction();
-
collapseall = createCollapseAllAction();
doubleClickAction = new Action() {
@@ -189,285 +116,6 @@
return collapseAll;
}
-// private Action createInstanceFilterAction() {
-// Action instanceFilterAction = new Action() {
-// public void run() {
-// IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
-// CloudViewElement element = (CloudViewElement) selection.getFirstElement();
-// while (element != null && !(element instanceof CVCloudElement)) {
-// element = (CloudViewElement) element.getParent();
-// }
-// if (element != null) {
-// CVCloudElement cve = (CVCloudElement) element;
-// final DeltaCloud cloud = (DeltaCloud) cve.getElement();
-// Display.getDefault().asyncExec(new Runnable() {
-//
-// @Override
-// public void run() {
-// Shell shell = viewer.getControl().getShell();
-// IWizard wizard = new InstanceFilter(cloud);
-// WizardDialog dialog = new WizardDialog(shell, wizard);
-// dialog.create();
-// dialog.open();
-// }
-//
-// });
-// }
-// }
-// };
-// instanceFilterAction.setText(CVMessages.getString(INSTANCE_FILTER));
-// instanceFilterAction.setToolTipText(CVMessages.getString(INSTANCE_FILTER));
-// instanceFilterAction.setEnabled(selectedElement != null);
-//
-// return instanceFilterAction;
-// }
-
-// private Action createImageFilterAction() {
-// Action imageFilterAction = new Action() {
-// public void run() {
-// IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
-// CloudViewElement element = (CloudViewElement) selection.getFirstElement();
-// while (element != null && !(element instanceof CVCloudElement)) {
-// element = (CloudViewElement) element.getParent();
-// }
-// if (element != null) {
-// CVCloudElement cve = (CVCloudElement) element;
-// final DeltaCloud cloud = (DeltaCloud) cve.getElement();
-// Display.getDefault().asyncExec(new Runnable() {
-//
-// @Override
-// public void run() {
-// Shell shell = viewer.getControl().getShell();
-// IWizard wizard = new ImageFilter(cloud);
-// WizardDialog dialog = new WizardDialog(shell, wizard);
-// dialog.create();
-// dialog.open();
-// }
-//
-// });
-// }
-// }
-// };
-// imageFilterAction.setText(CVMessages.getString(IMAGE_FILTER));
-// imageFilterAction.setToolTipText(CVMessages.getString(IMAGE_FILTER));
-// imageFilterAction.setEnabled(selectedElement != null);
-// return imageFilterAction;
-// }
-
- // private Action createDestroyAction() {
- // Action destroyAction = new Action() {
- // public void run() {
- // ISelection selection = viewer.getSelection();
- // Object obj = ((IStructuredSelection) selection).getFirstElement();
- // if (obj instanceof CVInstanceElement) {
- // CVInstanceElement cvinstance = (CVInstanceElement) obj;
- // DeltaCloudInstance instance = (DeltaCloudInstance)
- // cvinstance.getElement();
- // CloudViewElement element = (CloudViewElement) obj;
- // while (!(element instanceof CVCloudElement))
- // element = (CloudViewElement) element.getParent();
- // CVCloudElement cvcloud = (CVCloudElement) element;
- // DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- // PerformDestroyInstanceActionThread t = new
- // PerformDestroyInstanceActionThread(cloud, instance,
- // CVMessages.getString(DESTROYING_INSTANCE_TITLE),
- // CVMessages.getFormattedString(DESTROYING_INSTANCE_MSG, new String[] {
- // instance.getName() }));
- // t.setUser(true);
- // t.schedule();
- // }
- // }
- // };
- // destroyAction.setText(CVMessages.getString(DESTROY_LABEL));
- // destroyAction.setToolTipText(CVMessages.getString(DESTROY_LABEL));
- // ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
- // ImageDescriptor delete =
- // ImageDescriptor.createFromImage(sharedImages.getImage(ISharedImages.IMG_ETOOL_DELETE));
- // ImageDescriptor delete_disabled =
- // ImageDescriptor.createFromImage(sharedImages
- // .getImage(ISharedImages.IMG_ETOOL_DELETE_DISABLED));
- // destroyAction.setImageDescriptor(delete);
- // destroyAction.setDisabledImageDescriptor(delete_disabled);
- // return destroyAction;
- // }
-
- // private Action createRebootAction() {
- // Action rebootAction = new Action() {
- // public void run() {
- // ISelection selection = viewer.getSelection();
- // Object obj = ((IStructuredSelection) selection).getFirstElement();
- // if (obj instanceof CVInstanceElement) {
- // CVInstanceElement cvinstance = (CVInstanceElement) obj;
- // DeltaCloudInstance instance = (DeltaCloudInstance)
- // cvinstance.getElement();
- // CloudViewElement element = (CloudViewElement) obj;
- // while (!(element instanceof CVCloudElement))
- // element = (CloudViewElement) element.getParent();
- // CVCloudElement cvcloud = (CVCloudElement) element;
- // DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- // PerformInstanceActionThread t = new PerformInstanceActionThread(cloud,
- // instance,
- // DeltaCloudInstance.REBOOT,
- // CVMessages.getString(REBOOTING_INSTANCE_TITLE),
- // CVMessages.getFormattedString(REBOOTING_INSTANCE_MSG, new String[] {
- // instance.getName() }),
- // DeltaCloudInstance.RUNNING);
- // t.setUser(true);
- // t.schedule();
- // }
- // }
- // };
- // rebootAction.setText(CVMessages.getString(REBOOT_LABEL));
- // rebootAction.setToolTipText(CVMessages.getString(REBOOT_LABEL));
- // rebootAction.setImageDescriptor(SWTImagesFactory.DESC_REBOOT);
- // rebootAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_REBOOTD);
- // return rebootAction;
- // }
-
- // private Action createStopAction() {
- // Action stopAction = new Action() {
- // public void run() {
- // ISelection selection = viewer.getSelection();
- // Object obj = ((IStructuredSelection) selection).getFirstElement();
- // if (obj instanceof CVInstanceElement) {
- // CVInstanceElement cvinstance = (CVInstanceElement) obj;
- // DeltaCloudInstance instance = (DeltaCloudInstance)
- // cvinstance.getElement();
- // CloudViewElement element = (CloudViewElement) obj;
- // while (!(element instanceof CVCloudElement))
- // element = (CloudViewElement) element.getParent();
- // CVCloudElement cvcloud = (CVCloudElement) element;
- // DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- // PerformInstanceActionThread t = new PerformInstanceActionThread(cloud,
- // instance,
- // DeltaCloudInstance.STOP,
- // CVMessages.getString(STOPPING_INSTANCE_TITLE),
- // CVMessages.getFormattedString(STOPPING_INSTANCE_MSG, new String[] {
- // instance.getName() }),
- // DeltaCloudInstance.STOPPED);
- // t.setUser(true);
- // t.schedule();
- // }
- // }
- // };
- // stopAction.setText(CVMessages.getString(STOP_LABEL));
- // stopAction.setToolTipText(CVMessages.getString(STOP_LABEL));
- // stopAction.setImageDescriptor(SWTImagesFactory.DESC_STOP);
- // stopAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STOPD);
- // return stopAction;
- // }
-
- // private Action createStartAction() {
- // Action startAction = new Action() {
- // public void run() {
- // ISelection selection = viewer.getSelection();
- // Object obj = ((IStructuredSelection) selection).getFirstElement();
- // if (obj instanceof CVInstanceElement) {
- // CVInstanceElement cvinstance = (CVInstanceElement) obj;
- // DeltaCloudInstance instance = (DeltaCloudInstance)
- // cvinstance.getElement();
- // CloudViewElement element = (CloudViewElement) obj;
- // while (!(element instanceof CVCloudElement))
- // element = (CloudViewElement) element.getParent();
- // CVCloudElement cvcloud = (CVCloudElement) element;
- // DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- // PerformInstanceActionThread t = new PerformInstanceActionThread(cloud,
- // instance,
- // DeltaCloudInstance.START,
- // CVMessages.getString(STARTING_INSTANCE_TITLE),
- // CVMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] {
- // instance.getName() }),
- // DeltaCloudInstance.RUNNING);
- // t.setUser(true);
- // t.schedule();
- // }
- // }
- // };
- // startAction.setText(CVMessages.getString(START_LABEL));
- // startAction.setToolTipText(CVMessages.getString(START_LABEL));
- // startAction.setImageDescriptor(SWTImagesFactory.DESC_START);
- // startAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STARTD);
- // return startAction;
- // }
-
-// private Action createRefreshAction() {
-// Action refreshAction = new Action() {
-// public void run() {
-// ISelection selection = viewer.getSelection();
-// Object obj = ((IStructuredSelection) selection).getFirstElement();
-// if (obj instanceof CloudViewElement) {
-// CloudViewElement element = (CloudViewElement) obj;
-// while (!(element instanceof CVCloudElement))
-// element = (CloudViewElement) element.getParent();
-// CVCloudElement cloud = (CVCloudElement) element;
-// cloud.loadChildren();
-// }
-// }
-// };
-// refreshAction.setText(CVMessages.getString(REFRESH));
-// refreshAction.setToolTipText(CVMessages.getString(REFRESH));
-// refreshAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
-// getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
-// refreshAction.setEnabled(selectedElement != null);
-// return refreshAction;
-// }
-
- // private Action createEditCloudAction() {
- // Action editCloud = new Action() {
- // public void run() {
- // IStructuredSelection selection = (IStructuredSelection)
- // viewer.getSelection();
- // CloudViewElement element = (CloudViewElement)
- // selection.getFirstElement();
- // while (element != null && !(element instanceof CVCloudElement)) {
- // element = (CloudViewElement) element.getParent();
- // }
- // if (element != null) {
- // CVCloudElement cloudElement = (CVCloudElement) element;
- // DeltaCloud cloud = (DeltaCloud) cloudElement.getElement();
- // IWizard wizard = new EditCloudConnection(cloud);
- // Shell shell = viewer.getControl().getShell();
- // WizardDialog dialog = new WizardDialog(shell, wizard);
- // dialog.create();
- // dialog.open();
- // }
- // }
- // };
- // editCloud.setText(CVMessages.getString(EDIT_CLOUD));
- // editCloud.setToolTipText(CVMessages.getString(EDIT_CLOUD));
- // editCloud.setEnabled(selectedElement != null);
- // return editCloud;
- // }
-
- // private Action createDisconnectAction() {
- // Action removeCloud = new Action() {
- // public void run() {
- // DisconnectCloudsDialog dialog = new DisconnectCloudsDialog(
- // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()
- // , ((IStructuredSelection) viewer.getSelection()).toList());
- // if (Dialog.OK == dialog.open()) {
- // removeCloudViewElements(dialog.getResult());
- // }
- // }
- //
- // private void removeCloudViewElements(Object[] cloudViewerElements) {
- // // viewer.remove(cloudViewerElements);
- // for (Object cloudViewElement : cloudViewerElements) {
- // Assert.isTrue(cloudViewElement instanceof CloudViewElement);
- // DeltaCloud deltaCloud = (DeltaCloud) ((CloudViewElement)
- // cloudViewElement).getElement();
- // DeltaCloudManager.getDefault().removeCloud(deltaCloud);
- // }
- // }
- // };
- // removeCloud.setText(CVMessages.getString(REMOVE_CLOUD));
- // removeCloud.setToolTipText(CVMessages.getString(REMOVE_CLOUD));
- // removeCloud.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- // getImageDescriptor(ISharedImages.IMG_ELCL_REMOVE));
- // removeCloud.setEnabled(selectedElement != null);
- // return removeCloud;
- // }
-
private void hookDoubleClickAction() {
viewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
@@ -476,9 +124,6 @@
});
}
- /**
- * Passing the focus request to the viewer's control.
- */
public void setFocus() {
viewer.getControl().setFocus();
}
14 years, 3 months
JBoss Tools SVN: r25832 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/commands and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 11:30:40 -0400 (Thu, 14 Oct 2010)
New Revision: 25832
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
Log:
[JBIDE-7329] implemented filter commands (instance & image)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 15:10:58 UTC (rev 25831)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 15:30:40 UTC (rev 25832)
@@ -137,6 +137,20 @@
</with>
</activeWhen>
</handler>
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.RefreshCloudHandler"
+ commandId="org.eclipse.ui.file.refresh">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
<!-- instance command handlers -->
<handler
class="org.jboss.tools.deltacloud.ui.commands.StartInstanceHandler"
@@ -209,10 +223,38 @@
</with>
</activeWhen>
</handler>
+ <!-- Filter handlers -->
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.FilterImagesHandler"
+ commandId="org.jboss.tools.deltacloud.ui.filterimages">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.FilterInstancesHandler"
+ commandId="org.jboss.tools.deltacloud.ui.filterinstances">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
</extension>
- <extension
- point="org.eclipse.ui.menus">
- <!-- DeltaCloudView context menu -->
+ <extension point="org.eclipse.ui.menus">
+ <!-- DeltaCloudView context menu ================================== -->
<menuContribution
allPopups="true"
locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
@@ -235,6 +277,12 @@
style="push"
tooltip="Edit Conncetion">
</command>
+ <command
+ commandId="org.eclipse.ui.file.refresh"
+ label="Refresh Cloud"
+ style="push"
+ tooltip="Refresh Cloud">
+ </command>
<!-- image commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.createinstance"
@@ -329,8 +377,42 @@
</with>
</visibleWhen>
</command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.filterimages"
+ label="Filter images..."
+ style="push"
+ tooltip="Filter Images...">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.filterinstances"
+ label="Filter Instances..."
+ style="push"
+ tooltip="Filter Instances...">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
</menuContribution>
- <!-- DeltaCloudView local menu -->
+ <!-- DeltaCloudView local menu ========================================= -->
<menuContribution
allPopups="true"
locationURI="menu:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
@@ -447,8 +529,43 @@
</with>
</visibleWhen>
</command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.filterimages"
+ label="Filter Images..."
+ style="push"
+ tooltip="Filter Images...">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.filterinstances"
+ label="Filter Instances..."
+ style="push"
+ tooltip="Filter Instances...">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
</menuContribution>
</extension>
+ <!-- Commands -->
<extension
point="org.eclipse.ui.commands">
<command
@@ -487,6 +604,17 @@
id="org.jboss.tools.deltacloud.ui.destroyinstance"
name="Destroy">
</command>
+ <!-- filter commands -->
+ <command
+ description="Filters images"
+ id="org.jboss.tools.deltacloud.ui.filterimages"
+ name="Filter Images...">
+ </command>
+ <command
+ description="Filters instances"
+ id="org.jboss.tools.deltacloud.ui.filterinstances"
+ name="Filter Instances...">
+ </command>
</extension>
</plugin>
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java 2010-10-14 15:30:40 UTC (rev 25832)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.wizards.ImageFilter;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class FilterImagesHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CloudViewElement cloudViewElement = UIUtils.getFirstElement(selection, CloudViewElement.class);
+ createImagesFilter(cloudViewElement, HandlerUtil.getActiveShell(event));
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void createImagesFilter(CloudViewElement element, final Shell shell) {
+ if (element != null) {
+ while (element != null && !(element instanceof CVCloudElement)) {
+ element = (CloudViewElement) element.getParent();
+ }
+ if (element != null) {
+ CVCloudElement cve = (CVCloudElement) element;
+ final DeltaCloud cloud = (DeltaCloud) cve.getElement();
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ IWizard wizard = new ImageFilter(cloud);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+ });
+ }
+
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java 2010-10-14 15:30:40 UTC (rev 25832)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilter;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class FilterInstancesHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CloudViewElement cloudViewElement = UIUtils.getFirstElement(selection, CloudViewElement.class);
+ createInstancesFilter(cloudViewElement, HandlerUtil.getActiveShell(event));
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void createInstancesFilter(CloudViewElement element, final Shell shell) {
+ if (element != null) {
+ while (element != null && !(element instanceof CVCloudElement)) {
+ element = (CloudViewElement) element.getParent();
+ }
+ if (element != null) {
+ CVCloudElement cve = (CVCloudElement) element;
+ final DeltaCloud cloud = (DeltaCloud) cve.getElement();
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ IWizard wizard = new InstanceFilter(cloud);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+ });
+ }
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java 2010-10-14 15:30:40 UTC (rev 25832)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class RefreshCloudHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CloudViewElement cvImage = UIUtils.getFirstElement(selection, CloudViewElement.class);
+ refresh(cvImage);
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void refresh(CloudViewElement cloudViewElement) {
+ if (cloudViewElement != null) {
+ while (!(cloudViewElement instanceof CVCloudElement))
+ cloudViewElement = (CloudViewElement) cloudViewElement.getParent();
+ CVCloudElement cloud = (CVCloudElement) cloudViewElement;
+ cloud.loadChildren();
+
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-10-14 15:10:58 UTC (rev 25831)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-10-14 15:30:40 UTC (rev 25832)
@@ -30,14 +30,9 @@
CloudSelector.label=Select Cloud:
-Refresh.label=Refresh Cloud
Filter.label=Filter...
Filtered.label=filtered
FilteredImages.tooltip=Images shown have been filtered
-ImageFilter.label=Filter Images...
-InstanceFilter.label=Filter Instances...
-CreateInstance.label=Launch Instance
-DeleteInstance.label=Delete Instance
ShowInRSE.label=Show in Remote System Explorer
Start.label=Start
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-14 15:10:58 UTC (rev 25831)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-14 15:30:40 UTC (rev 25832)
@@ -28,7 +28,6 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.views.properties.IPropertySheetPage;
@@ -38,7 +37,6 @@
import org.jboss.tools.deltacloud.core.ICloudManagerListener;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
-import org.jboss.tools.internal.deltacloud.ui.wizards.ImageFilter;
import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilter;
public class DeltaCloudView extends ViewPart implements ICloudManagerListener,
@@ -52,23 +50,23 @@
private static final String CONTEXT_MENU_ID = "popup:" + ID;
private static final String VIEW_MENU_ID = "menu:" + ID;
- private static final String REFRESH = "Refresh.label"; //$NON-NLS-1$
- private static final String CREATE_INSTANCE = "CreateInstance.label"; //$NON-NLS-1$
+// private static final String REFRESH = "Refresh.label"; //$NON-NLS-1$
+// private static final String CREATE_INSTANCE = "CreateInstance.label"; //$NON-NLS-1$
// private final static String START_LABEL = "Start.label"; //$NON-NLS-1$
// private final static String STOP_LABEL = "Stop.label"; //$NON-NLS-1$
// private final static String REBOOT_LABEL = "Reboot.label"; //$NON-NLS-1$
// private final static String DESTROY_LABEL = "Destroy.label"; //$NON-NLS-1$
- private final static String IMAGE_FILTER = "ImageFilter.label"; //$NON-NLS-1$
+// private final static String IMAGE_FILTER = "ImageFilter.label"; //$NON-NLS-1$
private final static String INSTANCE_FILTER = "InstanceFilter.label"; //$NON-NLS-1$
public static final String COLLAPSE_ALL = "CollapseAll.label"; //$NON-NLS-1$
private TreeViewer viewer;
- private Action refreshAction;
+// private Action refreshAction;
private Action collapseall;
private Action doubleClickAction;
- private Action imageFilterAction;
- private Action instanceFilterAction;
+// private Action imageFilterAction;
+// private Action instanceFilterAction;
private CloudViewElement selectedElement;
@@ -129,33 +127,26 @@
IActionBars actionBars = getViewSite().getActionBars();
IMenuManager menuManager = actionBars.getMenuManager();
UIUtils.registerContributionManager(VIEW_MENU_ID, menuManager, viewer.getControl());
- // menuMgr.addMenuListener(new IMenuListener() {
- // public void menuAboutToShow(IMenuManager manager) {
- // DeltaCloudView.this.fillLocalPullDown(manager);
- // }
- // });
- // fillLocalPullDown(menuMgr);
- // fillLocalToolBar(bars.getToolBarManager());
}
private void handleSelection() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
selectedElement = (CloudViewElement) selection.getFirstElement();
- refreshAction.setEnabled(selectedElement != null);
- imageFilterAction.setEnabled(selectedElement != null);
- instanceFilterAction.setEnabled(selectedElement != null);
+// refreshAction.setEnabled(selectedElement != null);
+// imageFilterAction.setEnabled(selectedElement != null);
+// instanceFilterAction.setEnabled(selectedElement != null);
}
private void fillLocalPullDown(IMenuManager manager) {
manager.removeAll();
- manager.add(refreshAction);
- manager.add(imageFilterAction);
- manager.add(instanceFilterAction);
+// manager.add(refreshAction);
+// manager.add(imageFilterAction);
+// manager.add(instanceFilterAction);
}
private void fillContextMenu(IMenuManager manager) {
- manager.add(imageFilterAction);
- manager.add(instanceFilterAction);
+// manager.add(imageFilterAction);
+// manager.add(instanceFilterAction);
// Other plug-ins can contribute there actions here
// manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
@@ -165,14 +156,14 @@
}
private void makeActions() {
- refreshAction = createRefreshAction();
+// refreshAction = createRefreshAction();
// startAction = createStartAction();
// stopAction = createStopAction();
// rebootAction = createRebootAction();
// destroyAction = createDestroyAction();
- imageFilterAction = createImageFilterAction();
- instanceFilterAction = createInstanceFilterAction();
+// imageFilterAction = createImageFilterAction();
+// instanceFilterAction = createInstanceFilterAction();
collapseall = createCollapseAllAction();
@@ -198,71 +189,71 @@
return collapseAll;
}
- private Action createInstanceFilterAction() {
- Action instanceFilterAction = new Action() {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- CloudViewElement element = (CloudViewElement) selection.getFirstElement();
- while (element != null && !(element instanceof CVCloudElement)) {
- element = (CloudViewElement) element.getParent();
- }
- if (element != null) {
- CVCloudElement cve = (CVCloudElement) element;
- final DeltaCloud cloud = (DeltaCloud) cve.getElement();
- Display.getDefault().asyncExec(new Runnable() {
+// private Action createInstanceFilterAction() {
+// Action instanceFilterAction = new Action() {
+// public void run() {
+// IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+// CloudViewElement element = (CloudViewElement) selection.getFirstElement();
+// while (element != null && !(element instanceof CVCloudElement)) {
+// element = (CloudViewElement) element.getParent();
+// }
+// if (element != null) {
+// CVCloudElement cve = (CVCloudElement) element;
+// final DeltaCloud cloud = (DeltaCloud) cve.getElement();
+// Display.getDefault().asyncExec(new Runnable() {
+//
+// @Override
+// public void run() {
+// Shell shell = viewer.getControl().getShell();
+// IWizard wizard = new InstanceFilter(cloud);
+// WizardDialog dialog = new WizardDialog(shell, wizard);
+// dialog.create();
+// dialog.open();
+// }
+//
+// });
+// }
+// }
+// };
+// instanceFilterAction.setText(CVMessages.getString(INSTANCE_FILTER));
+// instanceFilterAction.setToolTipText(CVMessages.getString(INSTANCE_FILTER));
+// instanceFilterAction.setEnabled(selectedElement != null);
+//
+// return instanceFilterAction;
+// }
- @Override
- public void run() {
- Shell shell = viewer.getControl().getShell();
- IWizard wizard = new InstanceFilter(cloud);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
+// private Action createImageFilterAction() {
+// Action imageFilterAction = new Action() {
+// public void run() {
+// IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+// CloudViewElement element = (CloudViewElement) selection.getFirstElement();
+// while (element != null && !(element instanceof CVCloudElement)) {
+// element = (CloudViewElement) element.getParent();
+// }
+// if (element != null) {
+// CVCloudElement cve = (CVCloudElement) element;
+// final DeltaCloud cloud = (DeltaCloud) cve.getElement();
+// Display.getDefault().asyncExec(new Runnable() {
+//
+// @Override
+// public void run() {
+// Shell shell = viewer.getControl().getShell();
+// IWizard wizard = new ImageFilter(cloud);
+// WizardDialog dialog = new WizardDialog(shell, wizard);
+// dialog.create();
+// dialog.open();
+// }
+//
+// });
+// }
+// }
+// };
+// imageFilterAction.setText(CVMessages.getString(IMAGE_FILTER));
+// imageFilterAction.setToolTipText(CVMessages.getString(IMAGE_FILTER));
+// imageFilterAction.setEnabled(selectedElement != null);
+// return imageFilterAction;
+// }
- });
- }
- }
- };
- instanceFilterAction.setText(CVMessages.getString(INSTANCE_FILTER));
- instanceFilterAction.setToolTipText(CVMessages.getString(INSTANCE_FILTER));
- instanceFilterAction.setEnabled(selectedElement != null);
-
- return instanceFilterAction;
- }
-
- private Action createImageFilterAction() {
- Action imageFilterAction = new Action() {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- CloudViewElement element = (CloudViewElement) selection.getFirstElement();
- while (element != null && !(element instanceof CVCloudElement)) {
- element = (CloudViewElement) element.getParent();
- }
- if (element != null) {
- CVCloudElement cve = (CVCloudElement) element;
- final DeltaCloud cloud = (DeltaCloud) cve.getElement();
- Display.getDefault().asyncExec(new Runnable() {
-
- @Override
- public void run() {
- Shell shell = viewer.getControl().getShell();
- IWizard wizard = new ImageFilter(cloud);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
- });
- }
- }
- };
- imageFilterAction.setText(CVMessages.getString(IMAGE_FILTER));
- imageFilterAction.setToolTipText(CVMessages.getString(IMAGE_FILTER));
- imageFilterAction.setEnabled(selectedElement != null);
- return imageFilterAction;
- }
-
// private Action createDestroyAction() {
// Action destroyAction = new Action() {
// public void run() {
@@ -399,27 +390,27 @@
// return startAction;
// }
- private Action createRefreshAction() {
- Action refreshAction = new Action() {
- public void run() {
- ISelection selection = viewer.getSelection();
- Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof CloudViewElement) {
- CloudViewElement element = (CloudViewElement) obj;
- while (!(element instanceof CVCloudElement))
- element = (CloudViewElement) element.getParent();
- CVCloudElement cloud = (CVCloudElement) element;
- cloud.loadChildren();
- }
- }
- };
- refreshAction.setText(CVMessages.getString(REFRESH));
- refreshAction.setToolTipText(CVMessages.getString(REFRESH));
- refreshAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
- refreshAction.setEnabled(selectedElement != null);
- return refreshAction;
- }
+// private Action createRefreshAction() {
+// Action refreshAction = new Action() {
+// public void run() {
+// ISelection selection = viewer.getSelection();
+// Object obj = ((IStructuredSelection) selection).getFirstElement();
+// if (obj instanceof CloudViewElement) {
+// CloudViewElement element = (CloudViewElement) obj;
+// while (!(element instanceof CVCloudElement))
+// element = (CloudViewElement) element.getParent();
+// CVCloudElement cloud = (CVCloudElement) element;
+// cloud.loadChildren();
+// }
+// }
+// };
+// refreshAction.setText(CVMessages.getString(REFRESH));
+// refreshAction.setToolTipText(CVMessages.getString(REFRESH));
+// refreshAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
+// getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
+// refreshAction.setEnabled(selectedElement != null);
+// return refreshAction;
+// }
// private Action createEditCloudAction() {
// Action editCloud = new Action() {
14 years, 3 months