JBoss Tools SVN: r4376 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: views/server/providers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-19 06:44:14 -0400 (Fri, 19 Oct 2007)
New Revision: 4376
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
Log:
sub modules are now rendered correctly in properties + name property added for consistency
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2007-10-19 10:42:53 UTC (rev 4375)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2007-10-19 10:44:14 UTC (rev 4376)
@@ -66,6 +66,7 @@
public static String ModulePropertyType;
public static String ModulePropertyProject;
public static String ModulePropertyModuleFactory;
+ public static String ModulePropertyName;
public static String RefreshViewerAction;
public static String DisableCategoryAction;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-10-19 10:42:53 UTC (rev 4375)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-10-19 10:44:14 UTC (rev 4376)
@@ -54,9 +54,10 @@
ServerDialogHeading=JBoss Server
#View's Module extension
-ModulePropertyType=Module's Type
-ModulePropertyProject=Module's Project
-ModulePropertyModuleFactory=Module's Factory
+ModulePropertyType=Type
+ModulePropertyProject=Project
+ModulePropertyModuleFactory=Factory
+ModulePropertyName=Name
DeleteModuleText=Remove
FullPublishModuleText=Full Publish
IncrementalPublishModuleText=Incremental Publish
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-10-19 10:42:53 UTC (rev 4375)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-10-19 10:44:14 UTC (rev 4376)
@@ -265,16 +265,18 @@
public String[] getPropertyKeys(Object selected) {
- return new String[] { Messages.ModulePropertyType, Messages.ModulePropertyProject };
+ return new String[] { Messages.ModulePropertyType, Messages.ModulePropertyProject, Messages.ModulePropertyName };
}
public Properties getProperties(Object selected) {
Properties props = new Properties();
if( selected != null && selected instanceof ModuleServer) {
- IModule mod = ((ModuleServer)selected).module[0];
+ ModuleServer moduleServer = ((ModuleServer)selected);
+ IModule mod = moduleServer.module[moduleServer.module.length-1];
if( mod != null && mod.getProject() != null ) {
props.setProperty(Messages.ModulePropertyType, mod.getModuleType().getId());
props.setProperty(Messages.ModulePropertyProject, mod.getProject().getName());
+ props.setProperty(Messages.ModulePropertyProject, mod.getName());
}
}
return props;
17 years, 2 months
JBoss Tools SVN: r4375 - trunk/jsf/tests.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-19 06:42:53 -0400 (Fri, 19 Oct 2007)
New Revision: 4375
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/
Log:
Copy RichFaces tests from branch jbosstools_xulrunner
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test (from rev 4374, branches/jbosstools_xulrunner/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test)
17 years, 2 months
JBoss Tools SVN: r4374 - trunk/jst/plugins/org.jboss.tools.jst.web.ui.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-19 06:40:18 -0400 (Fri, 19 Oct 2007)
New Revision: 4374
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
JBIDE-645 and JBIDE-647 ...parentCategory was set to WTP category which is not reliably picked up. resetting to none.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-10-19 10:24:32 UTC (rev 4373)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-10-19 10:40:18 UTC (rev 4374)
@@ -126,7 +126,6 @@
<extension point="org.eclipse.ui.newWizards">
<category name="JBoss Tools Web"
- parentCategory="org.eclipse.wst.web.ui"
id="org.jboss.tools.jst.web">
</category>
<wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard" icon="images/xstudio/wizards/new_css_file.gif" id="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard" name="CSS File" project="false">
17 years, 2 months
JBoss Tools SVN: r4373 - trunk/jsf/tests.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-19 06:24:32 -0400 (Fri, 19 Oct 2007)
New Revision: 4373
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/
Log:
Delete current implementation of tests. Will be replaced with tests from jbosstools_branch
17 years, 2 months
JBoss Tools SVN: r4371 - in trunk/vpe/tests/org.jboss.tools.vpe.test: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-19 06:14:24 -0400 (Fri, 19 Oct 2007)
New Revision: 4371
Added:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/AllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateLoadingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java
Removed:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateLoadingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/
trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF
Log:
Tests were fixed to be run on XULRunner
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.test
___________________________________________________________________
Name: svn:ignore
- bin
+ bin
AllTests.txt
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF 2007-10-19 10:12:54 UTC (rev 4370)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF 2007-10-19 10:14:24 UTC (rev 4371)
@@ -3,7 +3,7 @@
Bundle-Name: Tests Plug-in
Bundle-SymbolicName: org.jboss.tools.vpe.test;singleton:=true
Bundle-Version: 2.0.0
-Bundle-Activator: org.jboss.tools.vpe.tests.VpeTestPlugin
+Bundle-Activator: org.jboss.tools.vpe.test.VpeTestPlugin
Bundle-Vendor: RedHat
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@@ -11,5 +11,5 @@
org.jboss.tools.common,
org.jboss.tools.vpe
Eclipse-LazyStart: true
-Export-Package: org.jboss.tools.vpe.tests
+Export-Package: org.jboss.tools.vpe.test
Bundle-ClassPath: vpe-tests.jar
Copied: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test (from rev 4348, trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests)
Copied: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/AllTests.java (from rev 4348, trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/VpeAllTests.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/AllTests.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/AllTests.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Class created for run tests for org.jboss.tools.vpe plugin.
+ *
+ * @author Max Areshkau
+ *
+ */
+
+public class AllTests extends TestCase{
+
+ public static Test suite(){
+ TestSuite suite = new TestSuite("Tests for vpe");
+ // $JUnit-BEGIN$
+ suite.addTestSuite(TemplateLoadingTest.class);
+ suite.addTestSuite(TemplatesExpressionParsingTest.class);
+ // $JUnit-END$
+ return suite;
+ }
+}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateLoadingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/TemplateLoadingTest.java 2007-10-18 18:27:14 UTC (rev 4348)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateLoadingTest.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.osgi.framework.Bundle;
-import org.w3c.dom.Element;
-import org.jboss.tools.common.xml.XMLUtilities;
-import org.jboss.tools.vpe.VpePlugin;
-import org.jboss.tools.vpe.editor.template.VpeHtmlTemplate;
-import org.jboss.tools.vpe.editor.template.VpeTemplate;
-import junit.framework.TestCase;
-
-/**
- * JUnit Test for Loading templates
- *
- * @author Alexey Yukhovich
- */
-public class TemplateLoadingTest extends TestCase {
- /**
- * Extension point ID
- */
- private static final String COM_REDHAT_VPE_TEMPLATES = "org.jboss.tools.vpe.templates";
-
- /**
- * Test for load all templates
- */
- public void testParseTemplates() {
- //
- IExtensionRegistry extensionRepository = Platform
- .getExtensionRegistry();
-
- IExtensionPoint extensionPoint = extensionRepository
- .getExtensionPoint(COM_REDHAT_VPE_TEMPLATES);
- IExtension[] extensions = extensionPoint.getExtensions();
-
- // iterate for all extensions
- for (int i = 0; i < extensions.length; i++) {
- IExtension extension = extensions[i];
- IConfigurationElement[] elements = extension
- .getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- String pathAttrValue = elements[j].getAttribute("path");
-
- try {
- IPath templateFile = getFullpathForConfigurationElement(
- pathAttrValue, elements[j]);
-
- File file = templateFile.toFile();
- if (file.exists() && file.isFile()) {
- Element rootElement = XMLUtilities.getElement(templateFile.toFile(), null);
- assertNotNull("Cannot parse template " + templateFile.toFile(), rootElement);
- VpeTemplate vpeTemplate = new VpeHtmlTemplate();
- vpeTemplate.init(rootElement, false);
- }
- } catch (IOException ioException) {
- fail(ioException.getMessage());
- }
- }
- }
- }
-
-
- /**
- * Get a full path for IConfigurationElement
- *
- * @param fileName
- * a String contain relevant fileName
- * @param confElement
- * a IConfigurationElement
- * @return full path for IConfigurationElement
- * @throws IOException
- * if an error occurs during the conversion
- */
- private static IPath getFullpathForConfigurationElement(String name,
- IConfigurationElement confElement) throws IOException {
- // 1. get a shared instance
- VpePlugin plugin = VpePlugin.getDefault();
-
- Bundle bundle = null;
-
- if (confElement == null) {
- bundle = plugin.getBundle();
- } else {
- bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
- }
-
- URL url = bundle.getEntry("/");
-
- IPath path = new Path(FileLocator.toFileURL(url).getFile());
- path = path.append(name);
- return path;
- }
-
-
-}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateLoadingTest.java (from rev 4369, trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/TemplateLoadingTest.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateLoadingTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateLoadingTest.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Element;
+import org.jboss.tools.common.xml.XMLUtilities;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.template.VpeHtmlTemplate;
+import org.jboss.tools.vpe.editor.template.VpeTemplate;
+import junit.framework.TestCase;
+
+/**
+ * JUnit Test for Loading templates
+ *
+ * @author Alexey Yukhovich
+ */
+public class TemplateLoadingTest extends TestCase {
+ /**
+ * Extension point ID
+ */
+ private static final String COM_REDHAT_VPE_TEMPLATES = "org.jboss.tools.vpe.templates";
+
+ /**
+ * Test for load all templates
+ */
+ public void testParseTemplates() {
+ //
+ IExtensionRegistry extensionRepository = Platform
+ .getExtensionRegistry();
+
+ IExtensionPoint extensionPoint = extensionRepository
+ .getExtensionPoint(COM_REDHAT_VPE_TEMPLATES);
+ IExtension[] extensions = extensionPoint.getExtensions();
+
+ // iterate for all extensions
+ for (int i = 0; i < extensions.length; i++) {
+ IExtension extension = extensions[i];
+ IConfigurationElement[] elements = extension
+ .getConfigurationElements();
+ for (int j = 0; j < elements.length; j++) {
+ String pathAttrValue = elements[j].getAttribute("path");
+
+ try {
+ IPath templateFile = getFullpathForConfigurationElement(
+ pathAttrValue, elements[j]);
+
+ File file = templateFile.toFile();
+ if (file.exists() && file.isFile()) {
+ Element rootElement = XMLUtilities.getElement(templateFile.toFile(), null);
+ assertNotNull("Cannot parse template " + templateFile.toFile(), rootElement);
+ VpeTemplate vpeTemplate = new VpeHtmlTemplate();
+ vpeTemplate.init(rootElement, false);
+ }
+ } catch (IOException ioException) {
+ fail(ioException.getMessage());
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Get a full path for IConfigurationElement
+ *
+ * @param fileName
+ * a String contain relevant fileName
+ * @param confElement
+ * a IConfigurationElement
+ * @return full path for IConfigurationElement
+ * @throws IOException
+ * if an error occurs during the conversion
+ */
+ private static IPath getFullpathForConfigurationElement(String name,
+ IConfigurationElement confElement) throws IOException {
+ // 1. get a shared instance
+ VpePlugin plugin = VpePlugin.getDefault();
+
+ Bundle bundle = null;
+
+ if (confElement == null) {
+ bundle = plugin.getBundle();
+ } else {
+ bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
+ }
+
+ URL url = bundle.getEntry("/");
+
+ IPath path = new Path(FileLocator.toFileURL(url).getFile());
+ path = path.append(name);
+ return path;
+ }
+
+
+}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/TemplatesExpressionParsingTest.java 2007-10-18 18:27:14 UTC (rev 4348)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.core.internal.registry.ExtensionRegistry;
-import org.eclipse.core.runtime.ContributorFactoryOSGi;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IContributor;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.osgi.framework.Bundle;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.common.reporting.IProblemReporter;
-import org.jboss.tools.common.reporting.ProblemReporterFactory;
-import junit.framework.TestCase;
-
-/**
- * This class created for testing templates expression.
- *
- * @author Max Areshkau
- */
-public class TemplatesExpressionParsingTest extends TestCase {
-
- private static final String PLUGIN_FAILURE_NAME = "testFailure-plugin.xml";
-
- private static final String PLUGIN_OK_NAME = "testOk-plugin.xml";
-
- private static final String EXTENSION_POINT_ID = "org.jboss.tools.vpe.templates";
-
- private static final String EXTENSION_ERROR_EXTENSION_ID_1 = "org.jboss.tools.vpe.tests.failureExtensions";
-
- private static final String EXTENSION_ERROR_EXTENSION_ID_2 = "org.jboss.tools.vpe.tests.okExtensions";
-
- private IStatus iStatus = null;
-
- private int errorNumber = 0;
-
- private VpeTemplateManager vpeTemplateManager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- // sets problem reporter
- ProblemReporterFactory reporter = ProblemReporterFactory.getInstance();
- reporter.setReporter(new IProblemReporter() {
- public void reportProblem(IStatus status) {
- errorNumber++;
- iStatus = status;
- }
- });
- }
-
- @Override
- protected void tearDown() throws Exception {
- removeExtension(EXTENSION_POINT_ID, EXTENSION_ERROR_EXTENSION_ID_1);
- removeExtension(EXTENSION_POINT_ID, EXTENSION_ERROR_EXTENSION_ID_2);
- iStatus=null;
- errorNumber = 0;
- super.tearDown();
- }
-
- /**
- * Tests existing templates
- *
- * @throws Exception
- */
- public void testExistingTemplates() throws Exception {
-
- vpeTemplateManager = VpeTemplateManager.getInstance();
- vpeTemplateManager.reload();
- assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus);
- assertEquals("There exist some errors", 0, errorNumber);
- assertNotNull(vpeTemplateManager);
- }
-
- /**
- * Creates test template and testing that extensions with errors have errors
- * variants
- *
- * @throws Exception
- */
- public void testIncorrectTemplates() throws Exception {
- createTemplatesForTesting(PLUGIN_FAILURE_NAME);
- vpeTemplateManager = VpeTemplateManager.getInstance();
- errorNumber = 0;
- vpeTemplateManager.reload();
- assertEquals("Number founds error is Incorrect ", 5, errorNumber);
- assertNotNull("Can not parse template from ReDHat DevStudio" + iStatus,
- iStatus);
- return;
- }
-
- /**
- * Creates test template and testing possible(without errors) variants
- *
- * @throws Exception
- */
- public void testCorrectTemplates() throws Exception {
- createTemplatesForTesting(PLUGIN_OK_NAME);
- vpeTemplateManager = VpeTemplateManager.getInstance();
- vpeTemplateManager.reload();
- assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus);
- assertEquals("There exist some errors", 0, errorNumber);
- return;
- }
-
- /**
- * Tests passible template
- *
- * @throws Exception
- */
- private void createTemplatesForTesting(String pluginXmlFileName)
- throws Exception {
- IPath iPath = getFullpathForConfigurationElement(pluginXmlFileName, null);
- File file = iPath.toFile();
- FileInputStream is = new FileInputStream(file);
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- Object key = ((ExtensionRegistry) registry).getTemporaryUserToken();
- Bundle bundle = VpeTestPlugin.getDefault().getBundle();
- IContributor contributor = ContributorFactoryOSGi
- .createContributor(bundle);
- registry.addContribution(is, contributor, false, null, null, key);
- }
-
- /**
- * Get a full path for IConfigurationElement
- *
- * @param fileName
- * a String contain relevant fileName
- * @param confElement
- * a IConfigurationElement
- * @return full path for IConfigurationElement
- * @throws IOException
- * if an error occurs during the conversion
- */
- private static IPath getFullpathForConfigurationElement(String name,
- IConfigurationElement confElement) throws IOException {
- // 1. get a shared instance
- VpeTestPlugin plugin = VpeTestPlugin.getDefault();
-
- Bundle bundle = null;
-
- if (confElement == null) {
- bundle = plugin.getBundle();
- } else {
- bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
- }
-
- URL url = bundle.getEntry("/");
-
- IPath path = new Path(FileLocator.toFileURL(url).getFile());
- path = path.append(name);
- return path;
- }
-
- /**
- * Removing extensions from eclipse
- *
- * @param extensionPointId
- * @param extensionId
- */
- private void removeExtension(String extensionPointId, String extensionId) {
- // use Eclipse Dynamic Extension API
- IExtensionRegistry reg = RegistryFactory.getRegistry();
- Object token = ((ExtensionRegistry) reg).getTemporaryUserToken();
- IExtension extension = reg.getExtension(extensionPointId, extensionId);
- reg.removeExtension(extension, token);
- }
-}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java (from rev 4369, trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/TemplatesExpressionParsingTest.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.runtime.ContributorFactoryOSGi;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.osgi.framework.Bundle;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.common.reporting.IProblemReporter;
+import org.jboss.tools.common.reporting.ProblemReporterFactory;
+import junit.framework.TestCase;
+
+/**
+ * This class created for testing templates expression.
+ *
+ * @author Max Areshkau
+ */
+public class TemplatesExpressionParsingTest extends TestCase {
+
+ private static final String PLUGIN_FAILURE_NAME = "testFailure-plugin.xml";
+
+ private static final String PLUGIN_OK_NAME = "testOk-plugin.xml";
+
+ private static final String EXTENSION_POINT_ID = "org.jboss.tools.vpe.templates";
+
+ private static final String EXTENSION_ERROR_EXTENSION_ID_1 = "org.jboss.tools.vpe.tests.failureExtensions";
+
+ private static final String EXTENSION_ERROR_EXTENSION_ID_2 = "org.jboss.tools.vpe.tests.okExtensions";
+
+ private IStatus iStatus = null;
+
+ private int errorNumber = 0;
+
+ private VpeTemplateManager vpeTemplateManager;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ // sets problem reporter
+ ProblemReporterFactory reporter = ProblemReporterFactory.getInstance();
+ reporter.setReporter(new IProblemReporter() {
+ public void reportProblem(IStatus status) {
+ errorNumber++;
+ iStatus = status;
+ }
+ });
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ removeExtension(EXTENSION_POINT_ID, EXTENSION_ERROR_EXTENSION_ID_1);
+ removeExtension(EXTENSION_POINT_ID, EXTENSION_ERROR_EXTENSION_ID_2);
+ iStatus=null;
+ errorNumber = 0;
+ super.tearDown();
+ }
+
+ /**
+ * Tests existing templates
+ *
+ * @throws Exception
+ */
+ public void testExistingTemplates() throws Exception {
+
+ vpeTemplateManager = VpeTemplateManager.getInstance();
+ vpeTemplateManager.reload();
+ assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus);
+ assertEquals("There exist some errors", 0, errorNumber);
+ assertNotNull(vpeTemplateManager);
+ }
+
+ /**
+ * Creates test template and testing that extensions with errors have errors
+ * variants
+ *
+ * @throws Exception
+ */
+ public void testIncorrectTemplates() throws Exception {
+ createTemplatesForTesting(PLUGIN_FAILURE_NAME);
+ vpeTemplateManager = VpeTemplateManager.getInstance();
+ errorNumber = 0;
+ vpeTemplateManager.reload();
+ assertEquals("Number founds error is Incorrect ", 5, errorNumber);
+ assertNotNull("Can not parse template from ReDHat DevStudio" + iStatus,
+ iStatus);
+ return;
+ }
+
+ /**
+ * Creates test template and testing possible(without errors) variants
+ *
+ * @throws Exception
+ */
+ public void testCorrectTemplates() throws Exception {
+ createTemplatesForTesting(PLUGIN_OK_NAME);
+ vpeTemplateManager = VpeTemplateManager.getInstance();
+ vpeTemplateManager.reload();
+ assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus);
+ assertEquals("There exist some errors", 0, errorNumber);
+ return;
+ }
+
+ /**
+ * Tests passible template
+ *
+ * @throws Exception
+ */
+ private void createTemplatesForTesting(String pluginXmlFileName)
+ throws Exception {
+ IPath iPath = getFullpathForConfigurationElement(pluginXmlFileName, null);
+ File file = iPath.toFile();
+ FileInputStream is = new FileInputStream(file);
+ IExtensionRegistry registry = RegistryFactory.getRegistry();
+ Object key = ((ExtensionRegistry) registry).getTemporaryUserToken();
+ Bundle bundle = VpeTestPlugin.getDefault().getBundle();
+ IContributor contributor = ContributorFactoryOSGi
+ .createContributor(bundle);
+ registry.addContribution(is, contributor, false, null, null, key);
+ }
+
+ /**
+ * Get a full path for IConfigurationElement
+ *
+ * @param fileName
+ * a String contain relevant fileName
+ * @param confElement
+ * a IConfigurationElement
+ * @return full path for IConfigurationElement
+ * @throws IOException
+ * if an error occurs during the conversion
+ */
+ private static IPath getFullpathForConfigurationElement(String name,
+ IConfigurationElement confElement) throws IOException {
+ // 1. get a shared instance
+ VpeTestPlugin plugin = VpeTestPlugin.getDefault();
+
+ Bundle bundle = null;
+
+ if (confElement == null) {
+ bundle = plugin.getBundle();
+ } else {
+ bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
+ }
+
+ URL url = bundle.getEntry("/");
+
+ IPath path = new Path(FileLocator.toFileURL(url).getFile());
+ path = path.append(name);
+ return path;
+ }
+
+ /**
+ * Removing extensions from eclipse
+ *
+ * @param extensionPointId
+ * @param extensionId
+ */
+ private void removeExtension(String extensionPointId, String extensionId) {
+ // use Eclipse Dynamic Extension API
+ IExtensionRegistry reg = RegistryFactory.getRegistry();
+ Object token = ((ExtensionRegistry) reg).getTemporaryUserToken();
+ IExtension extension = reg.getExtension(extensionPointId, extensionId);
+ reg.removeExtension(extension, token);
+ }
+}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/VpeAllTests.java 2007-10-18 18:27:14 UTC (rev 4348)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Class created for run tests for org.jboss.tools.vpe plugin.
- *
- * @author Max Areshkau
- *
- */
-
-public class VpeAllTests extends TestCase{
-
- public static Test suite(){
- TestSuite suite = new TestSuite("Tests for vpe");
- // $JUnit-BEGIN$
- suite.addTestSuite(TemplateLoadingTest.class);
- suite.addTestSuite(TemplatesExpressionParsingTest.class);
- // $JUnit-END$
- return suite;
- }
-}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/VpeTestPlugin.java 2007-10-18 18:27:14 UTC (rev 4348)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.tests;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class VpeTestPlugin extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.ide.vpe.tests";
-
- // The shared instance
- private static VpeTestPlugin plugin;
-
- /**
- * The constructor
- */
- public VpeTestPlugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static VpeTestPlugin getDefault() {
- return plugin;
- }
-
-}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java (from rev 4369, trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/tests/VpeTestPlugin.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java 2007-10-19 10:14:24 UTC (rev 4371)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class VpeTestPlugin extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.ide.vpe.tests";
+
+ // The shared instance
+ private static VpeTestPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public VpeTestPlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static VpeTestPlugin getDefault() {
+ return plugin;
+ }
+
+}
17 years, 2 months
JBoss Tools SVN: r4370 - in trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-19 06:12:54 -0400 (Fri, 19 Oct 2007)
New Revision: 4370
Added:
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/AllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/DOMCreatingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerBrowserTest.java
Removed:
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/DOMCreatingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/VpeXulRunnerAllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerBrowserTest.java
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests/
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
Log:
Tests were fixed to be run on XULRunner
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test
___________________________________________________________________
Name: svn:ignore
+ bin
AllTests.txt
Modified: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2007-10-19 09:52:27 UTC (rev 4369)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2007-10-19 10:12:54 UTC (rev 4370)
@@ -11,6 +11,6 @@
org.jboss.tools.vpe.xulrunner,
org.mozilla.xpcom
Eclipse-LazyStart: true
-Export-Package: org.jboss.tools.vpe.xulrunner.tests,
+Export-Package: org.jboss.tools.vpe.xulrunner.test,
org.jboss.tools.vpe.xulrunner.view
Bundle-ClassPath: vpe-mozilla-tests.jar
Copied: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test (from rev 4367, trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests)
Copied: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/AllTests.java (from rev 4367, trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeXulRunnerAllTests.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/AllTests.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/AllTests.java 2007-10-19 10:12:54 UTC (rev 4370)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.xulrunner.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for " + AllTests.class.getName());
+ //add test cases for dom elements
+ suite.addTestSuite(DOMCreatingTest.class);
+ return suite;
+ }
+
+}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/DOMCreatingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests/DOMCreatingTest.java 2007-10-19 09:22:43 UTC (rev 4367)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/DOMCreatingTest.java 2007-10-19 10:12:54 UTC (rev 4370)
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.xulrunner.tests;
-
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
-import org.jboss.tools.vpe.xulrunner.view.XulRunnerView;
-import org.mozilla.interfaces.nsIDOMAttr;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
-import org.mozilla.interfaces.nsIDOMNodeList;
-import org.mozilla.interfaces.nsIDOMText;
-
-/**
- * This class used for testing mozilla interfaces.
- *
- * @author Max Areshkau
- *
- */
-public class DOMCreatingTest extends XulRunnerBrowserTest {
-
- /**
- * Contains brouser instamce
- */
- private XulRunnerEditor xulrunnerBrowser;
-
- /**
- * Tests possability add and remove dom elements.
- *
- */
- public void testAddRemovingDOMElements() {
- nsIDOMDocument domDocument = xulrunnerBrowser.getDOMDocument();
- nsIDOMElement root = domDocument.getDocumentElement();
- nsIDOMElement child = domDocument.createElement("test-element");
- root.appendChild(child);
- assertTrue("We doen't have elements to remove", root.getChildNodes()
- .getLength() > 0);
- for (long i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
- root.removeChild(root.getChildNodes().item(i));
- }
- root.appendChild(child);
- assertTrue("We haven't remove some elements", root.getChildNodes()
- .getLength() == 1);
- }
-
- /**
- * Tests that DOM can be created
- *
- * @throws Exception
- */
- public void testXulRunnerCreatingDOM() throws Exception {
- String chieldName = "H";
- String attrName = "color";
- String attrValue = "TEST_VALUE";
- assertNotNull(xulrunnerBrowser);
- nsIDOMDocument domDocument = xulrunnerBrowser.getDOMDocument();
- nsIDOMElement root = domDocument.getDocumentElement();
-
- for (long i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
- root.removeChild(root.getChildNodes().item(i));
- }
- // checks of creating elements with attributes and chield nodes
- nsIDOMElement child = domDocument.createElement("test-element");
- for (int i = 0; i < 4; i++) {
- child.appendChild(domDocument.createElement(chieldName + i));
- }
- for (int i = 0; i < 3; i++) {
- child.setAttribute(attrName + i, attrValue + i);
- }
- nsIDOMAttr attr = domDocument.createAttribute(attrName + 3);
- attr.setValue(attrValue + 3);
- child.setAttributeNode(attr);
- // append child element to root element
- root.appendChild(child);
- nsIDOMNode toCheck = root.getChildNodes().item(0);
- assertEquals("We haven't add child element", toCheck.getNodeName(),
- child.getNodeName());
-
- assertEquals("Number of child nodes do not coincide", 4,child
- .getChildNodes().getLength());
- nsIDOMNodeList nodeList = child.getChildNodes();
- for (int i = 0; i < nodeList.getLength(); i++) {
- assertEquals("Child node doesn't concide", nodeList.item(i)
- .getNodeName(), chieldName + i);
- }
-
- for (int i = 0; i < toCheck.getAttributes().getLength(); i++) {
- assertEquals("Attribute names doesn't coinside", toCheck.getAttributes()
- .item(i).getNodeName(), attrName + i);
- assertEquals("Attribute values doesn't coinside", toCheck.getAttributes()
- .item(i).getNodeValue(), attrValue + i);
- }
- nsIDOMText text = domDocument.createTextNode("TEST");
- root.appendChild(text);
- assertEquals("Dom element hasn't been created", "TEST", text
- .getNodeValue());
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- waitForJobs();
- XulRunnerView xulrunner
- = ((XulRunnerView) PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID));
- waitForJobs();
- delay(3000);
-
- xulrunnerBrowser = xulrunner.getBrowser();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/DOMCreatingTest.java (from rev 4369, trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests/DOMCreatingTest.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/DOMCreatingTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/DOMCreatingTest.java 2007-10-19 10:12:54 UTC (rev 4370)
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.xulrunner.test;
+
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+import org.jboss.tools.vpe.xulrunner.view.XulRunnerView;
+import org.mozilla.interfaces.nsIDOMAttr;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMNodeList;
+import org.mozilla.interfaces.nsIDOMText;
+
+/**
+ * This class used for testing mozilla interfaces.
+ *
+ * @author Max Areshkau
+ *
+ */
+public class DOMCreatingTest extends XulRunnerBrowserTest {
+
+ /**
+ * Contains brouser instamce
+ */
+ private XulRunnerEditor xulrunnerBrowser;
+
+ /**
+ * Tests possability add and remove dom elements.
+ *
+ */
+ public void testAddRemovingDOMElements() {
+ nsIDOMDocument domDocument = xulrunnerBrowser.getDOMDocument();
+ nsIDOMElement root = domDocument.getDocumentElement();
+ nsIDOMElement child = domDocument.createElement("test-element");
+ root.appendChild(child);
+ assertTrue("We doen't have elements to remove", root.getChildNodes()
+ .getLength() > 0);
+ for (long i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
+ root.removeChild(root.getChildNodes().item(i));
+ }
+ root.appendChild(child);
+ assertTrue("We haven't remove some elements", root.getChildNodes()
+ .getLength() == 1);
+ }
+
+ /**
+ * Tests that DOM can be created
+ *
+ * @throws Exception
+ */
+ public void testXulRunnerCreatingDOM() throws Exception {
+ String chieldName = "H";
+ String attrName = "color";
+ String attrValue = "TEST_VALUE";
+ assertNotNull(xulrunnerBrowser);
+ nsIDOMDocument domDocument = xulrunnerBrowser.getDOMDocument();
+ nsIDOMElement root = domDocument.getDocumentElement();
+
+ for (long i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
+ root.removeChild(root.getChildNodes().item(i));
+ }
+ // checks of creating elements with attributes and chield nodes
+ nsIDOMElement child = domDocument.createElement("test-element");
+ for (int i = 0; i < 4; i++) {
+ child.appendChild(domDocument.createElement(chieldName + i));
+ }
+ for (int i = 0; i < 3; i++) {
+ child.setAttribute(attrName + i, attrValue + i);
+ }
+ nsIDOMAttr attr = domDocument.createAttribute(attrName + 3);
+ attr.setValue(attrValue + 3);
+ child.setAttributeNode(attr);
+ // append child element to root element
+ root.appendChild(child);
+ nsIDOMNode toCheck = root.getChildNodes().item(0);
+ assertEquals("We haven't add child element", toCheck.getNodeName(),
+ child.getNodeName());
+
+ assertEquals("Number of child nodes do not coincide", 4,child
+ .getChildNodes().getLength());
+ nsIDOMNodeList nodeList = child.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ assertEquals("Child node doesn't concide", nodeList.item(i)
+ .getNodeName(), chieldName + i);
+ }
+
+ for (int i = 0; i < toCheck.getAttributes().getLength(); i++) {
+ assertEquals("Attribute names doesn't coinside", toCheck.getAttributes()
+ .item(i).getNodeName(), attrName + i);
+ assertEquals("Attribute values doesn't coinside", toCheck.getAttributes()
+ .item(i).getNodeValue(), attrValue + i);
+ }
+ nsIDOMText text = domDocument.createTextNode("TEST");
+ root.appendChild(text);
+ assertEquals("Dom element hasn't been created", "TEST", text
+ .getNodeValue());
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ waitForJobs();
+ XulRunnerView xulrunner
+ = ((XulRunnerView) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID));
+ waitForJobs();
+ delay(3000);
+
+ xulrunnerBrowser = xulrunner.getBrowser();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/VpeXulRunnerAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeXulRunnerAllTests.java 2007-10-19 09:22:43 UTC (rev 4367)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/VpeXulRunnerAllTests.java 2007-10-19 10:12:54 UTC (rev 4370)
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.xulrunner.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class VpeXulRunnerAllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for " + VpeXulRunnerAllTests.class.getName());
- //add test cases for dom elements
- suite.addTestSuite(DOMCreatingTest.class);
- return suite;
- }
-
-}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerBrowserTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests/XulRunnerBrowserTest.java 2007-10-19 09:22:43 UTC (rev 4367)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerBrowserTest.java 2007-10-19 10:12:54 UTC (rev 4370)
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.xulrunner.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.vpe.xulrunner.view.XulRunnerView;
-
-public class XulRunnerBrowserTest extends TestCase {
- public static final String VIEW_ID = "org.jboss.tools.vpe.xulrunner.view.XulRunnerView";
-
- /**
- * Process UI input but do not return for the specified time interval.
- *
- * @param waitTimeMillis
- * the number of milliseconds
- */
- protected void delay(long waitTimeMillis) {
- Display display = Display.getCurrent();
-
- // If this is the UI thread,
- // then process input.
- if (display != null) {
- long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
- while (System.currentTimeMillis() < endTimeMillis) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.update();
- }
- // Otherwise, perform a simple sleep.
- else {
- try {
- Thread.sleep(waitTimeMillis);
- } catch (InterruptedException e) {
- // Ignored.
- }
- }
- }
-
- /**
- * Wait until all background tasks are complete.
- */
- public void waitForJobs() {
- while (Job.getJobManager().currentJob() != null)
- delay(1000);
- }
-
- public void testMozillaBrowser() throws PartInitException {
- waitForJobs();
- XulRunnerView mozillaView = (XulRunnerView) PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID);
-
- // Delay for 3 seconds so that
- // the Favorites view can be seen.
- waitForJobs();
- delay(3000);
-
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
- .hideView(mozillaView);
- }
-}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerBrowserTest.java (from rev 4369, trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/tests/XulRunnerBrowserTest.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerBrowserTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerBrowserTest.java 2007-10-19 10:12:54 UTC (rev 4370)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.xulrunner.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.vpe.xulrunner.view.XulRunnerView;
+
+public class XulRunnerBrowserTest extends TestCase {
+ public static final String VIEW_ID = "org.jboss.tools.vpe.xulrunner.view.XulRunnerView";
+
+ /**
+ * Process UI input but do not return for the specified time interval.
+ *
+ * @param waitTimeMillis
+ * the number of milliseconds
+ */
+ protected void delay(long waitTimeMillis) {
+ Display display = Display.getCurrent();
+
+ // If this is the UI thread,
+ // then process input.
+ if (display != null) {
+ long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+ while (System.currentTimeMillis() < endTimeMillis) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.update();
+ }
+ // Otherwise, perform a simple sleep.
+ else {
+ try {
+ Thread.sleep(waitTimeMillis);
+ } catch (InterruptedException e) {
+ // Ignored.
+ }
+ }
+ }
+
+ /**
+ * Wait until all background tasks are complete.
+ */
+ public void waitForJobs() {
+ while (Job.getJobManager().currentJob() != null)
+ delay(1000);
+ }
+
+ public void testXulRunnerBrowser() throws PartInitException {
+ waitForJobs();
+ XulRunnerView mozillaView = (XulRunnerView) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID);
+
+ // Delay for 3 seconds so that
+ // the Favorites view can be seen.
+ waitForJobs();
+ delay(3000);
+
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .hideView(mozillaView);
+ }
+}
17 years, 2 months
JBoss Tools SVN: r4369 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: mozilla and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-19 05:52:27 -0400 (Fri, 19 Oct 2007)
New Revision: 4369
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
Log:
code adjustment
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-19 09:46:21 UTC (rev 4368)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-19 09:52:27 UTC (rev 4369)
@@ -293,7 +293,6 @@
if (visualEditor != null) {
visualEditor.setEditorDomEventListener(null);
- // TODO Max Areshkau figure out with Selection Controller
if (visualSelectionController != null) {
// visualSelectionController.Release();
visualSelectionController = null;
@@ -406,8 +405,6 @@
}
// INodeSelectionListener implementation
- //TODO Max Areshkau remove if don't used
- //looks like that this method can be removed
public void nodeSelectionChanged(NodeSelectionChangedEvent event) {
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
@@ -531,70 +528,7 @@
sourceSelectionChanged(showCaret);
switcher.stopActiveEditor();
}
-
- private void sourceSelectionChanged1() {
- Point range = sourceEditor.getTextViewer().getSelectedRange();
- int anchorPosition = range.x;
- int focusPosition = range.x + range.y;
- boolean extendFlag = range.y != 0;
- boolean reversionFlag = extendFlag && anchorPosition == VpeSelectionHelper.getCaretOffset(sourceEditor);
- if (reversionFlag) {
- anchorPosition = focusPosition;
- focusPosition = range.x;
- }
- Node focusNode = getSourceNodeAt(focusPosition);
- if (focusNode == null) {
- return;
- }
- int focusOffset = getSourceNodeOffset1(focusNode, focusPosition, !reversionFlag);
- Node anchorNode = null;
- int anchorOffset = 0;
- if (extendFlag) {
- anchorNode = getSourceNodeAt(anchorPosition);
- anchorOffset = getSourceNodeOffset1(anchorNode, anchorPosition, reversionFlag);
- } else {
- anchorNode = focusNode;
- anchorOffset = focusOffset;
- }
-
- if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
- System.out.println("sourceSelectionChanged1"); //$NON-NLS-1$
- System.out.println(" anchorNode: " + anchorNode.getNodeName() + " anchorOffset: " + anchorOffset); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(" focusNode: " + focusNode.getNodeName() + " focusOffset: " + focusOffset + " focusPosition: " + focusPosition); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- try{
- if(anchorNode.getNodeType() == Node.TEXT_NODE || anchorNode.getNodeType() == Node.ATTRIBUTE_NODE){
- IndexedRegion region = (IndexedRegion)anchorNode;
- String text;
- if (anchorNode.getNodeType() == Node.TEXT_NODE) {
- text = sourceEditor.getTextViewer().getDocument().get(region.getStartOffset(), region.getEndOffset()-region.getStartOffset());
- } else {
- text = ((AttrImpl)anchorNode).getValueRegionText();
- }
- anchorOffset = TextUtil.visualPosition(text, anchorOffset);
- }
- if(focusNode.getNodeType() == Node.TEXT_NODE || focusNode.getNodeType() == Node.ATTRIBUTE_NODE){
- IndexedRegion region = (IndexedRegion)focusNode;
- String text;
- if (focusNode.getNodeType() == Node.TEXT_NODE) {
- text = sourceEditor.getTextViewer().getDocument().get(region.getStartOffset(), region.getEndOffset()-region.getStartOffset());
- } else {
- text = ((AttrImpl)focusNode).getValueRegionText();
- }
- focusOffset = TextUtil.visualPosition(text, focusOffset);
- }
- }catch(Exception ex){
- VpePlugin.reportProblem(ex);
- }
-
- if (anchorOffset == 2 && anchorNode == focusNode && anchorNode.getNodeType() == Node.ELEMENT_NODE) {
- selectionBuilder.setVisualSelection(anchorNode, anchorOffset, focusNode, focusOffset, reversionFlag, false, true);
- } else {
- selectionBuilder.setVisualSelection(anchorNode, anchorOffset, focusNode, focusOffset, reversionFlag, false, true);
- }
-// toolbarFormatControllerManager.selectionChanged();
- }
-
+
// IModelLifecycleListener implementation
public void processPreModelEvent(ModelLifecycleEvent event) {
}
@@ -721,19 +655,6 @@
}
}
- public void _mouseDown(nsIDOMMouseEvent mouseEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
- return;
- }
- nsIDOMElement visualAppropriateElement = selectionBuilder.getAppropriateElementForSelection(mouseEvent);
- if (visualAppropriateElement != null) {
- nsIDOMElement visualElement = visualBuilder.getDragElement(visualAppropriateElement);
- if (visualElement != null) {
- selectionBuilder.setVisualElementSelection(visualElement);
- }
- }
- switcher.stopActiveEditor();
- }
public void mouseDown(nsIDOMMouseEvent mouseEvent) {
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
@@ -1806,38 +1727,6 @@
event.preventDefault();
}
- public void _drop(nsIDOMEvent event) {
- if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
- System.out.println("<<<<<<<<<<<<<<<<<<<< dragDrop"); //$NON-NLS-1$
- }
- boolean canDrop = !xulRunnerEditor.isMozillaDragFlavor();
- if (canDrop) {
- Clipboard clipboard = new Clipboard(Display.getCurrent());
- canDrop = clipboard.getContents(ModelTransfer.getInstance()) != null;
- }
- if (canDrop) {
- canDrop = VpeDndUtil.isDropEnabled((IModelObjectEditorInput)sourceEditor.getEditorInput());
- }
- if (canDrop) {
- VpeVisualCaretInfo caretInfo = selectionBuilder.getVisualCaretInfo(event);
- canDrop = caretInfo.exist();
- if (canDrop) {
- caretInfo.showCaret();
- caretInfo.hideCaret();
- Point range = caretInfo.getSourceSelectionRange();
- if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
- System.out.println(" Drop Position: " + range.x + " " + range.y); //$NON-NLS-1$ //$NON-NLS-2$
- }
- VpeDndUtil.drop((IModelObjectEditorInput)sourceEditor.getEditorInput(), (ISourceViewer)sourceEditor.getAdapter(ISourceViewer.class), new VpeSelectionProvider(range.x, range.y));
- }
- }
- xulRunnerEditor.hideDragCaret();
- if (!canDrop) {
- event.stopPropagation();
- event.preventDefault();
- }
- }
-
public boolean canInnerDrag(nsIDOMMouseEvent event) {
onHideTooltip();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java 2007-10-19 09:46:21 UTC (rev 4368)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java 2007-10-19 09:52:27 UTC (rev 4369)
@@ -36,10 +36,6 @@
void mouseUp(nsIDOMMouseEvent mouseEvent);
void mouseClick(nsIDOMMouseEvent mouseEvent);
void mouseDblClick(nsIDOMMouseEvent mouseEvent);
-// void mouseOver(nsIDOMMouseEvent mouseEvent);
-// void mouseOut(nsIDOMMouseEvent mouseEvent);
-// void keyDown(nsIDOMKeyEvent keyEvent);
-// void keyUp(nsIDOMKeyEvent keyEvent);
void mouseMove(nsIDOMMouseEvent mouseEvent);
void keyPress(nsIDOMKeyEvent keyEvent);
void elementResized(nsIDOMElement element, int resizerConstrains, int top, int left, int width, int height);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-10-19 09:46:21 UTC (rev 4368)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-10-19 09:52:27 UTC (rev 4369)
@@ -28,8 +28,6 @@
class MozillaDomEventListener implements nsIDOMEventListener, nsISelectionListener {
- // TODO Max Areshkau add DnD
-// private XPCOMObject dropListener;
private XulRunnerEditor visualEditor;
17 years, 2 months
JBoss Tools SVN: r4368 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-19 05:46:21 -0400 (Fri, 19 Oct 2007)
New Revision: 4368
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
Log:
Fix resources path in rich:virtualEarth template
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java 2007-10-19 09:22:43 UTC (rev 4367)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java 2007-10-19 09:46:21 UTC (rev 4368)
@@ -29,9 +29,9 @@
*/
public class RichFacesVirtualEarthTemplate extends VpeAbstractTemplate {
- private static String EARTH_AERIAL = "/virtualearth/earth_aerial.png";
- private static String EARTH_HYBRID = "/virtualearth/earth_hybrid.png";
- private static String EARTH_ROAD = "/virtualearth/earth_road.png";
+ private static String EARTH_AERIAL = "/virtualEarth/earth_aerial.png";
+ private static String EARTH_HYBRID = "/virtualEarth/earth_hybrid.png";
+ private static String EARTH_ROAD = "/virtualEarth/earth_road.png";
private static String MAP_STYLE_ATTRIBUTE_NAME = "mapStyle";
17 years, 2 months
JBoss Tools SVN: r4367 - trunk/vpe/tests.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-19 05:22:43 -0400 (Fri, 19 Oct 2007)
New Revision: 4367
Removed:
trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/
Log:
Unnecessary test after mozilla was removed
17 years, 2 months