JBoss Tools SVN: r25871 - trunk/deltacloud/features.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-15 11:39:29 -0400 (Fri, 15 Oct 2010)
New Revision: 25871
Removed:
trunk/deltacloud/features/build.properties
trunk/deltacloud/features/feature.xml
Log:
[JBIDE-7320] removed erroneous artifacts
Deleted: trunk/deltacloud/features/build.properties
===================================================================
--- trunk/deltacloud/features/build.properties 2010-10-15 15:21:06 UTC (rev 25870)
+++ trunk/deltacloud/features/build.properties 2010-10-15 15:39:29 UTC (rev 25871)
@@ -1 +0,0 @@
-bin.includes = feature.xml
Deleted: trunk/deltacloud/features/feature.xml
===================================================================
--- trunk/deltacloud/features/feature.xml 2010-10-15 15:21:06 UTC (rev 25870)
+++ trunk/deltacloud/features/feature.xml 2010-10-15 15:39:29 UTC (rev 25871)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.jboss.tools.deltacloud.test.feature"
- label="Feature"
- version="1.0.0.qualifier">
-
- <description url="http://www.example.com/description">
- [Enter Feature Description here.]
- </description>
-
- <copyright url="http://www.example.com/copyright">
- [Enter Copyright Description here.]
- </copyright>
-
- <license url="http://www.example.com/license">
- [Enter License Description here.]
- </license>
-
-</feature>
14 years, 2 months
JBoss Tools SVN: r25870 - in trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf: test/validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-10-15 11:21:06 -0400 (Fri, 15 Oct 2010)
New Revision: 25870
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7147 Limited the number of problem markers per file.
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-15 14:58:37 UTC (rev 25869)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2010-10-15 15:21:06 UTC (rev 25870)
@@ -26,7 +26,7 @@
public class ELValidatorTest extends AbstractResourceMarkerTest{
public static final String MARKER_TYPE = "org.eclipse.wst.validation.problemmarker";
-
+
protected void setUp() throws Exception {
// JobUtils.waitForIdle();
project = ResourcesPlugin.getWorkspace().getRoot().getProject("JSFKickStartOldFormat");
@@ -43,16 +43,16 @@
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,
@@ -71,7 +71,7 @@
try {
copyContentsFile("WebContent/WEB-INF/faces-config.xml", "WebContent/WEB-INF/faces-config.1");
-
+
assertMarkerIsCreatedForLine(
"WebContent/testElRevalidation.xhtml",
JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
@@ -144,9 +144,9 @@
JSFValidationMessages.UNKNOWN_EL_VARIABLE_NAME,
new Object[] {"wrongUserName2"},
4);
-
+
store.setValue(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, max);
-
+
assertMarkerIsCreatedForLine(
"WebContent/pages/maxNumberOfMarkers.jsp",
JSFValidationMessages.UNKNOWN_EL_VARIABLE_NAME,
@@ -233,7 +233,7 @@
private void assertMarkerIsCreatedForLine(String fileName, String template, Object[] parameters, int lineNumber) throws CoreException{
String messagePattern = MessageFormat.format(template, parameters);
IFile file = project.getFile(fileName);
-
+
ValidationFramework.getDefault().validate(file, new NullProgressMonitor());
IMarker[] markers = file.findMarkers(null, true, IResource.DEPTH_INFINITE);
@@ -249,7 +249,7 @@
private void assertMarkerIsNotCreatedForLine(String fileName, String template, Object[] parameters, int lineNumber) throws CoreException{
String messagePattern = MessageFormat.format(template, parameters);
IFile file = project.getFile(fileName);
-
+
ValidationFramework.getDefault().validate(file, new NullProgressMonitor());
IMarker[] markers = file.findMarkers(null, true, IResource.DEPTH_INFINITE);
14 years, 2 months
JBoss Tools SVN: r25869 - trunk/seam/plugins/org.jboss.tools.seam.ui.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-10-15 10:58:37 -0400 (Fri, 15 Oct 2010)
New Revision: 25869
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
https://jira.jboss.org/browse/JBIDE-7147 Limited the number of problem markers per file.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2010-10-15 14:46:14 UTC (rev 25868)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2010-10-15 14:58:37 UTC (rev 25869)
@@ -711,7 +711,12 @@
<extension point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
markerType="org.eclipse.wst.validation.problemmarker"
- class="org.jboss.tools.seam.ui.marker.SeamProblemMarkerResolutionGenerator">
- </markerResolutionGenerator>
+ class="org.jboss.tools.seam.ui.marker.SeamProblemMarkerResolutionGenerator"/>
+ <markerResolutionGenerator
+ class="org.jboss.tools.seam.ui.marker.SeamProblemMarkerResolutionGenerator"
+ markerType="org.jboss.tools.jst.web.kb.kbproblemmarker"/>
+ <markerResolutionGenerator
+ class="org.jboss.tools.seam.ui.marker.SeamProblemMarkerResolutionGenerator"
+ markerType="org.jboss.tools.seam.core.seamproblem"/>
</extension>
</plugin>
14 years, 2 months
JBoss Tools SVN: r25868 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-10-15 10:46:14 -0400 (Fri, 15 Oct 2010)
New Revision: 25868
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
Log:
JBIDE-7201
SeamELContentAssist tests failures
SeamELContentAssistJbide1676Test rolled back to revision 21676 because of incorrect modifications were made
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2010-10-15 14:21:16 UTC (rev 25867)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2010-10-15 14:46:14 UTC (rev 25868)
@@ -1,6 +1,5 @@
package org.jboss.tools.seam.ui.test.ca;
-import java.util.List;
import java.util.Set;
import java.util.TreeSet;
@@ -283,24 +282,34 @@
assertTrue("Cannot find the starting point in the test file \"" + JAVA_FILENAME + "\"", (start != -1));
+ ICompletionProposal[] result= null;
String errorMessage = null;
- List<ICompletionProposal> res = TestUtil.collectProposals(contentAssistant, viewer, offsetToTest);
- assertTrue("Content Assistant peturned no proposals", (res != null && res.size() > 0));
-
+ IContentAssistProcessor p= TestUtil.getProcessor(viewer, offsetToTest, contentAssistant);
+ if (p != null) {
+ try {
+ result= p.computeCompletionProposals(viewer, offsetToTest);
+ } catch (Throwable x) {
+ x.printStackTrace();
+ }
+ errorMessage= p.getErrorMessage();
+ }
+
// if (errorMessage != null && errorMessage.trim().length() > 0) {
// System.out.println("#" + offsetToTest + ": ERROR MESSAGE: " + errorMessage);
// }
+
+ assertTrue("Content Assistant peturned no proposals", (result != null && result.length > 0));
// compare SeamELCompletionProposals in the result to the filtered valid proposals
Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
Set<String> nonExistingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
Set<String> filteredValidProposals = getJavaStringValidELProposals();
- for (ICompletionProposal p : res) {
+ for (int j = 0; j < result.length; j++) {
// Look only for SeamELProposalProcessor proposals
- if (p instanceof ELProposalProcessor.Proposal) {
- ELProposalProcessor.Proposal proposal = (ELProposalProcessor.Proposal)p;
+ if (result[j] instanceof ELProposalProcessor.Proposal) {
+ ELProposalProcessor.Proposal proposal = (ELProposalProcessor.Proposal)result[j];
String proposalString = proposal.getPrefixCompletionText(document, offsetToTest).toString();
if (filteredValidProposals.contains(proposalString)) {
14 years, 2 months
JBoss Tools SVN: r25867 - in trunk: vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-10-15 10:21:16 -0400 (Fri, 15 Oct 2010)
New Revision: 25867
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7218 , Empty line after 'key=value' pair was removed, junit was corrected.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java 2010-10-15 14:01:13 UTC (rev 25866)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java 2010-10-15 14:21:16 UTC (rev 25867)
@@ -116,7 +116,12 @@
* via getInitialContent() method of the page2 during the file creation.
*/
if (bundleFile.exists() && !page1.isNewFile()) {
- InputStream is = new ByteArrayInputStream(page1.getKeyValuePair().getBytes());
+ /*
+ * https://jira.jboss.org/browse/JBIDE-7218
+ * Add only one line before adding the value.
+ */
+ String writeToFile = "\n" + page1.getKeyValuePair(); //$NON-NLS-1$
+ InputStream is = new ByteArrayInputStream(writeToFile.getBytes());
try {
bundleFile.appendContents(is, false, true, null);
is.close();
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-10-15 14:01:13 UTC (rev 25866)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-10-15 14:21:16 UTC (rev 25867)
@@ -525,7 +525,7 @@
* @return a pair <code>\nkey=value\n</code>
*/
public String getKeyValuePair() {
- return "\n" + propsKey.getText() + Constants.EQUAL + propsValue.getText() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ return propsKey.getText() + Constants.EQUAL + propsValue.getText();
}
/**
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java 2010-10-15 14:01:13 UTC (rev 25866)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java 2010-10-15 14:21:16 UTC (rev 25867)
@@ -341,7 +341,7 @@
SWTBotEditor editor2 = SWTTestExt.eclipse.openFile(
JBT_TEST_PROJECT_NAME, "WebContent", "pages", //$NON-NLS-1$ //$NON-NLS-2$
"externalize.properties"); //$NON-NLS-1$
- editor2.toTextEditor().selectLine(1);
+ editor2.toTextEditor().selectLine(0);
String line = editor2.toTextEditor().getSelection();
assertEquals("Created file is incorrect", "Input=Input", line); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -534,7 +534,7 @@
SWTBotEditor editor2 = SWTTestExt.eclipse.openFile(
JBT_TEST_PROJECT_NAME, "WebContent", "pages", //$NON-NLS-1$ //$NON-NLS-2$
"hello.properties"); //$NON-NLS-1$
- editor2.toTextEditor().selectLine(1);
+ editor2.toTextEditor().selectLine(0);
String line = editor2.toTextEditor().getSelection();
assertEquals("Created file is incorrect", "Plain_text=Plain text", line); //$NON-NLS-1$ //$NON-NLS-2$
/*
14 years, 2 months
JBoss Tools SVN: r25866 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-10-15 10:01:13 -0400 (Fri, 15 Oct 2010)
New Revision: 25866
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
Log:
JBIDE-7201
SeamELContentAssist tests failures
Test execution time is reduced
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java 2010-10-15 13:29:07 UTC (rev 25865)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java 2010-10-15 14:01:13 UTC (rev 25866)
@@ -457,8 +457,10 @@
openEditor(PAGE_NAME);
List<IRegion> regionsToTest = getELRegionsToTest(document);
- if (regionsToTest != null) {
- for (IRegion region : regionsToTest) {
+
+ if (regionsToTest != null && regionsToTest.size() >= 1) {
+// for (IRegion region : regionsToTest) {
+ IRegion region = regionsToTest.get(0);
try {
// System.out.println("Seam EL Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
// document.get(region.getOffset(), region.getLength()) + "]");
@@ -474,7 +476,8 @@
String errorMessage = null;
List<ICompletionProposal> res = TestUtil.collectProposals(contentAssistant, viewer, offset);
-
+ assertTrue("Content Assist returned no proposals: ", (res != null && res.size() > 0));
+
// if (errorMessage != null && errorMessage.trim().length() > 0) {
// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
// }
@@ -482,41 +485,39 @@
// compare SeamELCompletionProposals in the result to the filtered valid proposals
Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- if (res != null && res.size() > 0) {
- for (ICompletionProposal p : res) {
+ for (ICompletionProposal p : res) {
// System.out.println("Result#" + i + "-" + j + " ==> " + result[j].getClass().getName());
- // Cannot separate Seam EL proposals from all the others,
- // so check only the required proposals existance
- //
- if (p instanceof AutoContentAssistantProposal) {
- AutoContentAssistantProposal proposal = (AutoContentAssistantProposal)p;
-
- String proposalString = proposal.getReplacementString();
- if (filteredValidProposals.contains(proposalString)) {
- existingProposals.add(proposalString);
- filteredValidProposals.remove(proposalString);
- } else {
- String validProposal = null;
- if (proposalString.indexOf("(") > -1) {
- String methodName = proposalString.substring(0, proposalString.indexOf("(")).trim();
- // Find method with the same name in filtered valid proposals
- for (String valid : filteredValidProposals) {
- if (valid.indexOf("(") > -1) {
- String validName = valid.substring(0, valid.indexOf("(")).trim();
-
- if (methodName.equals(validName)) {
- validProposal = valid;
- break;
- }
+ // Cannot separate Seam EL proposals from all the others,
+ // so check only the required proposals existance
+ //
+ if (p instanceof AutoContentAssistantProposal) {
+ AutoContentAssistantProposal proposal = (AutoContentAssistantProposal)p;
+
+ String proposalString = proposal.getReplacementString();
+ if (filteredValidProposals.contains(proposalString)) {
+ existingProposals.add(proposalString);
+ filteredValidProposals.remove(proposalString);
+ } else {
+ String validProposal = null;
+ if (proposalString.indexOf("(") > -1) {
+ String methodName = proposalString.substring(0, proposalString.indexOf("(")).trim();
+ // Find method with the same name in filtered valid proposals
+ for (String valid : filteredValidProposals) {
+ if (valid.indexOf("(") > -1) {
+ String validName = valid.substring(0, valid.indexOf("(")).trim();
+
+ if (methodName.equals(validName)) {
+ validProposal = valid;
+ break;
}
}
- }
- if (validProposal != null) {
- existingProposals.add(validProposal);
- filteredValidProposals.remove(validProposal);
}
-
+ }
+ if (validProposal != null) {
+ existingProposals.add(validProposal);
+ filteredValidProposals.remove(validProposal);
}
+
}
}
}
@@ -526,11 +527,12 @@
} catch (BadLocationException e) {
assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
}
- }
+// }
}
regionsToTest = getAttributeValueRegions(viewer);
- if (regionsToTest != null) {
- for (IRegion region : regionsToTest) {
+ if (regionsToTest != null && regionsToTest.size() >= 1) {
+// for (IRegion region : regionsToTest) {
+ IRegion region = regionsToTest.get(0);
try {
// System.out.println("Attribute Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
// document.get(region.getOffset(), region.getLength()) + "]");
@@ -572,6 +574,7 @@
String errorMessage = null;
List<ICompletionProposal> res = TestUtil.collectProposals(contentAssistant, viewer, offset);
+ assertTrue("Content Assist returned no proposals: ", (res != null && res.size() > 0));
// if (errorMessage != null && errorMessage.trim().length() > 0) {
// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
// }
@@ -579,39 +582,37 @@
// compare SeamELCompletionProposals in the result to the filtered valid proposals
Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- if (res != null && res.size() > 0) {
- for (ICompletionProposal p : res) {
+ for (ICompletionProposal p : res) {
// System.out.println("Result#" + i + "/" + j + " ==> " + result[j].getClass().getName());
- // Cannot separate Seam EL proposals from all the others,
- // so check only the required proposals existance
- //
- if (p instanceof AutoContentAssistantProposal) {
- AutoContentAssistantProposal proposal = (AutoContentAssistantProposal)p;
- String proposalString = proposal.getReplacementString();
-
- if (filteredValidProposals.contains(proposalString)) {
- existingProposals.add(proposalString);
- filteredValidProposals.remove(proposalString);
- } else {
- String validProposal = null;
- if (proposalString.indexOf("(") > -1) {
- String methodName = proposalString.substring(0, proposalString.indexOf("(")).trim();
- // Find method with the same name in filtered valid proposals
- for (String valid : filteredValidProposals) {
- if (valid.indexOf("(") > -1) {
- String validName = valid.substring(0, valid.indexOf("(")).trim();
-
- if (methodName.equals(validName)) {
- validProposal = valid;
- break;
- }
+ // Cannot separate Seam EL proposals from all the others,
+ // so check only the required proposals existance
+ //
+ if (p instanceof AutoContentAssistantProposal) {
+ AutoContentAssistantProposal proposal = (AutoContentAssistantProposal)p;
+ String proposalString = proposal.getReplacementString();
+
+ if (filteredValidProposals.contains(proposalString)) {
+ existingProposals.add(proposalString);
+ filteredValidProposals.remove(proposalString);
+ } else {
+ String validProposal = null;
+ if (proposalString.indexOf("(") > -1) {
+ String methodName = proposalString.substring(0, proposalString.indexOf("(")).trim();
+ // Find method with the same name in filtered valid proposals
+ for (String valid : filteredValidProposals) {
+ if (valid.indexOf("(") > -1) {
+ String validName = valid.substring(0, valid.indexOf("(")).trim();
+
+ if (methodName.equals(validName)) {
+ validProposal = valid;
+ break;
}
}
- }
- if (validProposal != null) {
- existingProposals.add(validProposal);
- filteredValidProposals.remove(validProposal);
}
+ }
+ if (validProposal != null) {
+ existingProposals.add(validProposal);
+ filteredValidProposals.remove(validProposal);
}
}
}
@@ -623,7 +624,7 @@
e.printStackTrace();
assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
}
- }
+// }
}
closeEditor();
14 years, 2 months
JBoss Tools SVN: r25865 - trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-10-15 09:29:07 -0400 (Fri, 15 Oct 2010)
New Revision: 25865
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/BrowseSelectorDialog.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java
Log:
https://jira.jboss.org/browse/JBIDE-7107
more fixes: query expression not constructed properly
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/BrowseSelectorDialog.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/BrowseSelectorDialog.java 2010-10-15 13:15:35 UTC (rev 25864)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/BrowseSelectorDialog.java 2010-10-15 13:29:07 UTC (rev 25865)
@@ -209,8 +209,21 @@
for (int i=0; i<sel2.length; ++i) {
Object data = sel2[i].getData();
if (data instanceof TreeNode)
- data = ((TreeNode)data).getModelObject();
- result.add(data);
+ {
+ // list of the selected node's model object ancestry in reverse order
+ ArrayList<Object> elements = new ArrayList<Object>();
+ TreeNode node = (TreeNode)data;
+ ITreeContentProvider prov = (ITreeContentProvider)fTreeViewer.getContentProvider();
+ do {
+ elements.add(node.getModelObject());
+ node = (TreeNode)prov.getParent(node);
+ }
+ while (node!=null && node.getModelObject()!=sel1[0]);
+
+ for (int e=elements.size(); e>0; --e) {
+ result.add(elements.get(e-1));
+ }
+ }
}
setResult(result);
}
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java 2010-10-15 13:15:35 UTC (rev 25864)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java 2010-10-15 13:29:07 UTC (rev 25865)
@@ -454,53 +454,21 @@
if (result.length>=1) {
type = result[0];
+ int index = 1;
if (type instanceof Message) {
message = (Message) type;
- if (result.length>=2) {
- if (result[1] instanceof Part) {
- part = result[1];
- }
- else if (result[1] instanceof XSDComponent) {
- // The selected XSD component must be a child of the message part.
- // Look for part and build query path to the component.
- // TODO: move this search algorithm to ModelQuery class
- for ( Part p : (EList<Part>)message.getEParts() ) {
- XSDTypeDefinition def = p.getElementDeclaration().getTypeDefinition();
- XSDComponent comp = (XSDComponent)result[1];
- String s = "";
- while ( comp.eContainer() instanceof XSDComponent ) {
- comp = (XSDComponent)comp.eContainer();
- if (def == comp) {
- part = p.getName();
- query = s;
- break;
- }
- else
- {
- if (comp instanceof XSDParticle && ((XSDParticle)comp).getTerm() instanceof XSDNamedComponent)
- {
- XSDNamedComponent nc = (XSDNamedComponent)((XSDParticle)comp).getTerm();
- s = "/" + nc.getName() + s;
- }
- }
- }
- }
- }
+ if (result.length>=2 && result[1] instanceof Part) {
+ part = ((Part)result[1]).getName();
+ index = 2;
}
}
- else if (type instanceof XSDComponent) {
- if (result.length>=2 && result[1] instanceof XSDComponent) {
- XSDComponent comp = (XSDComponent)result[1];
- query = "";
- while ( comp.eContainer() instanceof XSDComponent ) {
- comp = (XSDComponent)comp.eContainer();
- if (comp instanceof XSDParticle && ((XSDParticle)comp).getTerm() instanceof XSDNamedComponent)
- {
- XSDNamedComponent nc = (XSDNamedComponent)((XSDParticle)comp).getTerm();
- query = "/" + nc.getName() + query;
- }
- }
+ query = "";
+ while (index<result.length) {
+ if (result[index] instanceof XSDComponent) {
+ XSDNamedComponent nc = (XSDNamedComponent)result[index];
+ query = query + "/" + nc.getQName();
}
+ ++index;
}
}
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java 2010-10-15 13:15:35 UTC (rev 25864)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java 2010-10-15 13:29:07 UTC (rev 25865)
@@ -276,7 +276,7 @@
enabled = false;
}
}
- if ( getResult().length!=2 && this.requireLowerTreeSelection )
+ if ( getResult().length<2 && this.requireLowerTreeSelection )
enabled = false;
getOkButton().setEnabled(enabled);
@@ -292,7 +292,7 @@
return;
}
}
- if ( getResult().length!=2 && this.requireLowerTreeSelection )
+ if ( getResult().length<2 && this.requireLowerTreeSelection )
return;
super.okPressed();
}
14 years, 2 months
JBoss Tools SVN: r25864 - branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-10-15 09:15:35 -0400 (Fri, 15 Oct 2010)
New Revision: 25864
Modified:
branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
JBIDE-6273 Example details disappear when wizard page is resized
Modified: branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-10-15 12:12:36 UTC (rev 25863)
+++ branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-10-15 13:15:35 UTC (rev 25864)
@@ -16,15 +16,13 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import java.util.StringTokenizer;
import java.util.TreeSet;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.commands.ToggleState;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Geometry;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -37,7 +35,10 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -45,14 +46,13 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Monitor;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.model.AdaptableList;
import org.eclipse.ui.part.PageBook;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.ServerCore;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.dialog.FixDialog;
@@ -64,9 +64,6 @@
import org.jboss.tools.project.examples.model.ProjectExampleSite;
import org.jboss.tools.project.examples.model.ProjectFix;
import org.jboss.tools.project.examples.model.ProjectUtil;
-import org.jboss.tools.seam.core.project.facet.SeamRuntime;
-import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
-import org.osgi.framework.Bundle;
/**
* @author snjeza
@@ -88,14 +85,14 @@
setTitle( Messages.NewProjectExamplesWizardPage_Project_Example );
setDescription( Messages.NewProjectExamplesWizardPage_Import_Project_Example );
setImageDescriptor( ProjectExamplesActivator.imageDescriptorFromPlugin(ProjectExamplesActivator.PLUGIN_ID, "icons/new_wiz.gif")); //$NON-NLS-1$
-
}
public void createControl(Composite parent) {
+
Composite composite = new Composite(parent,SWT.NONE);
composite.setLayout(new GridLayout(1,false));
- GridData gd = new GridData(GridData.FILL_BOTH);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
composite.setLayoutData(gd);
@@ -104,11 +101,11 @@
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
siteComposite.setLayout(gridLayout);
- gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+ gd = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
siteComposite.setLayoutData(gd);
final Button button = new Button(siteComposite,SWT.CHECK);
- gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+ gd = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
gd.horizontalSpan = 2;
button.setLayoutData(gd);
button.setText(Messages.ProjectExamplesPreferencePage_Show_experimental_sites);
@@ -126,14 +123,17 @@
final ProjectExamplesPatternFilter filter = new ProjectExamplesPatternFilter();
- int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
+ int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.WRAP;
final FilteredTree filteredTree = new FilteredTree(composite, styleBits, filter,true);
filteredTree.setBackground(parent.getDisplay().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
final TreeViewer viewer = filteredTree.getViewer();
Tree tree = viewer.getTree();
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint=75;
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ GC gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 7);
+ gc.dispose();
tree.setLayoutData(gd);
tree.setFont(parent.getFont());
@@ -144,12 +144,16 @@
final SiteFilter siteFilter = new SiteFilter();
viewer.addFilter(siteFilter);
- Label descriptionLabel = new Label(composite,SWT.NULL);
+ Label descriptionLabel = new Label(composite,SWT.NONE);
descriptionLabel.setText(Messages.NewProjectExamplesWizardPage_Description);
- final Text text = new Text(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
- gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gd.heightHint=75;
- text.setLayoutData(gd);
+ final Text descriptionText = new Text(composite,SWT.H_SCROLL | SWT.V_SCROLL
+ | SWT.READ_ONLY | SWT.BORDER | SWT.WRAP);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 4);
+ gc.dispose();
+ descriptionText.setLayoutData(gd);
Composite internal = new Composite(composite, SWT.NULL);
internal.setLayout(new GridLayout(2,false));
@@ -178,13 +182,13 @@
Object selected = selection.getFirstElement();
if (selected instanceof Project && selection.size() == 1) {
Project selectedProject = (Project) selected;
- text.setText(selectedProject.getDescription());
+ descriptionText.setText(selectedProject.getDescription());
projectName.setText(selectedProject.getName());
projectURL.setText(selectedProject.getUrl());
projectSize.setText(selectedProject.getSizeAsText());
} else {
//Project selectedProject=null;
- text.setText(""); //$NON-NLS-1$
+ descriptionText.setText(""); //$NON-NLS-1$
projectName.setText(""); //$NON-NLS-1$
projectURL.setText(""); //$NON-NLS-1$
projectSize.setText(""); //$NON-NLS-1$
@@ -197,19 +201,23 @@
notesPageBook = new PageBook( internal , SWT.NONE );
notesPageBook.setLayout(new GridLayout(1,false));
- gd=new GridData(GridData.FILL_HORIZONTAL);
+ gd=new GridData(GridData.FILL, GridData.FILL, true, false);
+ gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 6);
+ gc.dispose();
gd.horizontalSpan=2;
notesPageBook.setLayoutData( gd );
noteEmptyComposite = new Composite( notesPageBook, SWT.NONE );
noteEmptyComposite.setLayout( new GridLayout(1, false));
//notesEmptyComposite.setVisible( false );
- gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
noteEmptyComposite.setLayoutData(gd);
noteComposite = new Composite(notesPageBook, SWT.NONE);
noteComposite.setLayout(new GridLayout(2,false));
- gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
noteComposite.setLayoutData(gd);
noteComposite.setVisible(false);
@@ -217,8 +225,7 @@
Composite messageComposite = new Composite(noteComposite, SWT.BORDER);
messageComposite.setLayout(new GridLayout(2, false));
- gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
-
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
messageComposite.setLayoutData(gd);
Label noteLabel = new Label(messageComposite,SWT.NONE);
@@ -228,16 +235,20 @@
image.setBackground(noteLabel.getBackground());
noteLabel.setImage(image);
- noteText = new Text(messageComposite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+ noteText = new Text(messageComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
noteText.setText(""); //$NON-NLS-1$
- gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gd.heightHint=50;
- gd.widthHint = 400;
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+ gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 3);
+ gc.dispose();
noteText.setLayoutData(gd);
noteText.setText(Messages.NewProjectExamplesWizardPage_Note);
details = new Button(noteComposite, SWT.PUSH);
details.setText(Messages.NewProjectExamplesWizardPage_Details);
+ gd=new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
+ details.setLayoutData(gd);
details.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -246,10 +257,10 @@
}
});
- showQuickFixButton = new Button(internal,SWT.CHECK);
+ showQuickFixButton = new Button(composite,SWT.CHECK);
showQuickFixButton.setText(Messages.NewProjectExamplesWizardPage_Show_the_Quick_Fix_dialog);
showQuickFixButton.setSelection(true);
- gd=new GridData(GridData.FILL_HORIZONTAL);
+ gd=new GridData(SWT.BEGINNING, SWT.BOTTOM, false, false);
gd.horizontalSpan=2;
showQuickFixButton.setLayoutData(gd);
@@ -288,8 +299,93 @@
setPageComplete(false);
setControl(composite);
+
+ configureSizeAndLocation();
}
+ private void configureSizeAndLocation() {
+ Shell shell = getContainer().getShell();
+ Point size = new Point(600,shell.getSize().y);
+ shell.setSize(size);
+ Point location = getInitialLocation(size, shell);
+ shell.setBounds(getConstrainedShellBounds(new Rectangle(location.x,
+ location.y, size.x, size.y)));
+ }
+
+ private Rectangle getConstrainedShellBounds(Rectangle preferredSize) {
+ Rectangle result = new Rectangle(preferredSize.x, preferredSize.y,
+ preferredSize.width, preferredSize.height);
+
+ Monitor mon = getClosestMonitor(getShell().getDisplay(), Geometry
+ .centerPoint(result));
+
+ Rectangle bounds = mon.getClientArea();
+
+ if (result.height > bounds.height) {
+ result.height = bounds.height;
+ }
+
+ if (result.width > bounds.width) {
+ result.width = bounds.width;
+ }
+
+ result.x = Math.max(bounds.x, Math.min(result.x, bounds.x
+ + bounds.width - result.width));
+ result.y = Math.max(bounds.y, Math.min(result.y, bounds.y
+ + bounds.height - result.height));
+
+ return result;
+ }
+
+ private static Monitor getClosestMonitor(Display toSearch, Point toFind) {
+ int closest = Integer.MAX_VALUE;
+
+ Monitor[] monitors = toSearch.getMonitors();
+ Monitor result = monitors[0];
+
+ for (int idx = 0; idx < monitors.length; idx++) {
+ Monitor current = monitors[idx];
+
+ Rectangle clientArea = current.getClientArea();
+
+ if (clientArea.contains(toFind)) {
+ return current;
+ }
+
+ int distance = Geometry.distanceSquared(Geometry
+ .centerPoint(clientArea), toFind);
+ if (distance < closest) {
+ closest = distance;
+ result = current;
+ }
+ }
+
+ return result;
+ }
+
+
+ private Point getInitialLocation(Point initialSize, Shell shell) {
+ Composite parent = shell.getParent();
+
+ Monitor monitor = shell.getDisplay().getPrimaryMonitor();
+ if (parent != null) {
+ monitor = parent.getMonitor();
+ }
+
+ Rectangle monitorBounds = monitor.getClientArea();
+ Point centerPoint;
+ if (parent != null) {
+ centerPoint = Geometry.centerPoint(parent.getBounds());
+ } else {
+ centerPoint = Geometry.centerPoint(monitorBounds);
+ }
+
+ return new Point(centerPoint.x - (initialSize.x / 2), Math.max(
+ monitorBounds.y, Math.min(centerPoint.y
+ - (initialSize.y * 2 / 3), monitorBounds.y
+ + monitorBounds.height - initialSize.y)));
+ }
+
private boolean canFix(Project project,ProjectFix fix) {
String type = fix.getType();
if (ProjectFix.PLUGIN_TYPE.equals(type)) {
@@ -416,6 +512,9 @@
public boolean refresh(boolean force) {
boolean canFinish = false;
+ notesPageBook.showPage(noteEmptyComposite);
+ noteComposite.setVisible(false);
+ noteEmptyComposite.setVisible(true);
Iterator iterator = selection.iterator();
while (iterator.hasNext()) {
Object object = iterator.next();
14 years, 2 months
JBoss Tools SVN: r25863 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-15 08:12:36 -0400 (Fri, 15 Oct 2010)
New Revision: 25863
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/PluginLogger.java
Log:
[JBIDE-7320] removed usage specific parts
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/PluginLogger.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/PluginLogger.java 2010-10-15 12:06:04 UTC (rev 25862)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/PluginLogger.java 2010-10-15 12:12:36 UTC (rev 25863)
@@ -13,19 +13,15 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.jboss.tools.usage.util.LoggingUtils;
/**
* @author Andre Dietisheim
*/
public class PluginLogger implements ILoggingAdapter {
- private final boolean tracingEnabled;
-
private Plugin plugin;
public PluginLogger(Plugin plugin) {
- this.tracingEnabled = LoggingUtils.isPluginTracingEnabled(plugin);
this.plugin = plugin;
}
@@ -38,7 +34,7 @@
}
private void log(int severity, String message) {
- if (!tracingEnabled) {
+ if (!isTracingEnabled()) {
return;
}
@@ -47,4 +43,9 @@
plugin.getLog().log(status);
}
}
+
+ protected boolean isTracingEnabled() {
+ // defaults to always log
+ return true;
+ }
}
14 years, 2 months
JBoss Tools SVN: r25862 - trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-15 08:06:04 -0400 (Fri, 15 Oct 2010)
New Revision: 25862
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java
Log:
[JBIDE-7320] changed API to conform to log4j signature
Modified: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java 2010-10-15 11:56:50 UTC (rev 25861)
+++ trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java 2010-10-15 12:06:04 UTC (rev 25862)
@@ -17,11 +17,11 @@
*/
public class SystemOutLogger implements ILoggingAdapter {
- public void logError(String errorMessage) {
+ public void error(String errorMessage) {
System.out.println("[ERROR]: " + errorMessage);
}
- public void logMessage(String message) {
+ public void debug(String message) {
System.out.println("[INFO]" + message);
}
}
14 years, 2 months