JBoss Tools SVN: r42333 - in trunk/jst: tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-07-02 12:57:17 -0400 (Mon, 02 Jul 2012)
New Revision: 42333
Added:
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexParentToChildRestrictions.html
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/styleParentToChildRestrictions.css
Modified:
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java
Log:
JBIDE-10127
Resolve selector in open-on of style class in VPE
Parent node restrictions are separated from the child node ones.
JUnit Test case is added.
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java 2012-07-02 11:03:44 UTC (rev 42332)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java 2012-07-02 16:57:17 UTC (rev 42333)
@@ -394,13 +394,13 @@
attrFound = allValuesAreOK;
}
+ // proceed with parent node
+ node = node.getParentNode();
+
if (classFound && nodeFound && attrFound) {
// Proceed with next Axis
break;
}
-
- // proceed with parent node
- node = node.getParentNode();
} while (node instanceof Element);
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexParentToChildRestrictions.html
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexParentToChildRestrictions.html (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexParentToChildRestrictions.html 2012-07-02 16:57:17 UTC (rev 42333)
@@ -0,0 +1,22 @@
+<html>
+ <head>
+ <link href="styleParentToChildRestrictions.css" rel="stylesheet" type="text/css"></link>
+ </head>
+
+ <body>
+
+ <div title="a" class="bc">
+ 1. This matches ([title="a"].bc).
+ <i> 2. This matches (.bc i).</i>
+ <i class="bc"> 3. This matches ([title="a"] .bc).</i>
+ </div>
+
+ <div> <p class="s1">
+ 4. This should not match (div * .s1).
+ <b class="s1"> 5. This matches (div * .s1).</b> </p></div>
+
+ <div> <p class="s2">
+ 6. This matches (div p.s2).
+ </p></div>
+ </body>
+</html>
\ No newline at end of file
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexParentToChildRestrictions.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/styleParentToChildRestrictions.css
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/styleParentToChildRestrictions.css (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/styleParentToChildRestrictions.css 2012-07-02 16:57:17 UTC (rev 42333)
@@ -0,0 +1,11 @@
+.bb {background-color: red;}
+
+[title="a"].bc {background-color: aqua;}
+
+[title="a"] .bc {background-color: green;}
+
+.bc i {background-color: blue;}
+
+div * .s1 {background-color: yellow;}
+
+div p.s2 {background-color: brown;}
\ No newline at end of file
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/styleParentToChildRestrictions.css
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java 2012-07-02 11:03:44 UTC (rev 42332)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java 2012-07-02 16:57:17 UTC (rev 42333)
@@ -39,6 +39,7 @@
private static final String MEDIA_PAGE_NAME = PROJECT_NAME+"/WebContent/indexWithMediaRules.html";
private static final String SECOND_IN_A_ROW_PAGE_NAME = PROJECT_NAME+"/WebContent/indexWithSecondClassInRule.html";
private static final String RESOLVE_SELECTOR_PAGE_NAME = PROJECT_NAME+"/WebContent/indexResolveSelector.html";
+ private static final String PARENT_TO_CHILD_RESTRICTIONS_RESOLVE_SELECTOR_PAGE_NAME = PROJECT_NAME+"/WebContent/indexParentToChildRestrictions.html";
public IProject project = null;
@@ -368,7 +369,86 @@
}
}
}
+
+ public void testCSSClassParentToChildResolveRestrictions() throws PartInitException, BadLocationException {
+ HashSet<IEditorPart> openedEditors = new HashSet<IEditorPart>();
+ // CSS class names to be tested are placed one by one,
+ // so, for each next test we'll continue to search in document
+ // (We'll not search from beginning each time)
+ //
+ // Position to continue the search from
+ int startFrom = 0;
+
+ // 'class="' - is the string to search
+ final String TEXT_TO_SEARCH = "class=\"";
+
+ // Valid values for Text Selection after the open on is performed
+ final String[][] VALID_TEXT_SELECTIONS = {
+ {"styleParentToChildRestrictions.css", "[title=\"a\"].bc {background-color: aqua;}"},
+ {"styleParentToChildRestrictions.css", "[title=\"a\"] .bc {background-color: green;}"},
+ {"indexParentToChildRestrictions.html", ""},
+ {"styleParentToChildRestrictions.css", "div * .s1 {background-color: yellow;}"},
+ {"styleParentToChildRestrictions.css", "div p.s2 {background-color: brown;}"}
+ };
+
+ for (int i = 0; i < VALID_TEXT_SELECTIONS.length; i++) {
+ String validEditorName = VALID_TEXT_SELECTIONS[i][0];
+ String validSelection = VALID_TEXT_SELECTIONS[i][1];
+
+ IEditorPart editor = WorkbenchUtils.openEditor(PARENT_TO_CHILD_RESTRICTIONS_RESOLVE_SELECTOR_PAGE_NAME);
+ if (editor != null) openedEditors.add(editor);
+ try {
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+
+ IDocument document = viewer.getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(startFrom,
+ TEXT_TO_SEARCH, true, true, false, false);
+ assertNotNull("Attribute :" + TEXT_TO_SEARCH + " not found whyle search starting from " + startFrom, reg);
+
+ startFrom = reg.getOffset() + reg.getLength();
+
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, new Region(startFrom, 0), true); // new Region(reg.getOffset() + reg.getLength(), 0)
+
+ assertTrue("Hyperlinks not found for position " + startFrom,(links != null && links.length > 0));
+
+ boolean found = false;
+ for(IHyperlink link : links){
+ assertNotNull(link.toString());
+
+ link.open();
+
+ IEditorPart resultEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (resultEditor != null) openedEditors.add(resultEditor);
+ if(validEditorName.equals(resultEditor.getTitle())){
+ StructuredTextEditor stEditor = null;
+ if (resultEditor instanceof StructuredTextEditor) {
+ stEditor = (StructuredTextEditor)resultEditor;
+ } else if (resultEditor instanceof JSPMultiPageEditor) {
+ stEditor = ((JSPMultiPageEditor)resultEditor).getSourceEditor();
+ }
+ assertNotNull("Unexpected Editor is openned: " + resultEditor.getTitle() + " [" + resultEditor.getClass().getName() + "]", stEditor);
+ ISelection selection = stEditor.getSelectionProvider().getSelection();
+ assertFalse("Required CSS Rule is not selected", selection.isEmpty());
+ if (selection instanceof TextSelection) {
+ TextSelection textSelection = (TextSelection)selection;
+ String selectionText = stEditor.getTextViewer().getDocument().get(textSelection.getOffset(), textSelection.getLength());
+ assertTrue("Required CSS Rule is not selected",
+ (validSelection.equalsIgnoreCase(selectionText)));
+ found = true;
+ break;
+ }
+ }
+ }
+ assertTrue("OpenOn have not opened a valid selection [" + validSelection + "] in " + validEditorName + " editor",found);
+ } finally {
+ closeEditors(openedEditors);
+ }
+ }
+ }
+
protected void closeEditors (HashSet<IEditorPart> editors) {
if (editors == null || editors.isEmpty())
return;
12 years, 6 months
JBoss Tools SVN: r42332 - trunk/central/site.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-02 07:03:44 -0400 (Mon, 02 Jul 2012)
New Revision: 42332
Modified:
trunk/central/site/pom.xml
Log:
JBIDE-12278: Fix path to build.xml file
Modified: trunk/central/site/pom.xml
===================================================================
--- trunk/central/site/pom.xml 2012-07-02 10:50:41 UTC (rev 42331)
+++ trunk/central/site/pom.xml 2012-07-02 11:03:44 UTC (rev 42332)
@@ -26,7 +26,7 @@
<tasks>
<!-- called AFTER generating update site + zip to add in extra content -->
<!-- <ant antfile="build.xml" target="generate.directory.xml.only" dir="../../build/aggregate/"> -->
- <ant antfile="build.xml" target="basic.build" dir="../../build/aggregate/">
+ <ant antfile="build.xml" target="basic.build" dir="../../../../build/aggregate/">
<property name="output.dir" value="${basedir}" />
<property name="inputRepo"
value="${jbosstools-nightly-staging-composite}" />
12 years, 6 months
JBoss Tools SVN: r42331 - branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-07-02 06:50:41 -0400 (Mon, 02 Jul 2012)
New Revision: 42331
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
Log:
Fixed - JBIDE-12170
Incorrect description on Domain creation dialog
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2012-07-02 10:30:16 UTC (rev 42330)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2012-07-02 10:50:41 UTC (rev 42331)
@@ -281,11 +281,11 @@
final String domainName = (String) domainNameObservable.getValue();
if (domainName.isEmpty()) {
return ValidationStatus.cancel(
- "Select an alphanumerical name and a type for the domain to edit.");
+ "Select an alphanumerical name for the domain to edit.");
}
if (!StringUtils.isAlphaNumeric(domainName)) {
return ValidationStatus.error(
- "The name may only contain lower-case letters and digits.");
+ "The domain name may only contain lower-case letters and digits.");
}
return ValidationStatus.ok();
}
12 years, 6 months
JBoss Tools SVN: r42330 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-02 06:30:16 -0400 (Mon, 02 Jul 2012)
New Revision: 42330
Modified:
trunk/build/parent/pom.xml
Log:
JBIDE-11549: try increasing timeout
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-07-01 05:47:18 UTC (rev 42329)
+++ trunk/build/parent/pom.xml 2012-07-02 10:30:16 UTC (rev 42330)
@@ -177,7 +177,7 @@
<configuration>
<!-- timeout in seconds -->
<surefire.timeout>2400</surefire.timeout>
- <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
+ <forkedProcessTimeoutInSeconds>2400</forkedProcessTimeoutInSeconds>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
12 years, 6 months
JBoss Tools SVN: r42329 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-07-01 01:47:18 -0400 (Sun, 01 Jul 2012)
New Revision: 42329
Modified:
trunk/build/aggregate/site/site.xml
Log:
JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
Modified: trunk/build/aggregate/site/site.xml
===================================================================
--- trunk/build/aggregate/site/site.xml 2012-06-29 21:56:30 UTC (rev 42328)
+++ trunk/build/aggregate/site/site.xml 2012-07-01 05:47:18 UTC (rev 42329)
@@ -203,13 +203,17 @@
<category name="AbridgedTools" />
<category name="MavenTools" />
</feature>
+ <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.maven.gwt.feature_0.0.0.jar" id="org.jboss.tools.maven.gwt.feature" version="0.0.0">
<category name="MavenTools" />
</feature>
+ -->
<!-- only in JBT -->
+ <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.gwt.feature_0.0.0.jar" id="org.jboss.tools.gwt.feature" version="0.0.0">
<category name="GeneralTools" />
</feature>
+ -->
<feature url="features/org.jboss.tools.common.mylyn.feature_0.0.0.jar" id="org.jboss.tools.common.mylyn.feature" version="0.0.0">
<category name="AbridgedTools" />
<category name="GeneralTools"/>
@@ -383,13 +387,17 @@
<feature url="features/org.jboss.tools.maven.jbosspackaging.feature.source_0.0.0.jar" id="org.jboss.tools.maven.jbosspackaging.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
+ <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.maven.gwt.feature.source_0.0.0.jar" id="org.jboss.tools.maven.gwt.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
+ -->
<!-- only in JBT -->
+ <!-- JBDS-2235, JBIDE-11549 temporarily remove because com.google.gdt.eclipse.suite.e37.feature.feature.group 2.5.2.v201202290255-rel-r37 requires 'org.eclipse.platform.feature.group [3.7.0,3.8.0)'
<feature url="features/org.jboss.tools.gwt.feature.source_0.0.0.jar" id="org.jboss.tools.gwt.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
+ -->
<feature url="features/org.jboss.tools.common.mylyn.feature.source_0.0.0.jar" id="org.jboss.tools.common.mylyn.feature.source" version="0.0.0">
<category name="AllSources"/>
</feature>
12 years, 6 months