JBoss Tools SVN: r16204 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-06-25 11:15:44 -0400 (Thu, 25 Jun 2009)
New Revision: 16204
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4510Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4510, JUnit was added, doctype processing was updated.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-06-25 15:08:55 UTC (rev 16203)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-06-25 15:15:44 UTC (rev 16204)
@@ -61,6 +61,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4337Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4373Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4509Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4510Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE924Test;
@@ -149,6 +150,7 @@
suite.addTestSuite(JBIDE4337Test.class);
suite.addTestSuite(JBIDE4179Test.class);
suite.addTestSuite(JBIDE4509Test.class);
+ suite.addTestSuite(JBIDE4510Test.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4510Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4510Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4510Test.java 2009-06-25 15:15:44 UTC (rev 16204)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.core.JarEntryFile;
+import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
+import org.eclipse.jdt.internal.core.JavaProject;
+import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMDocumentType;
+
+public class JBIDE4510Test extends VpeTest {
+
+ private static final String JAR_NAME = "WebContent/WEB-INF/lib/mareshkau.jar"; //$NON-NLS-1$
+ private static final String FILE_NAME = "components/paginator.xhtml"; //$NON-NLS-1$
+
+ public JBIDE4510Test(String name) {
+ super(name);
+ }
+
+ public void testCorrectDoctypeOnFileFromJarArchive() throws Throwable {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME);
+ /*
+ * Project should exist in the workspace
+ */
+ assertNotNull("Project was not found in the workspace: " //$NON-NLS-1$
+ + JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME, project);
+ IFile jarArchive = (IFile) project.findMember(JAR_NAME);
+ /*
+ * Jar file should exist in the project.
+ */
+ assertNotNull("File was not found in the project: " //$NON-NLS-1$
+ + JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME + "/" + JAR_NAME, //$NON-NLS-1$
+ jarArchive);
+ IJavaProject javaProject = JavaCore.create(project);
+ /*
+ * Project should be correctly transformed.
+ */
+ assertNotNull("Cannot process java project:" //$NON-NLS-1$
+ + JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME, javaProject);
+
+ IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(jarArchive);
+ /*
+ * Root element should have the correct type.
+ */
+ if (root instanceof JarPackageFragmentRoot) {
+ JarPackageFragmentRoot jarRoot = (JarPackageFragmentRoot) root;
+ JarEntryFile jarFile = new JarEntryFile(FILE_NAME);
+ jarFile.setParent(jarRoot);
+ JarEntryEditorInput jarEditorInput = new JarEntryEditorInput(jarFile);
+ JSPMultiPageEditor editor = openEditor(jarEditorInput);
+ /*
+ * Verify that the editor is opened.
+ */
+ assertNotNull(
+ "Visual Page Editor with a file from the jar archive should have been opened but it wasn't.", //$NON-NLS-1$
+ editor);
+ /*
+ * Get the DOM document
+ */
+ nsIDOMDocument document = TestUtil.getVpeVisualDocument(editor);
+ nsIDOMDocumentType doctype = document.getDoctype();
+ /*
+ * Doctype should present for the current file.
+ */
+ assertNotNull("Doctype should present for the specified file: " //$NON-NLS-1$
+ + JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME + "/" //$NON-NLS-1$
+ + JAR_NAME + "/" + FILE_NAME, doctype); //$NON-NLS-1$
+
+ /*
+ * Doctype should have the correct type.
+ */
+ assertEquals(
+ "Doctype should have the correct type: \" html \", but was: "+ doctype.getNodeName(), //$NON-NLS-1$
+ "html", doctype.getNodeName()); //$NON-NLS-1$
+ } else {
+ /*
+ * Fail the test when we cannot process jar file correctly.
+ */
+ fail("Jar file cannot be processed. Jar file: " //$NON-NLS-1$
+ + JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME + "/" //$NON-NLS-1$
+ + JAR_NAME);
+ }
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4510Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2009-06-25 15:08:55 UTC (rev 16203)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2009-06-25 15:15:44 UTC (rev 16204)
@@ -133,7 +133,7 @@
/*
* Create temporally IFile.
*/
- iFile = project.getFile(TEMP_FILE_NAME + jarFile.getName());
+ iFile = project.getFile(TEMP_FILE_NAME + jarFile.getFullPath().lastSegment());
/*
* Delete any previously saved file.
*/
15 years, 6 months
JBoss Tools SVN: r16203 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-06-25 11:08:55 -0400 (Thu, 25 Jun 2009)
New Revision: 16203
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4528 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2009-06-25 13:13:37 UTC (rev 16202)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2009-06-25 15:08:55 UTC (rev 16203)
@@ -54,7 +54,7 @@
}
@SuppressWarnings("unchecked")
- public Object[] getChildren(Object o, final IProgressMonitor monitor) {
+ public synchronized Object[] getChildren(Object o, final IProgressMonitor monitor) {
LazyDatabaseSchema dbs = getLazyDatabaseSchema( o );
final DefaultDatabaseCollector db = new DefaultDatabaseCollector();
15 years, 6 months
JBoss Tools SVN: r16202 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: menu and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-06-25 09:13:37 -0400 (Thu, 25 Jun 2009)
New Revision: 16202
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSourceSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLabeledFormCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4526, fixing copy past
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -676,24 +676,11 @@
}
if (focusNodeOffset > 0) {
focusNodeOffset--;
- return getSourceNodeAt(focusNodeOffset);
+ return VpeSourceSelectionBuilder.getSourceNodeAt(this.sourceEditor,focusNodeOffset);
}
}
return null;
}
-
- private Node getSourceNodeAt(int offset) {
- if (sourceEditor != null && sourceEditor.getModel() != null) {
- IndexedRegion node = sourceEditor.getModel().getIndexedRegion(offset);
- if (node == null) {
- node = sourceEditor.getModel().getIndexedRegion(offset - 1);
- }
- if (node instanceof Node) {
- return (Node) node;
- }
- }
- return null;
- }
private VpeSourceSelection deleteLeftChar(VpeSourceSelectionBuilder sourceSelectionBuilder, VpeSourceSelection selection) {
boolean atLeastOneCharIsDeleted = false;
@@ -1150,8 +1137,8 @@
if (focusNode.getNodeType() == Node.TEXT_NODE) {
if (focusNode.getParentNode().getNodeType() == Node.DOCUMENT_NODE) {
Point range = sourceEditor.getTextViewer().getSelectedRange();
- Node p1 = focusNode.getOwnerDocument().createElement("p");
- Node p2 = focusNode.getOwnerDocument().createElement("p");
+ Node p1 = focusNode.getOwnerDocument().createElement(HTML.TAG_P);
+ Node p2 = focusNode.getOwnerDocument().createElement(HTML.TAG_P);
Text newNode = ((Text)focusNode).splitText(getSourceNodeOffset(focusNode, range.x));
focusNode.getParentNode().insertBefore(p1, focusNode);
focusNode.getParentNode().insertBefore(p2, newNode);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -41,6 +41,7 @@
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.menu.BaseActionManager.MyMenuManager;
+import org.jboss.tools.vpe.editor.menu.action.EditAttributesAction;
import org.jboss.tools.vpe.editor.menu.action.InsertAction;
import org.jboss.tools.vpe.editor.menu.action.VpeMenuListener;
import org.jboss.tools.vpe.editor.menu.action.VpeTextOperationAction;
@@ -393,39 +394,12 @@
* @param node the Node object
*/
private void showProperties(Node node) {
- ExtendedProperties p = createExtendedProperties(node);
+ ExtendedProperties p = EditAttributesAction.createExtendedProperties(node);
if (p != null) {
ExtendedPropertiesWizard.run(p);
}
}
- /**
- * Create extended properties list for the node passed by parameter.
- *
- * @param node the Node to be processed
- * @return an extended properties
- */
- private ExtendedProperties createExtendedProperties(Node node) {
- Class c = ModelFeatureFactory.getInstance().getFeatureClass(
- "org.jboss.tools.jst.jsp.outline.VpeProperties"); //$NON-NLS-1$
- try {
- return (ExtendedProperties) c.getDeclaredConstructor(
- new Class[] { Node.class }).newInstance(new Object[] { node });
- } catch (IllegalArgumentException e) {
- VpePlugin.getPluginLog().logError(e);
- } catch (SecurityException e) {
- VpePlugin.getPluginLog().logError(e);
- } catch (InstantiationException e) {
- VpePlugin.getPluginLog().logError(e);
- } catch (IllegalAccessException e) {
- VpePlugin.getPluginLog().logError(e);
- } catch (InvocationTargetException e) {
- VpePlugin.getPluginLog().logError(e);
- } catch (NoSuchMethodException e) {
- VpePlugin.getPluginLog().logError(e);
- }
- return null;
- }
/**
* Method is used to print dump mapping.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.menu.action;
+import java.awt.Menu;
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
@@ -20,6 +21,7 @@
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
+import org.jboss.tools.vpe.editor.menu.MenuCreationHelper;
import org.jboss.tools.vpe.editor.menu.VpeMenuUtil;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.w3c.dom.Node;
@@ -80,7 +82,7 @@
* @param node the Node object
*/
private void showProperties(Node node) {
- ExtendedProperties p = createExtendedProperties(node);
+ ExtendedProperties p = EditAttributesAction.createExtendedProperties(node);
if (p != null) {
ExtendedPropertiesWizard.run(p);
}
@@ -92,7 +94,7 @@
* @param node the Node to be processed
* @return an extended properties
*/
- private ExtendedProperties createExtendedProperties(Node node) {
+ public static ExtendedProperties createExtendedProperties(Node node) {
final Class<?> c = ModelFeatureFactory.getInstance().getFeatureClass(
"org.jboss.tools.jst.jsp.outline.VpeProperties"); //$NON-NLS-1$
try {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSourceSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSourceSelectionBuilder.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSourceSelectionBuilder.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -42,7 +42,7 @@
anchorPosition = focusPosition;
focusPosition = range.x;
}
- Node focusNode = getSourceNodeAt(focusPosition);
+ Node focusNode = getSourceNodeAt(this.sourceEditor,focusPosition);
if (focusNode == null) {
return null;
}
@@ -51,7 +51,7 @@
Node anchorNode = null;
int anchorOffset = 0;
if (extendFlag) {
- anchorNode = getSourceNodeAt(anchorPosition);
+ anchorNode = getSourceNodeAt(this.sourceEditor,anchorPosition);
anchorOffset = getSourceNodeOffset(anchorNode, anchorPosition, reversionFlag);
} else {
anchorNode = focusNode;
@@ -105,11 +105,11 @@
return selection;
}
- private Node getSourceNodeAt(int offset) {
- if (sourceEditor != null && sourceEditor.getModel() != null) {
- IndexedRegion node = sourceEditor.getModel().getIndexedRegion(offset);
+ public static Node getSourceNodeAt(StructuredTextEditor srcEditor,int offset) {
+ if (srcEditor != null && srcEditor.getModel() != null) {
+ IndexedRegion node = srcEditor.getModel().getIndexedRegion(offset);
if (node == null) {
- node = sourceEditor.getModel().getIndexedRegion(offset - 1);
+ node = srcEditor.getModel().getIndexedRegion(offset - 1);
}
if (node instanceof Node) {
return (Node) node;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -16,19 +16,11 @@
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.eclipse.core.resources.IFile;
import org.jboss.tools.vpe.editor.VpeIncludeInfo;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.template.VpeCreatorUtil;
-import org.jboss.tools.vpe.editor.template.VpeTemplate;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.vpe.editor.util.FileUtil;
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -337,15 +329,6 @@
}
-// @Override
-// public void openIncludeEditor(VpePageContext pageContext,
-// Element sourceElement, Object data) {
-//
-// if (data instanceof TemplateFileInfo) {
-// FileUtil.openEditor(((TemplateFileInfo) data).getTemplateFile());
-// }
-// }
-
protected VpeCreationData createStub(String fileName,
Node sourceElement, nsIDOMDocument visualDocument) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLabeledFormCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLabeledFormCreator.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLabeledFormCreator.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -79,6 +79,7 @@
}
}
+ @Override
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) throws VpeExpressionException {
String labelAttrName = VpeTemplateManager.ATTR_LABELED_FORM_DEFAULT_LABEL;
if (labelNameExpr != null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -79,6 +79,7 @@
}
}
+ @Override
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) throws VpeExpressionException {
String strValue=null;
int listSize = 0;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -166,10 +166,10 @@
String positionAttribute = resizeData.getPositionAttribute();
if(absolute && resizeData.isAbsolutePositionEnabled()){
VpeStyleUtil.setAbsolute(sourceElement);
- VpeStyleUtil.setSizeInStyle(sourceElement, VpeStyleUtil.ATTRIBUTE_STYLE+VpeStyleUtil.DOT_STRING+positionAttribute, position);
+ VpeStyleUtil.setParameterInStyle(sourceElement, VpeStyleUtil.ATTRIBUTE_STYLE+VpeStyleUtil.DOT_STRING+positionAttribute, position+VpeStyleUtil.PX_STRING);
}else{
if(VpeStyleUtil.getAbsolute(sourceElement)){
- VpeStyleUtil.setSizeInStyle(sourceElement, VpeStyleUtil.ATTRIBUTE_STYLE+VpeStyleUtil.DOT_STRING+positionAttribute, position);
+ VpeStyleUtil.setParameterInStyle(sourceElement, VpeStyleUtil.ATTRIBUTE_STYLE+VpeStyleUtil.DOT_STRING+positionAttribute, position+VpeStyleUtil.PX_STRING);
}
}
if(resizeData.getTagXpath() != null){
@@ -178,14 +178,14 @@
if(sizeAttribute.indexOf(VpeStyleUtil.DOT_STRING) < 0){
ancestor.setAttribute(sizeAttribute, ""+size);
}else{
- VpeStyleUtil.setSizeInStyle(ancestor, sizeAttribute, size);
+ VpeStyleUtil.setParameterInStyle(ancestor, sizeAttribute, size+VpeStyleUtil.PX_STRING);
}
}
}else{
if(sizeAttribute.indexOf(VpeStyleUtil.DOT_STRING) < 0){
sourceElement.setAttribute(sizeAttribute, ""+size);
}else{
- VpeStyleUtil.setSizeInStyle(sourceElement, sizeAttribute, size);
+ VpeStyleUtil.setParameterInStyle(sourceElement, sizeAttribute, size+VpeStyleUtil.PX_STRING);
}
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2009-06-25 11:39:30 UTC (rev 16201)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2009-06-25 13:13:37 UTC (rev 16202)
@@ -226,32 +226,6 @@
// sets value of parameter described in sizeAttribute, for example
// "style.width"
- public static void setSizeInStyle(Element sourceElement,
- String sizeAttribute, int size) {
- int dotPosition = sizeAttribute.indexOf(DOT_STRING);
- String attribute = sizeAttribute.substring(0, dotPosition);
- String parameter = sizeAttribute.substring(dotPosition + 1,
- sizeAttribute.length());
-
- String style = sourceElement.getAttribute(attribute);
- if (style == null) {
- style = EMPTY_STRING;
- } else { // remove old sizes
- style = deleteFromString(style, parameter, SEMICOLON_STRING);
- }
- if (style.length() > 0) {
- if (!style.endsWith(SEMICOLON_STRING))
- style += SEMICOLON_STRING;
- }
-
- style += SPACE_STRING + parameter + SPACE_STRING + COLON_STRING
- + SPACE_STRING + size + PX_STRING + SEMICOLON_STRING;
-
- sourceElement.setAttribute(attribute, style);
- }
-
- // sets value of parameter described in sizeAttribute, for example
- // "style.width"
public static void setParameterInStyle(Element sourceElement,
String sizeAttribute, String value) {
int dotPosition = sizeAttribute.indexOf(DOT_STRING);
@@ -401,22 +375,6 @@
String filePath = urls[i].substring(startPathIndex + 1,
endPathIndex);
-// if (filePath.indexOf(FILE_PROTOCOL) != -1) {
-// continue;
-// }
-//
-// if (!new File(filePath).isAbsolute()) {
-// filePath = getFilePath(input, filePath);
-// }
-//
-// filePath = FILE_PROTOCOL + SLASH + SLASH + filePath.replace('\\', '/');
-// URL url = null;
-// try {
-// url = new URL(filePath);
-// } catch (MalformedURLException e) {
-// continue;
-// }
-// filePath = url.toString();
IFile file = null;
if (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null)
15 years, 6 months
JBoss Tools SVN: r16201 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-06-25 07:39:30 -0400 (Thu, 25 Jun 2009)
New Revision: 16201
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4423 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2009-06-25 09:46:27 UTC (rev 16200)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2009-06-25 11:39:30 UTC (rev 16201)
@@ -37,6 +37,7 @@
import org.eclipse.jface.dialogs.PageChangingEvent;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.INewWizard;
@@ -55,6 +56,7 @@
* @author Dmitry Geraskov
*
*/
+@SuppressWarnings("restriction")
public class NewHibernateMappingFileWizard extends Wizard implements INewWizard, IPageChangingListener{
/**
@@ -85,12 +87,18 @@
addPage(page1);
page2 = new NewHibernateMappingFilePage();
addPage(page2);
+ }
+
+ @Override
+ public void setContainer(IWizardContainer wizardContainer) {
if (getContainer() instanceof WizardDialog) {
+ ((WizardDialog) getContainer()).removePageChangingListener(this);
+ }
+ super.setContainer(wizardContainer);
+ if (getContainer() instanceof WizardDialog) {
((WizardDialog) getContainer()).addPageChangingListener(this);
- } else {
- throw new IllegalArgumentException(HibernateConsoleMessages.NewHibernateMappingFileWizard_error);
}
- }
+ }
public void handlePageChanging(PageChangingEvent event) {
if (event.getTargetPage() == page2){
15 years, 6 months
JBoss Tools SVN: r16200 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-06-25 05:46:27 -0400 (Thu, 25 Jun 2009)
New Revision: 16200
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlAbstractForEachTemplate.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForEachTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForTokensTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4526, JSTL forEach and forTokens templates were updated.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlAbstractForEachTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlAbstractForEachTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlAbstractForEachTemplate.java 2009-06-25 09:46:27 UTC (rev 16200)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jstl.template;
+
+import java.util.List;
+
+import org.jboss.tools.jsf.vpe.jstl.template.util.JstlUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Abstract Class with common logic for JSTL forEach/forTokens tags.
+ *
+ * @author dmaliarevich
+ *
+ */
+public abstract class JstlAbstractForEachTemplate extends VpeAbstractTemplate {
+
+ protected final int TIMES_TO_ITERATE = 3;
+
+ public JstlAbstractForEachTemplate() {
+ super();
+ }
+
+ public VpeCreationData createStub(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ Element sourceElement = (Element) sourceNode;
+ nsIDOMElement span = VisualDomUtil.createBorderlessContainer(visualDocument);
+ List<Node> children = JstlUtil.getChildren(sourceElement);
+ VpeCreationData creationData = new VpeCreationData(span);
+
+ VpeChildrenInfo spanInfo = new VpeChildrenInfo(span);
+ creationData.addChildrenInfo(spanInfo);
+ for(int i = 0; i < TIMES_TO_ITERATE; i++) {
+ for (Node child : children) {
+ spanInfo.addSourceChild(child);
+ }
+ }
+ return creationData;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlAbstractForEachTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForEachTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForEachTemplate.java 2009-06-25 09:11:43 UTC (rev 16199)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForEachTemplate.java 2009-06-25 09:46:27 UTC (rev 16200)
@@ -10,17 +10,10 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jstl.template;
-import java.util.List;
-import org.jboss.tools.jsf.vpe.jstl.template.util.JstlUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Element;
import org.w3c.dom.Node;
/**
@@ -29,29 +22,15 @@
* @author dmaliarevich
*
*/
-public class JstlForEachTemplate extends VpeAbstractTemplate {
+public class JstlForEachTemplate extends JstlAbstractForEachTemplate {
- private final int TIMES_TO_ITERATE = 3;
-
public JstlForEachTemplate() {
super();
}
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
- Element sourceElement = (Element) sourceNode;
- nsIDOMElement span = VisualDomUtil.createBorderlessContainer(visualDocument);
- List<Node> children = JstlUtil.getChildren(sourceElement);
- VpeCreationData creationData = new VpeCreationData(span);
-
- VpeChildrenInfo spanInfo = new VpeChildrenInfo(span);
- creationData.addChildrenInfo(spanInfo);
- for(int i = 0; i < TIMES_TO_ITERATE; i++) {
- for (Node child : children) {
- spanInfo.addSourceChild(child);
- }
- }
- return creationData;
+ return createStub(pageContext, sourceNode, visualDocument);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForTokensTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForTokensTemplate.java 2009-06-25 09:11:43 UTC (rev 16199)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlForTokensTemplate.java 2009-06-25 09:46:27 UTC (rev 16200)
@@ -10,17 +10,9 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jstl.template;
-import java.util.List;
-
-import org.jboss.tools.jsf.vpe.jstl.template.util.JstlUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Element;
import org.w3c.dom.Node;
/**
@@ -29,28 +21,15 @@
* @author dmaliarevich
*
*/
-public class JstlForTokensTemplate extends VpeAbstractTemplate {
+public class JstlForTokensTemplate extends JstlAbstractForEachTemplate {
- private final int TIMES_TO_ITERATE = 3;
-
public JstlForTokensTemplate() {
- super();
+ super();
}
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
- Element sourceElement = (Element) sourceNode;
- nsIDOMElement span = VisualDomUtil.createBorderlessContainer(visualDocument);
- List<Node> children = JstlUtil.getChildren(sourceElement);
- VpeCreationData creationData = new VpeCreationData(span);
- VpeChildrenInfo spanInfo = new VpeChildrenInfo(span);
- creationData.addChildrenInfo(spanInfo);
- for(int i = 0; i < TIMES_TO_ITERATE; i++) {
- for (Node child : children) {
- spanInfo.addSourceChild(child);
- }
- }
- return creationData;
+ return createStub(pageContext, sourceNode, visualDocument);
}
}
15 years, 6 months
JBoss Tools SVN: r16199 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-06-25 05:11:43 -0400 (Thu, 25 Jun 2009)
New Revision: 16199
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFReapeatTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4526, removing copy past code
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java 2009-06-25 08:14:07 UTC (rev 16198)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java 2009-06-25 09:11:43 UTC (rev 16199)
@@ -70,13 +70,6 @@
return new VpeCreationData(mainTag);
}
- @Override
- public boolean recreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
-
public static String getAbsoluteResourcePath(String resourcePathInPlugin) {
String pluginPath = Activator.getPluginResourcePath();
IPath pluginFile = new Path(pluginPath);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFReapeatTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFReapeatTemplate.java 2009-06-25 08:14:07 UTC (rev 16198)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFReapeatTemplate.java 2009-06-25 09:11:43 UTC (rev 16199)
@@ -45,15 +45,5 @@
return vpeCreationData;
}
-
- /**
- * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#recreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String, java.lang.String)
- */
- @Override
- public boolean recreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
-
+
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java 2009-06-25 08:14:07 UTC (rev 16198)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java 2009-06-25 09:11:43 UTC (rev 16199)
@@ -10,15 +10,16 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.ajax4jsf.template;
+import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
-import org.jboss.tools.vpe.editor.mapping.NodeData;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
-import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMText;
@@ -26,12 +27,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
-import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
-import com.sun.org.apache.regexp.internal.recompile;
-
/**
* @author yradtsevich
*
@@ -54,16 +50,6 @@
return creator.create();
}
- /**
- * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#recreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String, java.lang.String)
- */
- @Override
- public boolean recreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
-
private static class Creator {
private static final String ATTR_STOP_TEXT = "stopText";//$NON-NLS-1$
private static final String STOP_FACET_NAME = "stop";//$NON-NLS-1$
15 years, 6 months
JBoss Tools SVN: r16198 - trunk/bpel/tests.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-06-25 04:14:07 -0400 (Thu, 25 Jun 2009)
New Revision: 16198
Added:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.test/
Removed:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/
Log:
JBIDE-4502: change the bpel test plugin folder name
Copied: trunk/bpel/tests/org.eclipse.tools.bpel.ui.test (from rev 16197, trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests)
15 years, 6 months
JBoss Tools SVN: r16197 - in trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests: META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-06-25 04:10:11 -0400 (Thu, 25 Jun 2009)
New Revision: 16197
Added:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
Removed:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests/
Modified:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/Activator.java
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
Log:
JBIDE-4502: add a test for bpel ui
Modified: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project 2009-06-25 00:18:37 UTC (rev 16196)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project 2009-06-25 08:10:11 UTC (rev 16197)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.bpel.ui.tests</name>
+ <name>org.jboss.tools.bpel.ui.test</name>
<comment></comment>
<projects>
</projects>
Modified: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF 2009-06-25 00:18:37 UTC (rev 16196)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF 2009-06-25 08:10:11 UTC (rev 16197)
@@ -1,12 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: org.jboss.tools.bpel.ui.tests
-Bundle-SymbolicName: org.jboss.tools.bpel.ui.tests
+Bundle-Name: org.jboss.tools.bpel.ui.test
+Bundle-SymbolicName: org.jboss.tools.bpel.ui.test
Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.tools.bpel.ui.tests.Activator
+Bundle-Activator: org.jboss.tools.bpel.ui.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.junit;bundle-version="3.8.2"
+ org.junit;bundle-version="3.8.2",
+ org.jboss.tools.common.test;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss, a division of Red Hat
+Import-Package: org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.jboss.tools.common.test.util
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project (rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project 2009-06-25 08:10:11 UTC (rev 16197)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ODE_Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.bpel.validator.builder</name>
+ <arguments>
+ <dictionary>
+ <key>debug</key>
+ <value>false</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml 2009-06-25 08:10:11 UTC (rev 16197)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Apache Ode 1.x Runtime"/>
+ <installed facet="bpel.facet.core" version="2.0"/>
+</faceted-project>
Property changes on: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel (rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel 2009-06-25 08:10:11 UTC (rev 16197)
@@ -0,0 +1,83 @@
+<!-- HelloWorld BPEL Process [Generated by the Eclipse BPEL Designer] -->
+<bpel:process name="HelloWorld"
+ targetNamespace="http://eclipse.org/bpel/sample"
+ suppressJoinFailure="yes"
+
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:ns1="http://eclipse.org/bpel/sample">
+
+ <!-- Import the client WSDL -->
+ <bpel:import location="HelloWorldArtifacts.wsdl" namespace="http://eclipse.org/bpel/sample"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <!-- ================================================================= -->
+ <!-- PARTNERLINKS -->
+ <!-- List of services participating in this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:partnerLinks>
+ <!-- The 'client' role represents the requester of this service. -->
+ <bpel:partnerLink name="client"
+ partnerLinkType="ns1:HelloWorld" myRole="HelloWorldProvider"/>
+ </bpel:partnerLinks>
+
+ <!-- ================================================================= -->
+ <!-- VARIABLES -->
+ <!-- List of messages and XML documents used within this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:variables>
+ <!-- Reference to the message passed as input during initiation -->
+ <bpel:variable name="input"
+ messageType="tns:HelloWorldRequestMessage"/>
+
+ <!--
+ Reference to the message that will be returned to the requester
+ -->
+ <bpel:variable name="output"
+ messageType="tns:HelloWorldResponseMessage"/>
+ </bpel:variables>
+
+ <!-- ================================================================= -->
+ <!-- ORCHESTRATION LOGIC -->
+ <!-- Set of activities coordinating the flow of messages across the -->
+ <!-- services integrated within this business process -->
+ <!-- ================================================================= -->
+ <bpel:sequence name="main">
+
+ <!-- Receive input from requester.
+ Note: This maps to operation defined in HelloWorld.wsdl
+ -->
+
+ <bpel:receive name="receiveInput" partnerLink="client"
+ portType="tns:HelloWorld"
+ operation="process" variable="input"
+ createInstance="yes"/>
+
+ <!-- Generate reply to synchronous request -->
+ <bpel:assign validate="no" name="Assign">
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal xml:space="preserve"><tns:HelloWorldResponse xmlns:tns="http://eclipse.org/bpel/sample" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:result></tns:result>
+</tns:HelloWorldResponse>
+</bpel:literal>
+ </bpel:from>
+ <bpel:to part="payload" variable="output"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[concat("Hello ", $input.payload/tns:input)]]>
+ </bpel:from>
+ <bpel:to part="payload" variable="output">
+ </bpel:to>
+ </bpel:copy>
+
+ </bpel:assign>
+ <bpel:reply name="replyOutput"
+ partnerLink="client"
+ portType="tns:HelloWorld"
+ operation="process"
+ variable="output"
+ />
+ </bpel:sequence>
+</bpel:process>
+
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex (rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex 2009-06-25 08:10:11 UTC (rev 16197)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:extensionmodel="http:///extensionmodel.ecore" xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore" namespace="http://org.eclipse.bpel.ui/">
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@variables/(a)children.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@variables/(a)children.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/(a)activities.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#/"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension" modificationStamp="1245829716000"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/(a)activities.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/@activities.1/(a)copy.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/@activities.1/(a)copy.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/(a)activities.2"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+</extensionmodel:ExtensionMap>
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl (rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl 2009-06-25 08:10:11 UTC (rev 16197)
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<definitions name="HelloWorld"
+ targetNamespace="http://eclipse.org/bpel/sample"
+ xmlns:tns="http://eclipse.org/bpel/sample"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ TYPE DEFINITION - List of types participating in this BPEL process
+ The BPEL Designer will generate default request and response types
+ but you can define or import any XML Schema type and use them as part
+ of the message types.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <types>
+ <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
+ targetNamespace="http://eclipse.org/bpel/sample"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="HelloWorldRequest">
+ <complexType>
+ <sequence>
+ <element name="input" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="HelloWorldResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ MESSAGE TYPE DEFINITION - Definition of the message types used as
+ part of the port type defintions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <message name="HelloWorldRequestMessage">
+ <part name="payload" element="tns:HelloWorldRequest"/>
+ </message>
+ <message name="HelloWorldResponseMessage">
+ <part name="payload" element="tns:HelloWorldResponse"/>
+ </message>
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PORT TYPE DEFINITION - A port type groups a set of operations into
+ a logical service unit.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+
+ <!-- portType implemented by the HelloWorld BPEL process -->
+ <portType name="HelloWorld">
+ <operation name="process">
+ <input message="tns:HelloWorldRequestMessage" />
+ <output message="tns:HelloWorldResponseMessage"/>
+ </operation>
+ </portType>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="HelloWorld">
+ <plnk:role name="HelloWorldProvider" portType="tns:HelloWorld"/>
+ </plnk:partnerLinkType>
+
+ <binding name="HelloWorldSOAPBinding" type="tns:HelloWorld">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="process">
+ <soap:operation
+ soapAction="http://eclipse.org/bpel/sample/process" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloWorldProcessService">
+ <port name="HelloWorldProcessPort" binding="tns:HelloWorldSOAPBinding">
+ <soap:address location=" http://localhost:8080/ode/processes/HelloWorld" />
+ </port>
+ </service>
+</definitions>
Property changes on: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml (rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml 2009-06-25 08:10:11 UTC (rev 16197)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" xmlns:sample="http://eclipse.org/bpel/sample">
+ <process name="sample:HelloWorld">
+ <process-events generate="all"/>
+ <provide partnerLink="client">
+ <service name="sample:HelloWorldProcessService" port="HelloWorldProcessPort"/>
+ </provide>
+ </process>
+</deploy>
\ No newline at end of file
Property changes on: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test (from rev 16170, trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests)
Modified: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/Activator.java
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests/Activator.java 2009-06-24 06:47:39 UTC (rev 16170)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/Activator.java 2009-06-25 08:10:11 UTC (rev 16197)
@@ -1,4 +1,4 @@
-package org.jboss.tools.bpel.ui.tests;
+package org.jboss.tools.bpel.ui.test;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -9,7 +9,7 @@
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.tests";
+ public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.test";
// The shared instance
private static Activator plugin;
Modified: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests/BpelUIAllTests.java 2009-06-24 06:47:39 UTC (rev 16170)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java 2009-06-25 08:10:11 UTC (rev 16197)
@@ -1,15 +1,19 @@
-package org.jboss.tools.bpel.ui.tests;
+package org.jboss.tools.bpel.ui.test;
+import org.jboss.tools.bpel.ui.test.editor.JBossBPELEditorTest;
+
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public class BpelUIAllTests extends TestCase {
- public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.tests";
+ public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.test";
public static Test suite ()
{
TestSuite suite = new TestSuite(BpelUIAllTests.class.getName());
+
+ suite.addTestSuite(JBossBPELEditorTest.class);
return suite;
}
}
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java (rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java 2009-06-25 08:10:11 UTC (rev 16197)
@@ -0,0 +1,60 @@
+package org.jboss.tools.bpel.ui.test.editor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+
+
+import junit.framework.TestCase;
+
+public class JBossBPELEditorTest extends TestCase{
+
+ static String bpelFileName = "HelloWorld.bpel";
+ IProject fproject;
+ IFile bpelFile;
+ static String BUNDLE = "org.jboss.tools.bpel.ui.test";
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ //create jboss bpel project
+ fproject = createProject("ODE_Test");
+ bpelFile = fproject.getProject().getFile(bpelFileName);
+ assertTrue(bpelFile.exists());
+ }
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+
+ }
+
+ public void testOpenEditor(){
+ IEditorPart bpelEditor = openEditor(bpelFile.getFullPath().toString());
+ assertNotNull(bpelEditor);
+ }
+
+ public IProject createProject(String prjName) throws CoreException {
+ TestProjectProvider provider = new TestProjectProvider(BUNDLE, "/projects/" + prjName,
+ prjName, true);
+ IProject prj = provider.getProject();
+ assertNotNull(prj);
+ return prj;
+ }
+
+ public static IEditorPart openEditor(String inputFile) {
+ IEditorPart part = null;
+ try {
+ part = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(inputFile)));
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ return part;
+ }
+}
Property changes on: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
JBoss Tools SVN: r16196 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-06-24 20:18:37 -0400 (Wed, 24 Jun 2009)
New Revision: 16196
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
The Var-s processing is added to the context calculation
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-06-24 22:10:23 UTC (rev 16195)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-06-25 00:18:37 UTC (rev 16196)
@@ -37,6 +37,11 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+/**
+ *
+ * @author Jeremy
+ *
+ */
public class FaceletPageContectAssistProcessor extends JspContentAssistProcessor {
private static final String UI_URI_JSF_FACELETS = "http://java.sun.com/jsf/facelets";
private static final String UI_URI_XHTML_FACELETS = "http://www.w3.org/1999/xhtml/facelets";
@@ -52,7 +57,7 @@
FaceletPageContextImpl context = new FaceletPageContextImpl();
context.setResource(superContext.getResource());
context.setElResolvers(superContext.getElResolvers());
- setVars(context);
+ setVars(context, superContext.getResource());
context.setResourceBundles(superContext.getResourceBundles());
context.setDocument(getDocument());
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-06-24 22:10:23 UTC (rev 16195)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-06-25 00:18:37 UTC (rev 16196)
@@ -15,8 +15,6 @@
import java.util.Map;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.contentassist.IContextInformation;
@@ -33,8 +31,6 @@
import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
-import org.jboss.tools.jst.jsp.contentassist.AbstractXMLContentAssistProcessor.TextRegion;
-import org.jboss.tools.jst.jsp.support.kb.WTPTextJspKbConnector.LoadBundleInfo;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.IResourceBundle;
import org.jboss.tools.jst.web.kb.KbQuery;
@@ -52,6 +48,11 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+/**
+ *
+ * @author Jeremy
+ *
+ */
public class JspContentAssistProcessor extends XmlContentAssistProcessor {
/**
@@ -68,7 +69,7 @@
context.setResource(superContext.getResource());
context.setElResolvers(superContext.getElResolvers());
context.setDocument(getDocument());
- setVars(context);
+ setVars(context, file);
setNameSpaces(context);
context.setLibraries(getTagLibraries(context));
context.setResourceBundles(getResourceBundles(context));
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java 2009-06-24 22:10:23 UTC (rev 16195)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java 2009-06-25 00:18:37 UTC (rev 16196)
@@ -10,17 +10,31 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
+import java.util.List;
+
import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Region;
import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
+import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELContextImpl;
+import org.jboss.tools.common.el.core.resolver.ELOperandResolveStatus;
import org.jboss.tools.common.el.core.resolver.ELResolver;
-import org.jboss.tools.jst.web.kb.IFaceletPageContext;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.KbQuery.Type;
-import org.jboss.tools.jst.web.kb.internal.JspContextImpl;
+/**
+ *
+ * @author Jeremy
+ *
+ */
public class XmlContentAssistProcessor extends AbstractXMLContentAssistProcessor {
/*
@@ -35,13 +49,33 @@
ELContextImpl context = new ELContextImpl();
context.setResource(getResource());
context.setElResolvers(elResolvers);
- setVars(context);
+ setVars(context, file);
return context;
}
- protected void setVars(ELContext context) {
- // TODO
+ protected void setVars(ELContextImpl context, IFile file) {
+ ELCompletionEngine fakeEngine = new ELCompletionEngine(){
+
+ public ELOperandResolveStatus resolveELOperand(IFile file,
+ ELExpression operand, boolean returnEqualedVariablesOnly,
+ List<Var> vars, ElVarSearcher varSearcher)
+ throws BadLocationException, StringIndexOutOfBoundsException {
+ return null;
+ }
+
+ public ELParserFactory getParserFactory() {
+ return ELParserUtil.getJbossFactory();
+ }
+ };
+ ElVarSearcher varSearcher = new ElVarSearcher(file, fakeEngine);
+ List<Var> vars = varSearcher.findAllVars(file, getOffset());
+
+ if (vars != null) {
+ for (Var var : vars) {
+ context.addVar(new Region(getOffset(), 0), var);
+ }
+ }
}
@Override
15 years, 6 months
JBoss Tools SVN: r16195 - in trunk/jsf/plugins/org.jboss.tools.jsf.text.ext: src/org/jboss/tools/jsf/text/ext/hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-06-24 18:10:23 -0400 (Wed, 24 Jun 2009)
New Revision: 16195
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfBundleHyperlink.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfJSPBundleHyperlinkPartitioner.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
Log:
JBIDE-4362: OpenOn doesn't work for #text nodes for feceleted pages.
Issue is fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2009-06-24 21:24:26 UTC (rev 16194)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2009-06-24 22:10:23 UTC (rev 16195)
@@ -900,6 +900,10 @@
<contentType id="org.eclipse.jst.jsp.core.jspsource">
<partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
</contentType>
+ </hyperlinkPartitioner>
+ <hyperlinkPartitioner
+ id="org.jboss.tools.common.text.ext.jsf.hyperlink.JsfJSPBundleHyperlinkPartitioner"
+ class="org.jboss.tools.jsf.text.ext.hyperlink.JsfJSPBundleHyperlinkPartitioner">
<contentType id="org.eclipse.wst.html.core.htmlsource">
<partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
</contentType>
@@ -1115,6 +1119,10 @@
<contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
<partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_BUNDLE" />
</contenttypeidentifier>
+ </hyperlink>
+ <hyperlink
+ class="org.jboss.tools.jsf.text.ext.hyperlink.JsfBundleHyperlink"
+ id="org.jboss.tools.common.text.ext.jsf.hyperlink.JsfBundleHyperlink">
<contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
<partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_BUNDLE" />
</contenttypeidentifier>
Added: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfBundleHyperlink.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfBundleHyperlink.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfBundleHyperlink.java 2009-06-24 22:10:23 UTC (rev 16195)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.jsf.text.ext.hyperlink;
+
+import org.eclipse.jface.text.IRegion;
+
+/**
+ *
+ * @author Jeremy
+ *
+ */
+public class JsfBundleHyperlink extends BundleHyperlink {
+
+ @Override
+ protected String[] getLoadBundleTagPrefixes(IRegion region) {
+ return JsfJSPBundleHyperlinkPartitioner.getLoadBundleTagPrefixes(getDocument(), region);
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfBundleHyperlink.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfJSPBundleHyperlinkPartitioner.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfJSPBundleHyperlinkPartitioner.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfJSPBundleHyperlinkPartitioner.java 2009-06-24 22:10:23 UTC (rev 16195)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.jsf.text.ext.hyperlink;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author Jeremy
+ *
+ */
+public class JsfJSPBundleHyperlinkPartitioner extends JSPBundleHyperlinkPartitioner {
+
+ private static final String JSF_CORE_URI = "http://java.sun.com/jsf/core";
+
+ protected String[] getLoadBundleTagPrefixes(IDocument document, int offset) {
+ return getLoadBundleTagPrefixes(document, new Region(offset, 0));
+ }
+
+ static String[] getLoadBundleTagPrefixes(IDocument document, IRegion region) {
+ Map<String, Set<String>> namespaces = getNameSpaces(document, region.getOffset());
+
+ if (namespaces == null)
+ return null;
+
+ Set<String> prefixes = namespaces.get(JSF_CORE_URI);
+ if (prefixes == null)
+ return null;
+
+ return prefixes.toArray(new String[prefixes.size()]);
+ }
+
+ static Map<String, Set<String>> getNameSpaces(IDocument document, int offset) {
+ IStructuredModel sModel = StructuredModelManager
+ .getModelManager()
+ .getExistingModelForRead(document);
+
+ try {
+ if (sModel == null)
+ return null;
+
+ Document xmlDocument = (sModel instanceof IDOMModel) ? ((IDOMModel) sModel)
+ .getDocument()
+ : null;
+
+ if (xmlDocument == null)
+ return null;
+
+ Map<String, Set<String>> namespaces = new HashMap<String,Set<String>>();
+ Node n = Utils.findNodeForOffset(xmlDocument, offset);
+ while (n != null) {
+ if (!(n instanceof Element)) {
+ if (n instanceof Attr) {
+ n = ((Attr) n).getOwnerElement();
+ } else {
+ n = n.getParentNode();
+ }
+ continue;
+ }
+
+ NamedNodeMap attrs = n.getAttributes();
+ for (int j = 0; attrs != null && j < attrs.getLength(); j++) {
+ Attr a = (Attr) attrs.item(j);
+ String name = a.getName();
+ if (name.startsWith("xmlns:")) {
+ final String prefix = name.substring("xmlns:".length());
+ final String uri = a.getValue();
+ if (prefix != null && prefix.trim().length() > 0 &&
+ uri != null && uri.trim().length() > 0) {
+
+ Set<String> prefixes = namespaces.get(uri.trim());
+ if (prefixes == null) {
+ prefixes = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ namespaces.put(uri.trim(), prefixes);
+ }
+ prefixes.add(prefix.trim());
+ }
+ }
+ }
+
+ n = n.getParentNode();
+ }
+
+ return namespaces;
+ } finally {
+ if (sModel != null) {
+ sModel.releaseFromRead();
+ }
+ }
+ }
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JsfJSPBundleHyperlinkPartitioner.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months