JBoss Tools SVN: r3395 - in trunk/jst/plugins/org.jboss.tools.jst.firstrun: src/org/jboss/tools/jst/firstrun and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-08-28 21:12:56 -0400 (Tue, 28 Aug 2007)
New Revision: 3395
Modified:
trunk/jst/plugins/org.jboss.tools.jst.firstrun/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JstFirstRunPlugin.java
Log:
http://jira.jboss.org/jira/browse/RHDS-94
If RHDS is installed by installer, first run find use hsqldb.jar to peconfigure HSQL driver and create DefaultDS DTP Connection profile. This profile is used as default Connection profile for Seam Facet Wizard Page. Default DS connection profile parameters is initialized the same values as it is done in hsqldb-ds.xml from default/deploy directory. <connection-url>jdbc:hsqldb:.</connection-url> was used as default url.
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/META-INF/MANIFEST.MF 2007-08-28 16:45:59 UTC (rev 3394)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/META-INF/MANIFEST.MF 2007-08-29 01:12:56 UTC (rev 3395)
@@ -9,7 +9,9 @@
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jdt.launching,
- org.eclipse.jface
+ org.eclipse.jface,
+ org.eclipse.datatools.connectivity,
+ org.eclipse.datatools.connectivity.db.generic
Bundle-Activator: org.jboss.tools.jst.firstrun.JstFirstRunPlugin
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.jst.firstrun
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-08-28 16:45:59 UTC (rev 3394)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-08-29 01:12:56 UTC (rev 3395)
@@ -13,15 +13,28 @@
import java.io.File;
import java.io.IOException;
+import java.util.Properties;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.ConnectionProfileException;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
+import org.eclipse.datatools.connectivity.drivers.DriverInstance;
+import org.eclipse.datatools.connectivity.drivers.DriverManager;
+import org.eclipse.datatools.connectivity.drivers.IDriverMgmtConstants;
+import org.eclipse.datatools.connectivity.drivers.IPropertySet;
+import org.eclipse.datatools.connectivity.drivers.PropertySetImpl;
+import org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.ui.IStartup;
@@ -43,14 +56,30 @@
public static final String JBOSS_AS_HOME = "../../../../jboss-eap/jboss-as"; // JBoss AS home directory (relative to plugin)- <RHDS_HOME>/jbossas.
- public static final String JBOSS_AS_RUNTIME_TYPE_ID = "org.jboss.ide.eclipse.as.runtime.42";
+ public static final String JBOSS_AS_RUNTIME_TYPE_ID
+ = "org.jboss.ide.eclipse.as.runtime.42";
+
public static final String JBOSS_AS_TYPE_ID = "org.jboss.ide.eclipse.as.42";
+
public static final String JBOSS_AS_NAME = "JBoss Application Server 4.2";
+
public static final String JBOSS_AS_HOST = "localhost";
+
public static final String JBOSS_AS_DEFAULT_CONFIGURATION_NAME = "default";
public static final String FIRST_START_PREFERENCE_NAME = "FIRST_START";
+
+ public static final String HSQL_DRIVER_DEFINITION_ID
+ = "DriverDefn.Hypersonic DB";
+
+ public static final String HSQL_DRIVER_NAME = "Hypersonic DB";
+
+ public static final String HSQL_DRIVER_TEMPLATE_ID
+ = "org.eclipse.datatools.enablement.hsqldb.1_8.driver";
+
+ public static final String DTP_DB_URL_PROPERTY_ID
+ = "org.eclipse.datatools.connectivity.db.URL";
/**
* @see org.eclipse.ui.IStartup#earlyStartup()
*/
@@ -123,10 +152,83 @@
server.setName(JBOSS_AS_NAME);
server.save(false, progressMonitor);
}
+
+ DriverInstance driver = DriverManager.getInstance()
+ .getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if(driver==null) {
+ TemplateDescriptor descr = TemplateDescriptor
+ .getDriverTemplateDescriptor(HSQL_DRIVER_TEMPLATE_ID);
+ IPropertySet instance = new PropertySetImpl(
+ HSQL_DRIVER_NAME,HSQL_DRIVER_DEFINITION_ID);
+ instance.setName(HSQL_DRIVER_NAME);
+ instance.setID(HSQL_DRIVER_DEFINITION_ID);
+ Properties props = new Properties();
+
+ IConfigurationElement[] template = descr.getProperties();
+ for (int i = 0; i < template.length; i++) {
+ IConfigurationElement prop = template[i];
+ String id = prop.getAttribute("id"); //$NON-NLS-1$
+
+ String value = prop.getAttribute("value"); //$NON-NLS-1$
+ props.setProperty(id, value == null ? new String()
+ : value);
+ }
+ props.setProperty(DTP_DB_URL_PROPERTY_ID, "jdbc:hsqldb:.");
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE,
+ descr.getId());
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST,
+ jbossASLocation+"/server/default/lib/hsqldb.jar");
+
+ instance.setBaseProperties(props);
+ DriverManager.getInstance().removeDriverInstance(instance.getID());
+ System.gc();
+ DriverManager.getInstance().addDriverInstance(instance);
+
+ }
+
+ driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if(driver!=null) {
+ // create profile
+ Properties props = new Properties();
+ props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID,
+ HSQL_DRIVER_DEFINITION_ID);
+ props.setProperty(
+ IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID,
+ "");
+ props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID,
+ driver.getProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID,
+ driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID,
+ driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID,
+ "Default");
+ props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, "");
+ props.setProperty(
+ IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, "false");
+ props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID,
+ driver.getProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID,
+ driver.getProperty(IDBDriverDefinitionConstants.URL_PROP_ID));
+
+ ProfileManager.getInstance().createProfile(
+ "DefaultDS",
+ "The JBoss AS Hypersonic embedded database",
+ IDBConnectionProfileConstants.CONNECTION_PROFILE_ID,
+ props,
+ "", false);
+ }
+
} catch (CoreException e) {
- JstFirstRunPlugin.getPluginLog().log(new Status(IStatus.ERROR,"org.jboss.tools.jst.first.run","Can't create new JBoss Server.", e));
+ JstFirstRunPlugin.getPluginLog().log(new Status(IStatus.ERROR,
+ JstFirstRunPlugin.PLUGIN_ID,"Can't create new JBoss Server", e));
} catch (IOException e) {
- JstFirstRunPlugin.getPluginLog().log(new Status(IStatus.ERROR,"org.jboss.tools.jst.first.run","Can't create new JBoss Server.", e));
+ JstFirstRunPlugin.getPluginLog().log(new Status(IStatus.ERROR,
+ JstFirstRunPlugin.PLUGIN_ID,"Can't create new JBoss Server", e));
+ } catch (ConnectionProfileException e) {
+ JstFirstRunPlugin.getPluginLog().log(new Status(IStatus.ERROR,
+ JstFirstRunPlugin.PLUGIN_ID,"Can't create new DTP " +
+ "Connection Profile for JBoss AS Hypersonic embedded database", e));
}
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JstFirstRunPlugin.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JstFirstRunPlugin.java 2007-08-28 16:45:59 UTC (rev 3394)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JstFirstRunPlugin.java 2007-08-29 01:12:56 UTC (rev 3395)
@@ -21,6 +21,8 @@
*
*/
public class JstFirstRunPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.jst.firstrun";
static private JstFirstRunPlugin instance;
17 years, 4 months
JBoss Tools SVN: r3394 - in trunk/as/features: org.jboss.ide.eclipse.as.test.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2007-08-28 12:45:59 -0400 (Tue, 28 Aug 2007)
New Revision: 3394
Added:
trunk/as/features/org.jboss.ide.eclipse.as.test.feature/
Removed:
trunk/as/features/org.jboss.ide.eclipes.as.test.feature/
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.test.feature/feature.xml
Log:
accidentally misspelled the as test feature
Copied: trunk/as/features/org.jboss.ide.eclipse.as.test.feature (from rev 3393, trunk/as/features/org.jboss.ide.eclipes.as.test.feature)
Modified: trunk/as/features/org.jboss.ide.eclipse.as.test.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipes.as.test.feature/feature.xml 2007-08-28 16:44:35 UTC (rev 3393)
+++ trunk/as/features/org.jboss.ide.eclipse.as.test.feature/feature.xml 2007-08-28 16:45:59 UTC (rev 3394)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.jboss.ide.eclipes.as.test.feature"
+ id="org.jboss.ide.eclipse.as.test.feature"
label="JBossTools Test Feature"
version="1.0.0"
provider-name="JBoss, a division of Red Hat">
17 years, 4 months
JBoss Tools SVN: r3393 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-08-28 12:44:35 -0400 (Tue, 28 Aug 2007)
New Revision: 3393
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-769
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-08-28 16:42:36 UTC (rev 3392)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-08-28 16:44:35 UTC (rev 3393)
@@ -48,6 +48,20 @@
class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
+ <wizard
+ category="org.jboss.tools.seam.ui"
+ class="org.jboss.tools.seam.ui.wizard.SeamGenerateEnitiesWizard"
+ icon="icons/seam16.png"
+ id="org.jboss.tools.seam.ui.SeamGenerateEntitiesWizard"
+ name="Seam Generate Entities">
+ <description>
+ Generate Entities
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+
<!--wizard
category="org.jboss.tools.seam.ui"
class="org.jboss.tools.seam.ui.wizard.SeamEntityWizard"
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-08-28 16:42:36 UTC (rev 3392)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-08-28 16:44:35 UTC (rev 3393)
@@ -12,6 +12,8 @@
private static ResourceBundle fResourceBundle;
public static String CREATE_NEW_SEAM_PROJECT;
+ public static String GENERATE_SEAM_ENTITIES_WIZARD_TITLE;
+ public static String GENERATE_SEAM_ENTITIES_WIZARD_PAGE1_MESSAGE;
static {
// load message values from bundle file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-08-28 16:42:36 UTC (rev 3392)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-08-28 16:44:35 UTC (rev 3393)
@@ -1 +1,3 @@
CREATE_NEW_SEAM_PROJECT = Create New Seam Project
+GENERATE_SEAM_ENTITIES_WIZARD_TITLE = Generate Seam Entities
+GENERATE_SEAM_ENTITIES_WIZARD_PAGE1_MESSAGE = Select seam project
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-08-28 16:44:35 UTC (rev 3393)
@@ -0,0 +1,40 @@
+ /*******************************************************************************
+ * 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.seam.ui.wizard;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.seam.ui.SeamUIMessages;
+
+/**
+ * Seam Generate Entities Wizard.
+ * @author Alexey Kazakov
+ */
+public class SeamGenerateEnitiesWizard extends Wizard implements INewWizard {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ setWindowTitle(SeamUIMessages.GENERATE_SEAM_ENTITIES_WIZARD_TITLE);
+ addPage(new SeamGenerateEnitiesWizardPage());
+ }
+}
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java 2007-08-28 16:44:35 UTC (rev 3393)
@@ -0,0 +1,45 @@
+ /*******************************************************************************
+ * 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.seam.ui.wizard;
+
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.widget.editor.LabelFieldEditor;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class SeamGenerateEnitiesWizardPage extends WizardPage {
+
+ public SeamGenerateEnitiesWizardPage() {
+ super("seam.generate.entities.page", SeamUIMessages.GENERATE_SEAM_ENTITIES_WIZARD_TITLE, null);
+ setMessage(SeamUIMessages.GENERATE_SEAM_ENTITIES_WIZARD_PAGE1_MESSAGE);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite top = new Composite(parent, SWT.NONE);
+ top.setLayout(new GridLayout());
+ top.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ LabelFieldEditor label = new LabelFieldEditor("test", "test");
+ label.createLabelControl(top);
+ setPageComplete(false);
+ setControl(top);
+ }
+}
\ No newline at end of file
17 years, 4 months
JBoss Tools SVN: r3392 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-08-28 12:42:36 -0400 (Tue, 28 Aug 2007)
New Revision: 3392
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.jpg
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hybrid.jpg
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.jpg
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
Log:
Create <rich:virtualEarth> template
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2007-08-28 16:04:41 UTC (rev 3391)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2007-08-28 16:42:36 UTC (rev 3392)
@@ -12,6 +12,7 @@
org.jboss.tools.common.model,
org.eclipse.wst.sse.ui,
org.eclipse.ui.workbench.texteditor,
- org.eclipse.ui.ide
+ org.eclipse.ui.ide,
+ org.mozilla.xpcom
Eclipse-LazyStart: true
Bundle-Vendor: Red Hat, Inc.
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.jpg
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hybrid.jpg
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hybrid.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.jpg
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java 2007-08-28 16:42:36 UTC (rev 3392)
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * 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.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author ezheleznyakov(a)exadel.com
+ *
+ */
+public class RichFacesVirtualEarthTemplate extends VpeAbstractTemplate {
+
+ private static String EARTH_AERIAL = "/virtualearth/earth_aerial.jpg";
+ private static String EARTH_HYBRID = "/virtualearth/earth_hybrid.jpg";
+ private static String EARTH_ROAD = "/virtualearth/earth_road.jpg";
+
+ private static String MAP_STYLE_ATTRIBUTE_NAME = "mapStyle";
+
+ private static String MAP_STYLE_VALUES[] = { "road", "aerial", "hybrid" };
+
+ private static String STYLE_CLASS_ATTR_NAME = "styleClass";
+
+ @Override
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ nsIDOMElement img = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+
+ String mapStyleValue = ((Element) sourceNode).getAttribute(
+ MAP_STYLE_ATTRIBUTE_NAME);
+
+ if (mapStyleValue != null && searchInMapStyleValues(mapStyleValue)) {
+ if (mapStyleValue.equalsIgnoreCase(MAP_STYLE_VALUES[0]))
+ ComponentUtil.setImg(img, EARTH_ROAD);
+ else if (mapStyleValue.equalsIgnoreCase(MAP_STYLE_VALUES[1]))
+ ComponentUtil.setImg(img, EARTH_AERIAL);
+ else if (mapStyleValue.equalsIgnoreCase(MAP_STYLE_VALUES[2]))
+ ComponentUtil.setImg(img, EARTH_HYBRID);
+ } else
+ ComponentUtil.setImg(img, EARTH_ROAD);
+
+ copyStyleAttribute(img, sourceNode);
+
+ if (((Element) sourceNode).getAttribute(STYLE_CLASS_ATTR_NAME) != null)
+ img.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ ((Element) sourceNode).getAttribute(STYLE_CLASS_ATTR_NAME));
+
+ return new VpeCreationData(img);
+ }
+
+ /**
+ *
+ * @param value
+ * Value of mapStyle attribute
+ * @return True or value of mapStyle attribute correct or false
+ */
+ private boolean searchInMapStyleValues(String mapStyleValue) {
+
+ for (int i = 0; i < MAP_STYLE_VALUES.length; i++)
+ if (MAP_STYLE_VALUES[i].equalsIgnoreCase(mapStyleValue.trim()))
+ return true;
+ return false;
+ }
+
+ /**
+ *
+ * @param img
+ * @param sourceNode
+ * The current node of the source tree.
+ */
+ private void copyStyleAttribute(nsIDOMElement img, Node sourceNode) {
+ NamedNodeMap namedNodeMap = sourceNode.getAttributes();
+ for (int i = 0; i < namedNodeMap.getLength(); i++) {
+ Node attribute = namedNodeMap.item(i);
+ if (attribute.getNodeName().equalsIgnoreCase(
+ HtmlComponentUtil.HTML_STYLE_ATTR)) {
+ img.setAttribute(attribute.getNodeName(), attribute
+ .getNodeValue());
+ return;
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 4 months
JBoss Tools SVN: r3391 - branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-08-28 12:04:41 -0400 (Tue, 28 Aug 2007)
New Revision: 3391
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Code adjustment
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-08-28 15:22:33 UTC (rev 3390)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-08-28 16:04:41 UTC (rev 3391)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<vpe:templates>
- <vpe:template-taglib uri="http://richfaces.ajax4jsf.org/rich"
+ <vpe:template-taglib uri="http://richfaces.org/rich"
prefix="rich" />
<vpe:tag name="rich:paint2D" case-sensitive="yes">
@@ -455,4 +455,20 @@
<vpe:template children="no" modify="no">
</vpe:template>
</vpe:tag>
+
+ <vpe:tag name="rich:virtualEarth" case-sensitive="yes">
+ <vpe:template children="no" modify="yes"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesVirtualEarthTemplate">
+
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"></vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
</vpe:templates>
\ No newline at end of file
17 years, 4 months
JBoss Tools SVN: r3390 - in branches/jbosstools_xulrunner/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-08-28 11:22:33 -0400 (Tue, 28 Aug 2007)
New Revision: 3390
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-743
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-28 15:17:11 UTC (rev 3389)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-28 15:22:33 UTC (rev 3390)
@@ -23,6 +23,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Path;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.ui.IEditorInput;
@@ -1437,22 +1439,22 @@
}
void setMoveCursor(nsIDOMMouseEvent mouseEvent) {
- // TODO Max Areshkau figure out with selected element
-// nsIDOMElement selectedElement = browser.getSelectedElement();
-// if (selectedElement != null && canInnerDrag(selectedElement)) {
-// if (inDragArea(getNodeBounds(selectedElement), VisualDomUtil.getMousePoint(mouseEvent))) {
-// // TODO Max Areshkau add DnD support
-// dnd.setMoveCursor();
-// }
-// }
+
+ nsIDOMElement selectedElement = xulRunnerEditor.getLastSelectedElement();
+
+ if (selectedElement != null && canInnerDrag(selectedElement)) {
+ if (inDragArea(getNodeBounds(selectedElement), VisualDomUtil.getMousePoint(mouseEvent))) {
+ // TODO Max Areshkau add DnD support
+ //dnd.setMoveCursor();
+ }
+ }
}
private boolean inDragArea(Rectangle dragArea, Point mousePoint) {
//TODO add drag and drop support
-// return dragArea.contains(mousePoint) &&
-// mousePoint.x < (dragArea.x + DRAG_AREA_WIDTH) &&
-// mousePoint.y < (dragArea.y + DRAG_AREA_HEIGHT);
- return false;
+ return dragArea.contains(mousePoint) &&
+ mousePoint.x < (dragArea.x + DRAG_AREA_WIDTH) &&
+ mousePoint.y < (dragArea.y + DRAG_AREA_HEIGHT);
}
nsIDOMElement getDragElement(nsIDOMMouseEvent mouseEvent) {
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-08-28 15:17:11 UTC (rev 3389)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-08-28 15:22:33 UTC (rev 3390)
@@ -371,7 +371,7 @@
if (editorDomEventListener != null && !isXulElement(mouseEvent)) {
boolean canDragFlag = editorDomEventListener.canInnerDrag(mouseEvent);
- //start drag session
+ //start drag sessionvpe-element
if(canDragFlag) {
getEditorDomEventListener().startDragSession(domEvent);
17 years, 4 months
JBoss Tools SVN: r3389 - trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-28 11:17:11 -0400 (Tue, 28 Aug 2007)
New Revision: 3389
Modified:
trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/VHelper.java
Log:
Null pointer prevented
Modified: trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/VHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/VHelper.java 2007-08-28 14:54:58 UTC (rev 3388)
+++ trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/VHelper.java 2007-08-28 15:17:11 UTC (rev 3389)
@@ -26,7 +26,7 @@
/** Returns instance of VManager
*/
public static VManager getManager() {
- return managerModel.getManager();
+ return managerModel == null ? null : managerModel.getManager();
}
/** Sets instance of VManager
17 years, 4 months
JBoss Tools SVN: r3388 - in branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-08-28 10:54:58 -0400 (Tue, 28 Aug 2007)
New Revision: 3388
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-743
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-08-28 14:40:15 UTC (rev 3387)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-08-28 14:54:58 UTC (rev 3388)
@@ -106,6 +106,7 @@
nsISupportsString.NS_ISUPPORTSSTRING_IID);
String data="vpe-element";
transferData.setData(data);
+ iTransferable.setTransferData(VpeController.MODEL_FLAVOR, transferData, data.length());
iTransferable.setTransferData("text/plain", transferData, data.length());
iTransferable.setTransferData("text/unicode", transferData,data.length()*2);
iTransferable.setTransferData("text/html", transferData, data.length()*2);
@@ -165,18 +166,44 @@
//in this condition early was check for xulelement
if (editorDomEventListener != null) {
if (getDragService().getCurrentSession().isDataFlavorSupported(VpeController.MODEL_FLAVOR)) {
- MozillaDropInfo info = editorDomEventListener.canExternalDrop(mouseEvent, VpeController.MODEL_FLAVOR, "");
+
+ MozillaDropInfo info;
+
+ if(getDragService().getCurrentSession().getSourceNode()==null){
+ //external drag
+ info = editorDomEventListener.canExternalDrop(mouseEvent, VpeController.MODEL_FLAVOR, "");
+ } else {
+ //internal drag
+ info = editorDomEventListener.canInnerDrop(mouseEvent);
+ }
if (info != null) {
canDrop = info.canDrop();
}
}
}
//sets possability to drop current element here
- System.out.println("["+canDrop+"]");
getDragService().getCurrentSession().setCanDrop(canDrop);
mouseEvent.preventDefault();
mouseEvent.stopPropagation();
}
+ /**
+ * Drop Event handler
+ * @param domEvent
+ * @param editorDomEventListener
+ */
+ public void dragDrop(nsIDOMEvent domEvent, EditorDomEventListener editorDomEventListener) {
+
+ if(editorDomEventListener!=null) {
+
+ if(getDragService().getCurrentSession().getSourceDocument()==null) {
+ //in this case it's is external drag
+ editorDomEventListener.externalDrop((nsIDOMMouseEvent)domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID), VpeController.MODEL_FLAVOR, "");
+ } else {
+ // in this case it's is an internal drag
+ editorDomEventListener.innerDrop((nsIDOMMouseEvent)domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID));
+ }
+ }
+ }
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-08-28 14:40:15 UTC (rev 3387)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-08-28 14:54:58 UTC (rev 3388)
@@ -2097,7 +2097,7 @@
Node sourceDragNode = ((Document)getModel().getAdapter(Document.class)).createElement(tagname);
VpeVisualInnerDropInfo visualDropInfo = selectionBuilder.getInnerDropInfo(mouseEvent);
if (visualDropInfo.getDropContainer() != null) {
- VpeSourceInnerDropInfo sourceDropInfo = visualBuilder.getSourceInnerDropInfo(sourceDragNode, visualDropInfo, true);
+ VpeSourceInnerDropInfo sourceDropInfo = visualBuilder.getSourceInnerDropInfo(sourceDragNode, visualDropInfo, true);
canDrop = sourceDropInfo.canDrop();
if (canDrop) {
VpeVisualInnerDropInfo newVisualDropInfo = visualBuilder.getInnerDropInfo(sourceDropInfo.getContainer(), sourceDropInfo.getOffset());
@@ -2462,4 +2462,9 @@
visualBuilder.getDnd().startDragSession(domEvent);
}
+ public void dragDrop(nsIDOMEvent domEvent) {
+
+ visualBuilder.getDnd().dragDrop(domEvent,this);
+ }
+
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-28 14:40:15 UTC (rev 3387)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-28 14:54:58 UTC (rev 3388)
@@ -149,8 +149,8 @@
this.pageContext = pageContext;
this.headNode = visualEditor.getHeadNode();
// TODO Max Areshkau figure out
-// dropper = new VpeDnd();
-// dropper.setDndData(false, true);
+ dropper = new VpeDnd();
+ dropper.setDndData(false, true);
}
public void buildDom(Document sourceDocument) {
@@ -293,8 +293,8 @@
boolean registerFlag = isCurrentMainDocument();
switch (sourceNode.getNodeType()) {
case Node.ELEMENT_NODE:
- Map xmlnsMap = createXmlns((Element)sourceNode);
- Set ifDependencySet = new HashSet();
+ Map<?,?> xmlnsMap = createXmlns((Element)sourceNode);
+ Set<?> ifDependencySet = new HashSet();
pageContext.setCurrentVisualNode(visualOldContainer);
VpeTemplate template = templateManager.getTemplate(pageContext, (Element)sourceNode, ifDependencySet);
VpeCreationData creationData = template.create(pageContext, sourceNode, visualDocument);
@@ -318,7 +318,7 @@
registerNodes(elementMapping);
}
if (template.isChildren()) {
- List childrenInfoList = creationData.getChildrenInfoList();
+ List<?> childrenInfoList = creationData.getChildrenInfoList();
if (childrenInfoList == null) {
addChildren(template, sourceNode, visualNewElement != null ? visualNewElement : visualOldContainer);
} else {
@@ -379,12 +379,12 @@
}
}
- protected void addChildren(VpeTemplate containerTemplate, Node sourceContainer, nsIDOMNode visualOldContainer, List childrenInfoList) {
+ protected void addChildren(VpeTemplate containerTemplate, Node sourceContainer, nsIDOMNode visualOldContainer, List<?> childrenInfoList) {
for (int i = 0; i < childrenInfoList.size(); i++) {
VpeChildrenInfo info = (VpeChildrenInfo)childrenInfoList.get(i);
nsIDOMNode visualParent = info.getVisualParent();
if (visualParent == null) visualParent = visualOldContainer;
- List sourceChildren = info.getSourceChildren();
+ List<?> sourceChildren = info.getSourceChildren();
int childrenCount = 0;
if (sourceChildren != null) {
for (int j = 0; j < sourceChildren.size(); j++) {
@@ -1130,9 +1130,12 @@
}
if (!canDrop) {
if(!checkParentsTemplates) return new VpeSourceInnerDropInfo(container, offset, canDrop);
- offset = ((NodeImpl)container).getIndex();
- container = container.getParentNode();
- return getSourceInnerDropInfo(dragNode, container, offset, false);
+// offset = ((NodeImpl)container).getIndex();
+// container = container.getParentNode();
+ //TODO Max Areshkau unclear logic , if we can drop on element why we trying to drop
+ // this on parent
+ //return getSourceInnerDropInfo(dragNode, container, offset, false);
+ return new VpeSourceInnerDropInfo(container, offset, canDrop);
}
break;
case Node.TEXT_NODE:
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2007-08-28 14:40:15 UTC (rev 3387)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2007-08-28 14:54:58 UTC (rev 3388)
@@ -81,7 +81,7 @@
while(iter.hasNext()){
Map.Entry<nsIDOMNode,VpeNodeMapping> element = iter.next();
nsIDOMNode key = element.getKey();
- if(visualNode.equals(key)) {
+ if(visualNode!=null&&visualNode.equals(key)) {
return element.getValue();
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java 2007-08-28 14:40:15 UTC (rev 3387)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java 2007-08-28 14:54:58 UTC (rev 3388)
@@ -65,4 +65,10 @@
*/
void onRefresh();
void startDragSession(nsIDOMEvent domEvent);
+
+ /**
+ * Calls when drop event occures
+ * @param domEvent
+ */
+ void dragDrop(nsIDOMEvent domEvent);
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-08-28 14:40:15 UTC (rev 3387)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-08-28 14:54:58 UTC (rev 3388)
@@ -367,33 +367,27 @@
//first param are null 0, because this not used in event handler
getEditorDomEventListener().onShowContextMenu(0, domEvent, (nsIDOMNode) domEvent.getTarget().queryInterface(nsIDOMNode.NS_IDOMNODE_IID));
} else if(DRAGGESTUREEVENT.equals(domEvent.getType())) {
- //here was moved functionality from can drag function
-// System.out.print(DRAGGESTUREEVENT);
nsIDOMMouseEvent mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
if (editorDomEventListener != null && !isXulElement(mouseEvent)) {
boolean canDragFlag = editorDomEventListener.canInnerDrag(mouseEvent);
- //TODO Max Areshkau think about using can -or not can drag if we can drag we should
//start drag session
- getEditorDomEventListener().startDragSession(domEvent);
- System.out.println("Can drag"+canDragFlag);
+ if(canDragFlag) {
+
+ getEditorDomEventListener().startDragSession(domEvent);
+ }
}
- //TODO Max Areshkau Drag gesture event
} else if(DRAGDROPEVENT.equals(domEvent.getType())) {
-
- System.out.println(DRAGDROPEVENT);
- //TODO Max Areshkau drag drop gesture event
+ // calls when drop event occure
+ getEditorDomEventListener().dragDrop(domEvent);
+ domEvent.stopPropagation();
+ domEvent.preventDefault();
} else if(DRAGENTEREVENT.equals(domEvent.getType())) {
- System.out.println(DRAGENTEREVENT);
- //TODO Max Areshkau drag enter event
+ //just ignore this event
} else if(DRAGEXITEVENT.equals(domEvent.getType())) {
- System.out.println(DRAGEXITEVENT);
- //TODO Max Areshkau drag enter event
+ //just ignore this event
} else if(DRAGOVEREVENT.equals(domEvent.getType())) {
-
getEditorDomEventListener().dragOver(domEvent);
- System.out.println(DRAGOVEREVENT);
- //TODO Max Areshkau drag over event
}
getEditorDomEventListener().onRefresh();
17 years, 4 months
JBoss Tools SVN: r3387 - workspace/max/hibernatetools.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-08-28 10:40:15 -0400 (Tue, 28 Aug 2007)
New Revision: 3387
Added:
workspace/max/hibernatetools/hibernatetools/
Log:
branch for eclipse changes to hibernate code gen
Copied: workspace/max/hibernatetools/hibernatetools (from rev 3386, trunk/hibernatetools)
17 years, 4 months
JBoss Tools SVN: r3386 - workspace/max.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-08-28 10:39:09 -0400 (Tue, 28 Aug 2007)
New Revision: 3386
Added:
workspace/max/hibernatetools/
Log:
folder for personal work areas
17 years, 4 months