JBoss Tools SVN: r4103 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-10 16:48:57 -0400 (Wed, 10 Oct 2007)
New Revision: 4103
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/plugin.xml
Log:
JBIDE-417
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/plugin.xml 2007-10-10 20:48:55 UTC (rev 4102)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/plugin.xml 2007-10-10 20:48:57 UTC (rev 4103)
@@ -43,22 +43,7 @@
<adapterFactoryDescription
class="org.jboss.ide.eclipse.as.ui.mbeans.editors.AdaptorFactoryProviderForServiceXML"/>
</extension>
- <extension
- point="org.eclipse.ui.newWizards">
- <category
- id="org.jboss.ide.eclipse.as.ui.MBeanComponentsCategory"
- name="MBean Components"
- parentCategory="org.jboss.ide.eclipse.ui.wizards"/>
- <wizard
- category="org.jboss.ide.eclipse.ui.wizards/org.jboss.ide.eclipse.as.ui.MBeanComponentsCategory"
- class="org.jboss.ide.eclipse.as.ui.mbeans.wizards.NewMBeanWizard"
- icon="icons/mbean16.gif"
- id="org.jboss.ide.eclipse.as.ui.MBeanComponents"
- name="MBean Stubs"
- project="false"/>
- </extension>
-
<extension
point="org.jboss.ide.eclipse.as.ui.mbeans.ServiceXMLQuickFixProvider">
<QuickFixProvider class="org.jboss.ide.eclipse.as.ui.mbeans.editors.proposals.internal.ConvertNodeToXPathDialogProvider"/>
@@ -85,7 +70,22 @@
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ id="org.jboss.ide.eclipse.as.ui.MBeanComponentsCategory"
+ name="MBean Components"
+ parentCategory="org.jboss.ide.eclipse.ui.wizards"/>
+ <wizard
+ category="org.jboss.ide.eclipse.ui.wizards/org.jboss.ide.eclipse.as.ui.MBeanComponentsCategory"
+ class="org.jboss.ide.eclipse.as.ui.mbeans.wizards.NewMBeanWizard"
+ icon="icons/mbean16.gif"
+ id="org.jboss.ide.eclipse.as.ui.MBeanComponents"
+ name="MBean Stubs"
+ project="false"/>
+ </extension>
+
<extension point="org.eclipse.ui.newWizards">
<wizard
icon="icons/ctool16/newclass_wiz.gif"
@@ -100,7 +100,5 @@
name="EJB3 Message Driven Bean"
id="org.jboss.ide.eclipse.ejb3.wizards.ui.NewMessageDrivenBeanWizard"/>
</extension>
-
-
</plugin>
17 years, 3 months
JBoss Tools SVN: r4102 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui/perspective and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-10 16:48:55 -0400 (Wed, 10 Oct 2007)
New Revision: 4102
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-417
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2007-10-10 19:36:19 UTC (rev 4101)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2007-10-10 20:48:55 UTC (rev 4102)
@@ -91,19 +91,21 @@
layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
// new actions - Java project creation wizard
+
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.jboss.ide.eclipse.as.ui.MBeanComponents");
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard");
+ layout.addNewWizardShortcut("org.jboss.tools.seam.ui.wizards.SeamProjectWizard");
+ layout.addNewWizardShortcut("org.eclipse.jst.servlet.ui.internal.wizard.AddServletWizard");
+ layout.addNewWizardShortcut("org.jboss.ide.eclipse.ejb3.wizards.ui.NewSessionBeanWizard");
+ layout.addNewWizardShortcut("org.jboss.ide.eclipse.ejb3.wizards.ui.NewMessageDrivenBeanWizard");
+ layout.addNewWizardShortcut("org.jboss.ide.eclipse.as.ui.MBeanComponents");
+
+
// perspectives
layout.addPerspectiveShortcut("org.eclipse.debug.ui.DebugPerspective");
layout.addPerspectiveShortcut("org.jboss.ide.eclipse.jbosscache.perspective2");
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-10-10 19:36:19 UTC (rev 4101)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-10-10 20:48:55 UTC (rev 4102)
@@ -327,5 +327,4 @@
</consolePatternMatchListener>
</extension>
-
</plugin>
17 years, 3 months
JBoss Tools SVN: r4101 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-10 15:36:19 -0400 (Wed, 10 Oct 2007)
New Revision: 4101
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
Log:
JBIDE-415
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2007-10-10 17:52:36 UTC (rev 4100)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2007-10-10 19:36:19 UTC (rev 4101)
@@ -45,9 +45,10 @@
IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$
folder.addView(JavaUI.ID_PACKAGES);
- folder.addView(JavaUI.ID_TYPE_HIERARCHY);
+ folder.addView("org.eclipse.ui.navigator.ProjectExplorer");
folder.addPlaceholder(IPageLayout.ID_RES_NAV);
+
IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$
outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
outputfolder.addView(JavaUI.ID_JAVADOC_VIEW);
17 years, 3 months
JBoss Tools SVN: r4100 - in trunk/common/plugins/org.jboss.tools.common.text.ext: src/org/jboss/tools/common/text/ext/hyperlink/jsp and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-10 13:52:36 -0400 (Wed, 10 Oct 2007)
New Revision: 4100
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1052 Open On doesn't work on taglib declaration on jsp page.
Issue is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2007-10-10 16:41:37 UTC (rev 4099)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2007-10-10 17:52:36 UTC (rev 4100)
@@ -201,6 +201,10 @@
id="org.jboss.tools.common.text.ext.hyperlink.jsp.JSPTaglibHyperlinkPartitioner">
<contentType id="org.eclipse.jst.jsp.core.jspsource">
<partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_ROOT"/>
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/jsp:directive.taglib/uri" />
+ <axis path="*/jsp:directive.taglib/prefix" />
+ </partitionType>
</contentType>
</hyperlinkPartitioner>
@@ -633,6 +637,9 @@
<contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
<partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_XMLNS" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
+ <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_XMLNS" />
+ </contenttypeidentifier>
</hyperlink>
<hyperlink
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java 2007-10-10 16:41:37 UTC (rev 4099)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java 2007-10-10 17:52:36 UTC (rev 4100)
@@ -86,7 +86,7 @@
Attr xmlnsAttr = (Attr)n;
if (xmlnsAttr.getName() == null || !xmlnsAttr.getName().startsWith("xmlns:")) return null;
Element rootElem = (Element)xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return null;
+ if (!(rootElem.getNodeName().equals("jsp:root") || rootElem.getNodeName().equalsIgnoreCase("html"))) return null;
String uri = xmlnsAttr.getValue();
if (uri == null || uri.trim().length() == 0) return null;
@@ -127,7 +127,7 @@
IDOMAttr xmlnsAttr = (IDOMAttr)n;
if (xmlnsAttr.getName() == null || !xmlnsAttr.getName().startsWith("xmlns:")) return null;
Element rootElem = xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return null;
+ if (!(rootElem.getNodeName().equals("jsp:root") || rootElem.getNodeName().equalsIgnoreCase("html"))) return null;
final int taglibLength = xmlnsAttr.getValueRegionText().length();
final int taglibOffset = xmlnsAttr.getValueRegionStartOffset();
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java 2007-10-10 16:41:37 UTC (rev 4099)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java 2007-10-10 17:52:36 UTC (rev 4100)
@@ -46,7 +46,7 @@
IDOMAttr xmlnsAttr = (IDOMAttr)n;
if (xmlnsAttr.getName() == null || !xmlnsAttr.getName().startsWith("xmlns:")) return null;
Element rootElem = xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return null;
+ if (!(rootElem.getNodeName().equals("jsp:root") || rootElem.getNodeName().equalsIgnoreCase("html"))) return null;
String xmlns = xmlnsAttr.getValueRegionText();
String axis = getAxis(document, superRegion);
String contentType = superRegion.getContentType();
@@ -80,7 +80,7 @@
Attr xmlnsAttr = (Attr)n;
if (xmlnsAttr.getName() == null || !xmlnsAttr.getName().startsWith("xmlns:")) return false;
Element rootElem = xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return false;
+ if (!(rootElem.getNodeName().equals("jsp:root") || rootElem.getNodeName().equalsIgnoreCase("html"))) return false;
return true;
} catch (Exception x) {
//ignore
17 years, 3 months
JBoss Tools SVN: r4099 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-10-10 12:41:37 -0400 (Wed, 10 Oct 2007)
New Revision: 4099
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
Log:
JBIDE-983: Objects on diagram must have context menu
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-10 15:18:47 UTC (rev 4098)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-10 16:41:37 UTC (rev 4099)
@@ -11,6 +11,8 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.mapping.Collection;
+import org.hibernate.mapping.Map;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.Subclass;
@@ -85,6 +87,18 @@
}
}
}
+
+ if (resource == null) {
+ Iterator �ollectionMappingsIterator = consoleConfiguration.getConfiguration().getCollectionMappings();
+ while (�ollectionMappingsIterator.hasNext()) {
+ Collection elem = (Collection) �ollectionMappingsIterator.next();
+ Table collectionTable = elem.getCollectionTable();
+ if (HibernateUtils.getTableName(collectionTable).equals(HibernateUtils.getTableName(table))) {
+ PersistentClass owner = elem.getOwner();
+ resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, owner);
+ }
+ }
+ }
} else if (selectedElement instanceof Subclass) {
Subclass rootClass = (Subclass)selectedElement;
resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, rootClass);
17 years, 3 months
JBoss Tools SVN: r4098 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-10-10 11:18:47 -0400 (Wed, 10 Oct 2007)
New Revision: 4098
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java
Log:
JBIDE-983: Objects on diagram must have context menu
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.veditor;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
@@ -52,4 +53,10 @@
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
return window.getActivePage();
}
+
+ public static Shell getShell(){
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ return window.getShell();
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -53,7 +53,7 @@
if (resource == null) {
if (OpenFileActionUtils.rootClassHasAnnotations(consoleConfiguration, configXMLFile, rootClass)) {
- String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass);
try {
resource = proj.findType(fullyQualifiedName).getResource();
} catch (JavaModelException e) {
@@ -76,7 +76,7 @@
while (classMappingsIterator.hasNext()) {
PersistentClass elem = (PersistentClass) classMappingsIterator.next();
if (HibernateUtils.getTableName(elem.getTable()).equals(HibernateUtils.getTableName(table))) {
- String fullyQualifiedName = HibernateUtils.getPersistentClassName(elem.getClassName());
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(elem);
try {
resource = proj.findType(fullyQualifiedName).getResource();
} catch (JavaModelException e) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -7,7 +7,9 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.gef.ui.actions.SelectionAction;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.hibernate.console.ConsoleConfiguration;
@@ -43,12 +45,13 @@
PersistentClass rootClass = (PersistentClass) iterator.next();
IResource resource = null;
- String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass);
if (fullyQualifiedName.indexOf("$") > 0) {
fullyQualifiedName = fullyQualifiedName.substring(0, fullyQualifiedName.indexOf("$"));
}
try {
- resource = proj.findType(fullyQualifiedName).getResource();
+ IType type = proj.findType(fullyQualifiedName);
+ if (type != null) resource = type.getResource();
} catch (JavaModelException e) {
VisualEditorPlugin.getDefault().logError("Can't find source file.", e);
}
@@ -60,6 +63,9 @@
VisualEditorPlugin.getDefault().logError("Can't open source file.", e);
}
}
+ if (resource == null) {
+ MessageDialog.openInformation(VisualEditorPlugin.getShell(), "Open Source File", "Source file for class '" + fullyQualifiedName + "' not found.");
+ }
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -3,8 +3,11 @@
public class HTConstants {
public static String HIBERNATE_TAG_CLASS = "class";
public static String HIBERNATE_TAG_TABLE = "table";
- public static String HIBERNATE_TAG_SUBCLASS = "subclass";
+ public static String HIBERNATE_TAG_SUBCLASS = "subclass";
+ public static String HIBERNATE_TAG_JOINED_SUBCLASS = "joined-subclass";
+ public static String HIBERNATE_TAG_UNION_SUBCLASS = "union-subclass";
public static String HIBERNATE_TAG_NAME = "name";
+ public static String HIBERNATE_TAG_ENTITY_NAME = "entity-name";
public static String HIBERNATE_TAG_SESSION_FACTORY = "session-factory";
public static String HIBERNATE_TAG_MAPPING = "mapping";
public static String HIBERNATE_TAG_RESOURCE = "resource";
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -18,6 +18,14 @@
return getTableName(table.getCatalog(), table.getSchema(), table.getName());
}
+ public static String getPersistentClassName(PersistentClass rootClass) {
+ if (rootClass == null) {
+ return "";
+ } else {
+ return rootClass.getEntityName() != null ? rootClass.getEntityName() : rootClass.getClassName();
+ }
+ }
+
public static String getPersistentClassName(String className) {
if (className == null) {
return "";
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -72,7 +72,7 @@
public static boolean rootClassHasAnnotations(ConsoleConfiguration consoleConfiguration, java.io.File configXMLFile, RootClass rootClass) {
Document doc = getDocument(consoleConfiguration, configXMLFile);
- return getElements(doc, HTConstants.HIBERNATE_TAG_MAPPING, HTConstants.HIBERNATE_TAG_CLASS, HibernateUtils.getPersistentClassName(rootClass.getClassName())).hasNext();
+ return getElements(doc, HTConstants.HIBERNATE_TAG_MAPPING, HTConstants.HIBERNATE_TAG_CLASS, HibernateUtils.getPersistentClassName(rootClass)).hasNext();
}
private static boolean elementInResource(ConsoleConfiguration consoleConfiguration, IResource resource, Object element) {
@@ -89,16 +89,30 @@
public static boolean rootClassInResource(ConsoleConfiguration consoleConfiguration, IResource resource, RootClass persistentClass) {
Document doc = getDocument(consoleConfiguration, resource.getLocation().toFile());
- return getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass.getClassName()))).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass.getClassName())).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass.getClassName()))).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HibernateUtils.getPersistentClassName(persistentClass.getClassName())).hasNext();
+ return getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HibernateUtils.getPersistentClassName(persistentClass)).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext();
}
public static boolean subclassInResource(ConsoleConfiguration consoleConfiguration, IResource resource, Subclass persistentClass) {
Document doc = getDocument(consoleConfiguration, resource.getLocation().toFile());
- return getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass.getClassName()))).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass.getClassName())).hasNext();
+ return getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext() ||
+
+ getElements(doc, HTConstants.HIBERNATE_TAG_JOINED_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_JOINED_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_JOINED_SUBCLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_JOINED_SUBCLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext() ||
+
+ getElements(doc, HTConstants.HIBERNATE_TAG_UNION_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_UNION_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_UNION_SUBCLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_UNION_SUBCLASS, HTConstants.HIBERNATE_TAG_ENTITY_NAME, HibernateUtils.getPersistentClassName(persistentClass)).hasNext();
}
public static boolean tableInResource(ConsoleConfiguration consoleConfiguration, IResource resource, Table table) {
@@ -128,8 +142,15 @@
}
Attribute classNameAttr = element.attribute( HTConstants.HIBERNATE_TAG_NAME );
- String physicalTableName = consoleConfiguration.getConfiguration().getNamingStrategy().classToTableName(classNameAttr.getValue());
- if (table.getName().equals(physicalTableName)) {
+ if (classNameAttr == null) classNameAttr = element.attribute( HTConstants.HIBERNATE_TAG_ENTITY_NAME);
+ if (classNameAttr != null) {
+ String physicalTableName = consoleConfiguration.getConfiguration().getNamingStrategy().classToTableName(classNameAttr.getValue());
+ if (table.getName().equals(physicalTableName)) {
+ return true;
+ }
+ }
+
+ if (getElements(doc, HTConstants.HIBERNATE_TAG_TABLE, table.getName()).hasNext()) {
return true;
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -70,7 +70,7 @@
IResource resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, rootClass);
if (resource == null) {
- String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass);
try {
resource = proj.findType(fullyQualifiedName).getResource();
} catch (JavaModelException e) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java 2007-10-10 15:03:43 UTC (rev 4097)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java 2007-10-10 15:18:47 UTC (rev 4098)
@@ -13,8 +13,10 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.internal.ObjectPluginAction;
@@ -31,9 +33,10 @@
IJavaProject proj = OpenFileActionUtils.findJavaProject(consoleConfiguration);
IResource resource = null;
- String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass);
try {
- resource = proj.findType(fullyQualifiedName).getResource();
+ IType type = proj.findType(fullyQualifiedName);
+ if (type != null) resource = type.getResource();
} catch (JavaModelException e) {
ViewPlugin.getDefault().logError("Can't find source file.", e);
}
@@ -45,5 +48,8 @@
ViewPlugin.getDefault().logError("Can't open source file.", e);
}
}
+ if (resource == null) {
+ MessageDialog.openInformation(ViewPlugin.getActiveWorkbenchShell(), "Open Source File", "Source file for class '" + fullyQualifiedName + "' not found.");
+ }
}
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4097 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-10 11:03:43 -0400 (Wed, 10 Oct 2007)
New Revision: 4097
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLinkHelper.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
Log:
JBIDE-1064
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2007-10-10 15:02:43 UTC (rev 4096)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2007-10-10 15:03:43 UTC (rev 4097)
@@ -40,6 +40,7 @@
org.eclipse.jface,
org.eclipse.ui,
org.eclipse.ui.navigator,
+ org.eclipse.ui.navigator.resources,
org.eclipse.jst.j2ee.navigator.ui,
org.eclipse.help,
org.eclipse.jdt.launching,
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-10 15:02:43 UTC (rev 4096)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-10-10 15:03:43 UTC (rev 4097)
@@ -370,6 +370,7 @@
<includes>
<contentExtension pattern="org.jboss.tools.jst.web.ui.navigator.fileContent" />
<contentExtension pattern="org.jboss.tools.jst.web.ui.navigator.projectContent" />
+ <contentExtension pattern="org.jboss.tools.jst.web.ui.navigator.XLinkHelper"/>
</includes>
</viewerContentBinding>
</extension>
@@ -446,6 +447,25 @@
</navigatorContent>
</extension>
+ <extension
+ point="org.eclipse.ui.navigator.linkHelper">
+ <linkHelper
+ class="org.jboss.tools.jst.web.ui.navigator.XLinkHelper"
+ id="org.jboss.tools.jst.web.ui.navigator.XLinkHelper">
+ <selectionEnablement>
+ <or>
+ <instanceof value="org.jboss.tools.common.model.XModelObject"/>
+ </or>
+ </selectionEnablement>
+ <editorInputEnablement>
+ <or>
+ <instanceof value="org.eclipse.ui.IFileEditorInput"/>
+ <instanceof value="org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput"/>
+ </or>
+ </editorInputEnablement>
+ </linkHelper>
+ </extension>
+
<extension point="org.jboss.tools.common.model.classes">
<xclass id="org.jboss.tools.jst.web.ui.WebUiPlugin"
class="org.jboss.tools.jst.web.ui.WebUiPlugin"/>
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-10-10 15:02:43 UTC (rev 4096)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-10-10 15:03:43 UTC (rev 4097)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ContributionItem;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuManager;
@@ -26,12 +27,14 @@
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionConstants;
import org.jboss.tools.common.meta.action.XAction;
import org.jboss.tools.common.meta.action.XActionList;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.action.XModelObjectAction;
import org.jboss.tools.common.model.ui.action.XModelObjectActionList;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.model.util.FindObjectHelper;
public class XActionProvider extends CommonActionProvider {
@@ -50,6 +53,7 @@
registerAction(actionBars, o, "CopyActions.Copy", ActionFactory.COPY.getId());
registerAction(actionBars, o, "CopyActions.Paste", ActionFactory.PASTE.getId());
registerAction(actionBars, o, "CopyActions.Cut", ActionFactory.CUT.getId());
+ actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, new XOpenAction(o));
}
}
@@ -137,3 +141,17 @@
}
}
+class XOpenAction extends Action {
+ XModelObject o;
+
+ public XOpenAction(XModelObject o) {
+ this.o = o;
+ }
+
+ public void run() {
+ if(o != null) {
+ FindObjectHelper.findModelObject(o, FindObjectHelper.IN_EDITOR_ONLY);
+ }
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLinkHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLinkHelper.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLinkHelper.java 2007-10-10 15:03:43 UTC (rev 4097)
@@ -0,0 +1,47 @@
+package org.jboss.tools.jst.web.ui.navigator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.ide.ResourceUtil;
+import org.eclipse.ui.navigator.ILinkHelper;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.model.util.FindObjectHelper;
+
+public class XLinkHelper implements ILinkHelper {
+
+ public XLinkHelper() {}
+
+ public void activateEditor(IWorkbenchPage page,
+ IStructuredSelection selection) {
+ if(selection == null || selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
+ return;
+ }
+ IStructuredSelection s = (IStructuredSelection)selection;
+ Object object = s.getFirstElement();
+ if(object instanceof XModelObject) {
+ XModelObject o = (XModelObject)object;
+ FindObjectHelper.findModelObject(o, FindObjectHelper.IN_EDITOR_ONLY);
+ }
+ }
+
+ public IStructuredSelection findSelection(IEditorInput input) {
+ if(input instanceof IModelObjectEditorInput) {
+ IModelObjectEditorInput mi = (IModelObjectEditorInput)input;
+ XModelObject o = mi.getXModelObject();
+ return new StructuredSelection(o);
+ } else if(input instanceof IFileEditorInput) {
+ IFile file = ResourceUtil.getFile(input);
+ if(file == null) return null;
+ XModelObject o = EclipseResourceUtil.getObjectByResource(file);
+ if(o != null) return new StructuredSelection(o);
+ }
+ return null;
+ }
+
+}
17 years, 3 months
JBoss Tools SVN: r4096 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-10 11:02:43 -0400 (Wed, 10 Oct 2007)
New Revision: 4096
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/divLine.gif
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/tree.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java
Log:
Fix RichFaces recursiveTreeNodeAdaptor and treeNodesAdaptor templates
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/divLine.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/divLine.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/tree.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/tree.css 2007-10-10 14:09:31 UTC (rev 4095)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/tree.css 2007-10-10 15:02:43 UTC (rev 4096)
@@ -10,8 +10,8 @@
}
.dr-tree-h-ic-div {
- margin-left: 8px;
- padding-left: 14px;
+ margin-left: 10px;
+ padding-left: 12px;
}
.dr-tree-full-width {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java 2007-10-10 14:09:31 UTC (rev 4095)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java 2007-10-10 15:02:43 UTC (rev 4096)
@@ -1,105 +1,156 @@
-/*******************************************************************************
- * 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.HtmlComponentUtil;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Create template for rich:recursiveTreeNodesAdaptor element
- *
- * @author dsakovich(a)exadel.com
- *
- */
-public class RichFacesRecursiveTreeNodesAdaptorTemplate extends
- VpeAbstractTemplate {
- private final static String TREE_NODE_NAME = "treeNode";
-
- private static final String TREE_TABLE_ATR_CELLSPACING_VALUE = "0px";
-
- private static final String TREE_TABLE_ATR_CELLPADDING_VALUE = "0px";
-
- private static final String TREE_TABLE_ATR_BORDER_VALUE = "0px";
-
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- Document visualDocument) {
- Element visualElement = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- addBasicTreeNodeAttributes(visualElement);
- VpeCreationData vpeCreationData = new VpeCreationData(visualElement);
- parseTree(pageContext, sourceNode, visualDocument, vpeCreationData,
- visualElement);
- return vpeCreationData;
- }
-
- /**
- *
- * Function for parsing tree by tree nodes;
- *
- * @param pageContext
- * @param sourceNode
- * @param visualDocument
- * @return
- */
- public void parseTree(VpePageContext pageContext, Node sourceNode,
- Document visualDocument, VpeCreationData vpeCreationData,
- Element parentElement) {
- NodeList nodeList = sourceNode.getChildNodes();
- Element element = null;
- int lenght = nodeList.getLength();
- String treeNodeName = sourceNode.getPrefix() + ":" + TREE_NODE_NAME;
- VpeChildrenInfo vpeChildrenInfo = null;
- for (int i = 0; i < lenght; i++) {
- if (!(nodeList.item(i) instanceof Element)) {
- continue;
- }
- element = (Element) nodeList.item(i);
- if (element.getNodeName().equals(treeNodeName)) {
- Element tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- Element td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- tr.appendChild(td);
- vpeChildrenInfo = new VpeChildrenInfo(td);
- vpeCreationData.addChildrenInfo(vpeChildrenInfo);
- vpeChildrenInfo.addSourceChild(element);
- parentElement.appendChild(tr);
- }
- }
- }
-
- /**
- * Set attributes for treeNode
- *
- * @param table
- */
- private void addBasicTreeNodeAttributes(Element table) {
- if (table == null) {
- return;
- }
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR,
- TREE_TABLE_ATR_CELLPADDING_VALUE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR,
- TREE_TABLE_ATR_CELLSPACING_VALUE);
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR,
- TREE_TABLE_ATR_BORDER_VALUE);
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-tree-full-width");
- }
-
-}
+/*******************************************************************************
+ * 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.jsf.vpe.richfaces.RichFacesTemplatesActivator;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Create template for rich:recursiveTreeNodesAdaptor element
+ *
+ * @author dsakovich(a)exadel.com
+ *
+ */
+public class RichFacesRecursiveTreeNodesAdaptorTemplate extends
+ VpeAbstractTemplate {
+
+ private static final String TREE_NAME = "tree";
+
+ private final static String TREE_NODE_NAME = "treeNode";
+
+ public final static String TREE_NODES_ADAPTOR_NAME = "treeNodesAdaptor";
+
+ public final static String RECURSIVE_TREE_NODES_ADAPTOR_NAME = "recursiveTreeNodesAdaptor";
+
+ private static final String STYLE_PATH = "/tree/tree.css";
+
+ public static final String ICON_DIV_LINE = "/tree/divLine.gif";
+
+ private static final String ADAPTER_LINES_STYLE = "background-position: left center; background-repeat: repeat-y;";
+
+ public static final String ID_ATTR_NAME = "ID";
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ Document visualDocument) {
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "recursiveTreeNodesAdaptor");
+ Element visualElement = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ visualElement.setAttribute(ID_ATTR_NAME, RECURSIVE_TREE_NODES_ADAPTOR_NAME);
+ if (isHasParentAdapter(sourceNode)) {
+ visualElement.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-tree-h-ic-div");
+ if (getShowLinesAttr(sourceNode)) {
+ String path = RichFacesTemplatesActivator
+ .getPluginResourcePath()
+ + ICON_DIV_LINE;
+ visualElement.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ "background-image: url(file://" + path + "); "
+ + ADAPTER_LINES_STYLE);
+ }
+ }
+ VpeCreationData vpeCreationData = new VpeCreationData(visualElement);
+ parseTree(pageContext, sourceNode, visualDocument, vpeCreationData,
+ visualElement);
+ return vpeCreationData;
+ }
+
+ /**
+ *
+ * Function for parsing tree by tree nodes;
+ *
+ * @param pageContext
+ * @param sourceNode
+ * @param visualDocument
+ * @return
+ */
+ public void parseTree(VpePageContext pageContext, Node sourceNode,
+ Document visualDocument, VpeCreationData vpeCreationData,
+ Element parentElement) {
+ NodeList nodeList = sourceNode.getChildNodes();
+ Element element = null;
+ int lenght = nodeList.getLength();
+ String treeNodeName = sourceNode.getPrefix() + ":" + TREE_NODE_NAME;
+ String treeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + TREE_NODES_ADAPTOR_NAME;
+ String recursiveTreeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + RECURSIVE_TREE_NODES_ADAPTOR_NAME;
+ VpeChildrenInfo vpeChildrenInfo = null;
+ for (int i = 0; i < lenght; i++) {
+ if (!(nodeList.item(i) instanceof Element)) {
+ continue;
+ }
+ element = (Element) nodeList.item(i);
+ if (element.getNodeName().equals(treeNodeName)
+ || element.getNodeName().equals(
+ recursiveTreeNodesAdaptorName)) {
+ vpeChildrenInfo = new VpeChildrenInfo(parentElement);
+ vpeCreationData.addChildrenInfo(vpeChildrenInfo);
+ vpeChildrenInfo.addSourceChild(element);
+ } else if (element.getNodeName().equals(treeNodesAdaptorName)) {
+ vpeChildrenInfo = new VpeChildrenInfo(parentElement);
+ vpeCreationData.addChildrenInfo(vpeChildrenInfo);
+ vpeChildrenInfo.addSourceChild(element);
+ }
+ }
+ }
+
+ /**
+ *
+ * @param sourceNode
+ * @return
+ */
+ public boolean isHasParentAdapter(Node sourceNode) {
+ String treeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + TREE_NODES_ADAPTOR_NAME;
+ String recursiveTreeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + RECURSIVE_TREE_NODES_ADAPTOR_NAME;
+ Node node = sourceNode.getParentNode();
+ if (node.getNodeName().equals(treeNodesAdaptorName)
+ || node.getNodeName().equals(recursiveTreeNodesAdaptorName)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get showConnectingLines attribute
+ *
+ * @param sourceNode
+ * @return
+ */
+ private boolean getShowLinesAttr(Node sourceNode) {
+ String treeName = sourceNode.getPrefix() + ":" + TREE_NAME;
+ do {
+ sourceNode = sourceNode.getParentNode();
+ if (!(sourceNode instanceof Element)) {
+ return true;
+ }
+ } while (!sourceNode.getNodeName().equals(treeName));
+
+ String showLinesParam = ((Element) sourceNode)
+ .getAttribute(RichFacesTreeTemplate.SHOW_LINES_ATTR_NAME);
+
+ boolean showLinesValue = true;
+ if (showLinesParam != null && showLinesParam.equalsIgnoreCase("false")) {
+ showLinesValue = false;
+ }
+ return showLinesValue;
+ }
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java 2007-10-10 14:09:31 UTC (rev 4095)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java 2007-10-10 15:02:43 UTC (rev 4096)
@@ -220,9 +220,9 @@
// creates icon with status of node(collapsed or not) node
Element td1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
-
// sets icon node
- if (!isLastElement(sourceNode) && isAdaptorChild(sourceNode)) {
+ if (!isLastElement(sourceNode) && isAdaptorChild(sourceNode)
+ && !isHasNextAdaptorElement(sourceNode)) {
backgroundLinePath = RichFacesTemplatesActivator
.getPluginResourcePath()
+ ICON_LINE;
@@ -234,7 +234,28 @@
(Element) sourceNode, iconNode, NODE_ICON_ATTR_NAME,
showLinesValue == true ? ICON_NODE_WITH_LINE
: ICON_NODE_WITHOUT_LINES);
- } else if ((isAdaptorChild(sourceNode) && isLastElement(sourceNode) && isLastElementAfterAdaptor(sourceNode))
+ } else if (!isLastElement(sourceNode) && isAdaptorChild(sourceNode)
+ && isHasNextAdaptorElement(sourceNode)) {
+ backgroundLinePath = RichFacesTemplatesActivator
+ .getPluginResourcePath()
+ + ICON_LINE;
+ setAttributeForPictureNode(pageContext, visualDocument,
+ (Element) sourceNode, td1, NODE_ICON_EXPANDED_ATTR_NAME,
+ showLinesValue == true ? ICON_EXPANDED_ADAPTER_WITH_LINES
+ : ICON_EXPANDED_ADAPTER_WITHOUT_LINES);
+ setAttributeForPictureNode(pageContext, visualDocument,
+ (Element) sourceNode, iconNode, NODE_ICON_ATTR_NAME,
+ showLinesValue == true ? ICON_NODE_WITH_LINES
+ : ICON_NODE_WITHOUT_LINES);
+ if (showLinesValue) {
+ String path = RichFacesTemplatesActivator
+ .getPluginResourcePath()
+ + ICON_LEFT_LINE;
+ iconNode.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ "background-image: url(file://" + path + "); "
+ + NODE_LINES_STYLE);
+ }
+ } else if ((isAdaptorChild(sourceNode) && isLastElement(sourceNode) && (isAdaptorInTree(sourceNode) == isLastElementAfterAdaptor(sourceNode)))
|| (!isAdaptorChild(sourceNode) && isLastElement(sourceNode))) {
backgroundLinePath = RichFacesTemplatesActivator
.getPluginResourcePath()
@@ -311,8 +332,8 @@
Document visualDocument, Node visualNode, Object data, String name,
String value) {
/*
- * processed only next attributes iconExpanded and icon, becouse tree
- * allways shows as expanded and information is it leaf or not contains
+ * processed only next attributes iconExpanded and icon, because tree
+ * always shows as expanded and information is it leaf or not contains
* in model
*/
if (NODE_ICON_EXPANDED_ATTR_NAME.equalsIgnoreCase(name)) {
@@ -344,8 +365,8 @@
Element sourceElement, Document visualDocument, Node visualNode,
Object data, String name) {
/*
- * processed only next attributes iconExpanded and icon, becouse tree
- * allways shows as expanded and information is it leaf or not contains
+ * processed only next attributes iconExpanded and icon, because tree
+ * always shows as expanded and information is it leaf or not contains
* in model
*/
@@ -402,6 +423,7 @@
}
/**
+ * Node is Adaptor child
*
* @param sourceNode
* @return
@@ -425,6 +447,7 @@
}
/**
+ * Node is last element
*
* @param parentTree
* @param sourceNode
@@ -456,6 +479,45 @@
}
/**
+ * Next element is Adaptor
+ *
+ * @param sourceNode
+ * @return
+ */
+ private boolean isHasNextAdaptorElement(Node sourceNode) {
+ Node parentTree = sourceNode.getParentNode();
+ if (!(parentTree instanceof Element)) {
+ return true;
+ }
+ NodeList childs = parentTree.getChildNodes();
+ String treeNodesAdaptorName = parentTree.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_NODES_ADAPTOR;
+ String treeRecursiveNodesAdaptorName = parentTree.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_RECURSIVE_NODES_ADAPTOR;
+ Node lastElement = null;
+ Node el = null;
+
+ for (int i = 0; i < childs.getLength(); i++) {
+ el = childs.item(i);
+ if (!(el instanceof Element)) {
+ continue;
+ }
+
+ if (lastElement != null) {
+ break;
+ }
+ if (el.equals(sourceNode)) {
+ lastElement = el;
+ }
+ }
+ if (el.getNodeName().equals(treeNodesAdaptorName)
+ || el.getNodeName().equals(treeRecursiveNodesAdaptorName)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
* Adds basic attributes to tree
*
* @param img
@@ -511,6 +573,7 @@
}
/**
+ * Node has element after adaptor
*
* @param sourceNode
* @return
@@ -522,4 +585,30 @@
}
return isLastElement(nodeAdaptor);
}
+
+ /**
+ *
+ * @param sourceNode
+ * @return
+ */
+ private boolean isAdaptorInTree(Node sourceNode) {
+ Node adaptorNode = sourceNode.getParentNode();
+ if (!(adaptorNode instanceof Element)) {
+ return true;
+ }
+ String treeNodesAdaptorName = adaptorNode.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_NODES_ADAPTOR;
+ String treeRecursiveNodesAdaptorName = adaptorNode.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_RECURSIVE_NODES_ADAPTOR;
+ if (adaptorNode.getNodeName().equals(treeNodesAdaptorName)
+ || adaptorNode.getNodeName().equals(
+ treeRecursiveNodesAdaptorName)) {
+ Node treeNode = adaptorNode.getParentNode();
+ String treeName = treeNode.getPrefix() + ":" + TREE_NAME;
+ if (treeNode.getNodeName().equals(treeName)) {
+ return true;
+ }
+ }
+ return false;
+ }
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java 2007-10-10 14:09:31 UTC (rev 4095)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java 2007-10-10 15:02:43 UTC (rev 4096)
@@ -10,7 +10,9 @@
******************************************************************************/
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.jsf.vpe.richfaces.RichFacesTemplatesActivator;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
@@ -28,19 +30,40 @@
*/
public class RichFacesTreeNodesAdaptorTemplate extends VpeAbstractTemplate {
+ private static final String TREE_NAME = "tree";
+
private final static String TREE_NODE_NAME = "treeNode";
- private static final String TREE_TABLE_ATR_CELLSPACING_VALUE = "0px";
+ public final static String TREE_NODES_ADAPTOR_NAME = "treeNodesAdaptor";
- private static final String TREE_TABLE_ATR_CELLPADDING_VALUE = "0px";
+ public final static String RECURSIVE_TREE_NODES_ADAPTOR_NAME = "recursiveTreeNodesAdaptor";
- private static final String TREE_TABLE_ATR_BORDER_VALUE = "0px";
+ private static final String STYLE_PATH = "/tree/tree.css";
+ public static final String ICON_DIV_LINE = "/tree/divLine.gif";
+
+ private static final String ADAPTER_LINES_STYLE = "background-position: left center; background-repeat: repeat-y;";
+
+ public static final String ID_ATTR_NAME = "ID";
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
Document visualDocument) {
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "treeNodesAdaptor");
Element visualElement = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- addBasicTreeNodeAttributes(visualElement);
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ visualElement.setAttribute(ID_ATTR_NAME, TREE_NODES_ADAPTOR_NAME);
+ if (isHasParentAdapter(sourceNode)) {
+ visualElement.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-tree-h-ic-div");
+ if (getShowLinesAttr(sourceNode)) {
+ String path = RichFacesTemplatesActivator
+ .getPluginResourcePath()
+ + ICON_DIV_LINE;
+ visualElement.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ "background-image: url(file://" + path + "); "
+ + ADAPTER_LINES_STYLE);
+ }
+ }
VpeCreationData vpeCreationData = new VpeCreationData(visualElement);
parseTree(pageContext, sourceNode, visualDocument, vpeCreationData,
visualElement);
@@ -63,42 +86,70 @@
Element element = null;
int lenght = nodeList.getLength();
String treeNodeName = sourceNode.getPrefix() + ":" + TREE_NODE_NAME;
+ String treeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + TREE_NODES_ADAPTOR_NAME;
+ String recursiveTreeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + RECURSIVE_TREE_NODES_ADAPTOR_NAME;
VpeChildrenInfo vpeChildrenInfo = null;
for (int i = 0; i < lenght; i++) {
if (!(nodeList.item(i) instanceof Element)) {
continue;
}
element = (Element) nodeList.item(i);
- if (element.getNodeName().equals(treeNodeName)) {
- Element tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- Element td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- tr.appendChild(td);
- vpeChildrenInfo = new VpeChildrenInfo(td);
+ if (element.getNodeName().equals(treeNodeName)
+ || element.getNodeName().equals(
+ recursiveTreeNodesAdaptorName)) {
+ vpeChildrenInfo = new VpeChildrenInfo(parentElement);
vpeCreationData.addChildrenInfo(vpeChildrenInfo);
vpeChildrenInfo.addSourceChild(element);
- parentElement.appendChild(tr);
+ } else if (element.getNodeName().equals(treeNodesAdaptorName)) {
+ vpeChildrenInfo = new VpeChildrenInfo(parentElement);
+ vpeCreationData.addChildrenInfo(vpeChildrenInfo);
+ vpeChildrenInfo.addSourceChild(element);
}
}
}
/**
- * Set attributes for treeNode
*
- * @param table
+ * @param sourceNode
+ * @return
*/
- private void addBasicTreeNodeAttributes(Element table) {
- if (table == null) {
- return;
+ public boolean isHasParentAdapter(Node sourceNode) {
+ String treeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + TREE_NODES_ADAPTOR_NAME;
+ String recursiveTreeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + RECURSIVE_TREE_NODES_ADAPTOR_NAME;
+ Node node = sourceNode.getParentNode();
+ if (node.getNodeName().equals(treeNodesAdaptorName)
+ || node.getNodeName().equals(recursiveTreeNodesAdaptorName)) {
+ return true;
}
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR,
- TREE_TABLE_ATR_CELLPADDING_VALUE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR,
- TREE_TABLE_ATR_CELLSPACING_VALUE);
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR,
- TREE_TABLE_ATR_BORDER_VALUE);
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-tree-full-width");
+ return false;
}
+
+ /**
+ * Get showConnectingLines attribute
+ *
+ * @param sourceNode
+ * @return
+ */
+ private boolean getShowLinesAttr(Node sourceNode) {
+ String treeName = sourceNode.getPrefix() + ":" + TREE_NAME;
+ do {
+ sourceNode = sourceNode.getParentNode();
+ if (!(sourceNode instanceof Element)) {
+ return true;
+ }
+ } while (!sourceNode.getNodeName().equals(treeName));
+
+ String showLinesParam = ((Element) sourceNode)
+ .getAttribute(RichFacesTreeTemplate.SHOW_LINES_ATTR_NAME);
+
+ boolean showLinesValue = true;
+ if (showLinesParam != null && showLinesParam.equalsIgnoreCase("false")) {
+ showLinesValue = false;
+ }
+ return showLinesValue;
+ }
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java 2007-10-10 14:09:31 UTC (rev 4095)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java 2007-10-10 15:02:43 UTC (rev 4096)
@@ -178,8 +178,14 @@
return;
}
NodeList list = node.getChildNodes();
+ Element element = (Element) node;
+ String id = element
+ .getAttribute(RichFacesTreeNodesAdaptorTemplate.ID_ATTR_NAME);
if (node.getNodeName().equalsIgnoreCase(HtmlComponentUtil.HTML_TAG_DIV)
- && list.getLength() == 2) {
+ && list.getLength() == 2
+ && !(id
+ .equalsIgnoreCase(RichFacesTreeNodesAdaptorTemplate.TREE_NODES_ADAPTOR_NAME) || id
+ .equalsIgnoreCase(RichFacesTreeNodesAdaptorTemplate.RECURSIVE_TREE_NODES_ADAPTOR_NAME))) {
Node table1 = list.item(0);
Node table2 = list.item(1);
node.removeChild(table1);
17 years, 3 months
JBoss Tools SVN: r4095 - 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: svasilyev
Date: 2007-10-10 10:09:31 -0400 (Wed, 10 Oct 2007)
New Revision: 4095
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.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/VpeSelectionBuilder.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/VpeVisualKeyHandler.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1034
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java 2007-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -10,27 +10,52 @@
******************************************************************************/
package org.jboss.tools.vpe;
+import org.eclipse.core.runtime.Platform;
+
public class VpeDebug {
- public static final boolean printSourceMutationEvent = false;
- public static final boolean printSourceSelectionEvent = false;
- public static final boolean printSourceModelLifecycleEvent = false;
+ public static final boolean PRINT_SOURCE_MUTATION_EVENT;
+ public static final boolean PRINT_SOURCE_SELECTION_EVENT;
+ public static final boolean PRINT_SOURCE_MODEL_LIFECYCLE_EVENT;
- public static final boolean printVisualMutationEvent = false;
- public static final boolean printVisualSelectionEvent = false;
- public static final boolean printVisualContextMenuEvent = false;
- public static final boolean printVisualMouseEvent = false;
- public static final boolean printVisualDragDropEvent = false;
- public static final boolean printVisualKeyEvent = false;
- public static final boolean printVisualInnerDragDropEvent = false;
+ public static final boolean PRINT_VISUAL_MUTATION_EVENT;
+ public static final boolean PRINT_VISUAL_SELECTION_EVENT;
+ public static final boolean PRINT_VISUAL_CONTEXTMENU_EVENT;
+ public static final boolean PRINT_VISUAL_MOUSE_EVENT;
+ public static final boolean PRINT_VISUAL_DRAGDROP_EVENT;
+ public static final boolean PRINT_VISUAL_KEY_EVENT;
+ public static final boolean PRINT_VISUAL_INNER_DRAGDROP_EVENT;
- public static final boolean visualAddPseudoElement = false;
+ public static final boolean VISUAL_ADD_PSEUDO_ELEMENT;
- public static final boolean visualContextMenuDumpSource = false;
- public static final boolean visualContextMenuDumpMapping = false;
+ public static final boolean VISUAL_CONTEXTMENU_DUMP_SOURCE;
+ public static final boolean VISUAL_CONTEXTMENU_DUMP_MAPPING;
- public static final boolean visualContextMenuTest = false;
+ public static final boolean VISUAL_CONTEXTMENU_TEST;
// usePrintStackTrace = false - The exception is sent on our site
// usePrintStackTrace = true - The exception is printed through printStackTrace
- public static final boolean usePrintStackTrace = false;
+ public static final boolean USE_PRINT_STACK_TRACE;
+
+ static {
+ PRINT_SOURCE_MUTATION_EVENT = "true".equals(Platform.getDebugOption("/debug/source/mutation_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_SOURCE_SELECTION_EVENT = "true".equals(Platform.getDebugOption("/debug/source/selection_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_SOURCE_MODEL_LIFECYCLE_EVENT = "true".equals(Platform.getDebugOption("/debug/source/model_lifecycle_event")); // $NON-NSL-1$ // $NON-NSL-1$
+
+ PRINT_VISUAL_MUTATION_EVENT = "true".equals(Platform.getDebugOption("/debug/visual/mutation_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_SELECTION_EVENT = "true".equals(Platform.getDebugOption("/debug/visual/selection_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_CONTEXTMENU_EVENT = "true".equals(Platform.getDebugOption("/debug/visual/contextmenu_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_MOUSE_EVENT = "true".equals(Platform.getDebugOption("/debug/visual/mouse_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_DRAGDROP_EVENT = "true".equals(Platform.getDebugOption("/debug/visual/dragdrop_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_KEY_EVENT = "true".equals(Platform.getDebugOption("/debug/visual/key_event")); // $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_INNER_DRAGDROP_EVENT = "true".equals(Platform.getDebugOption("/debug/visual/inner_dragdrop_event")); // $NON-NSL-1$ // $NON-NSL-1$
+
+ VISUAL_ADD_PSEUDO_ELEMENT = "true".equals(Platform.getDebugOption("/debug/visual/add_pseudo_element")); // $NON-NSL-1$ // $NON-NSL-1$
+
+ VISUAL_CONTEXTMENU_DUMP_SOURCE = "true".equals(Platform.getDebugOption("/debug/visual/contextmenu/dump_source")); // $NON-NSL-1$ // $NON-NSL-1$
+ VISUAL_CONTEXTMENU_DUMP_MAPPING = "true".equals(Platform.getDebugOption("/debug/visual/contextmenu/dump_mapping")); // $NON-NSL-1$ // $NON-NSL-1$
+
+ VISUAL_CONTEXTMENU_TEST = "true".equals(Platform.getDebugOption("/debug/visual/contextmenu/show_test")); // $NON-NSL-1$ // $NON-NSL-1$
+
+ USE_PRINT_STACK_TRACE = "true".equals(Platform.getDebugOption("/debug/use_PrintStackTrace")); // $NON-NSL-1$ // $NON-NSL-1$
+ }
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2007-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -95,7 +95,7 @@
// }
public static void reportProblem(Exception throwable) {
- if (VpeDebug.usePrintStackTrace) {
+ if (VpeDebug.USE_PRINT_STACK_TRACE) {
throwable.printStackTrace();
} else {
ProblemReportingHelper.reportProblem(PLUGIN_ID, throwable);
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-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -327,7 +327,7 @@
// if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
// return;
// }
- if (VpeDebug.printSourceMutationEvent) {
+ if (VpeDebug.PRINT_SOURCE_MUTATION_EVENT) {
printSourceEvent(notifier, eventType, feature, oldValue, newValue, pos);
}
if(visualBuilder==null) {
@@ -416,7 +416,7 @@
List<?> nodes = event.getSelectedNodes();
if (nodes != null && nodes.size() > 0) {
Node sourceNode = (Node)nodes.get(0);
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>> nodeSelectionChanged sourceNode: " + sourceNode.getNodeName() + " " + event.getCaretPosition()); //$NON-NLS-1$ //$NON-NLS-2$
}
if (event.getSource() instanceof IContentOutlinePage) {
@@ -432,7 +432,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>> textSelectionChanged " + event.getSource()); //$NON-NLS-1$
}
// if (event.getSource() instanceof StyledText) {
@@ -446,7 +446,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>> widgetSelected"); //$NON-NLS-1$
}
if (event.getSource() instanceof StyledText) {
@@ -456,7 +456,7 @@
}
public void widgetDefaultSelected(SelectionEvent event) {
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>> widgetDefaultSelected"); //$NON-NLS-1$
}
}
@@ -490,7 +490,7 @@
anchorOffset = focusOffset;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println("sourceSelectionChanged"); //$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$
@@ -556,7 +556,7 @@
anchorOffset = focusOffset;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ 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$
@@ -603,7 +603,7 @@
return;
}
if (event.getType() == ModelLifecycleEvent.MODEL_RELEASED) {
- if (VpeDebug.printSourceModelLifecycleEvent) {
+ if (VpeDebug.PRINT_SOURCE_MODEL_LIFECYCLE_EVENT) {
System.out.println(">>> processPostModelEvent: " + event.toString()); //$NON-NLS-1$
}
visualBuilder.setSelectionRectangle(null);
@@ -626,7 +626,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -636,7 +636,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
nsIDOMNode targetNode = mutationEvent.getRelatedNode();
@@ -651,7 +651,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
nsIDOMNode targetNode = VisualDomUtil.getTargetNode(mutationEvent);
@@ -667,7 +667,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -677,7 +677,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -687,7 +687,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -698,7 +698,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
nsIDOMNode targetNode = VisualDomUtil.getTargetNode(mutationEvent);
@@ -711,7 +711,7 @@
if (switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
mouseUpSelectionReasonFlag = (reason & nsISelectionListener.MOUSEUP_REASON) > 0;
if (mouseUpSelectionReasonFlag || reason == nsISelectionListener.NO_REASON || reason == nsISelectionListener.KEYPRESS_REASON || reason == nsISelectionListener.SELECTALL_REASON || (reason & nsISelectionListener.MOUSEDOWN_REASON) > 0) {
- if (VpeDebug.printVisualSelectionEvent) {
+ if (VpeDebug.PRINT_VISUAL_SELECTION_EVENT) {
System.out.println("<<< notifySelectionChanged: " + reason); //$NON-NLS-1$
}
selectionBuilder.setSelection(selection);
@@ -739,7 +739,7 @@
return;
}
nsIDOMElement visualDragElement = selectionBuilder.getDragElement(mouseEvent);
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
nsIDOMNode visualNode = VisualDomUtil.getTargetNode(mouseEvent);
System.out.println("<<< mouseDown targetNode: " + visualNode.getNodeName() + " (" + visualNode + ") selectedElement: " + (visualDragElement != null ? visualDragElement.getNodeName() + " (" + visualDragElement + ")" : null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
@@ -757,7 +757,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseUp"); //$NON-NLS-1$
}
if (mouseDownSelectionFlag) {
@@ -776,7 +776,7 @@
nsIDOMNode visualNode = VisualDomUtil.getTargetNode(mouseEvent);
if (visualNode != null) {
if (!mouseUpSelectionReasonFlag) {
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseClick visualNode: " + visualNode.getNodeName() + " (" + visualNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (visualBuilder.isContentArea(visualNode)) {
@@ -805,7 +805,7 @@
if (!sourceBuilder.openBundleEditors(visualNode)) {
sourceBuilder.openIncludeEditor(visualNode);
}
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseDblClick visualNode: " + visualNode.getNodeName() + " (" + visualNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -818,7 +818,7 @@
}
nsIDOMNode visualNode = VisualDomUtil.getTargetNode(mouseEvent);
if (visualNode != null) {
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseMove visualNode: " + visualNode.getNodeName() + " (" + visualNode + ")");
}
visualBuilder.setMoveCursor(mouseEvent);
@@ -827,7 +827,7 @@
}
public void keyPress(nsIDOMKeyEvent keyEvent) {
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println("<<< keyPress type: " + keyEvent.getType() + " Ctrl: " + keyEvent.getCtrlKey() + " Shift: " + keyEvent.getShiftKey() + " CharCode: " + keyEvent.getCharCode() + " KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
@@ -1054,7 +1054,7 @@
});
}
- if (VpeDebug.visualContextMenuDumpSource) {
+ if (VpeDebug.VISUAL_CONTEXTMENU_DUMP_SOURCE) {
manager.add(new Action("Dump Source") { //$NON-NLS-1$
public void run() {
DOMTreeDumper dumper = new DOMTreeDumper();
@@ -1063,7 +1063,7 @@
});
}
- if (VpeDebug.visualContextMenuDumpMapping) {
+ if (VpeDebug.VISUAL_CONTEXTMENU_DUMP_MAPPING) {
manager.add(new Action("Dump Mapping") { //$NON-NLS-1$
public void run() {
printMapping();
@@ -1071,7 +1071,7 @@
});
}
- if (VpeDebug.visualContextMenuTest) {
+ if (VpeDebug.VISUAL_CONTEXTMENU_TEST) {
manager.add(new VpeAction("Test", node) { //$NON-NLS-1$
public void run() {
test(actionNode);
@@ -1729,13 +1729,13 @@
}
public void dragEnter(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<< DragEnter"); //$NON-NLS-1$
}
}
public void dragExit(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<< dragExit"); //$NON-NLS-1$
}
// TODO Sergey Vasilyev figure out with drag caret
@@ -1752,7 +1752,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<< dragOver"); //$NON-NLS-1$
}
@@ -1783,14 +1783,14 @@
}
public void drop(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<< outerDrop"); //$NON-NLS-1$
}
event.preventDefault();
}
public void _drop(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<< dragDrop"); //$NON-NLS-1$
}
boolean canDrop = !xulRunnerEditor.isMozillaDragFlavor();
@@ -1808,7 +1808,7 @@
caretInfo.showCaret();
caretInfo.hideCaret();
Point range = caretInfo.getSourceSelectionRange();
- if (VpeDebug.printVisualDragDropEvent) {
+ 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));
@@ -1824,7 +1824,7 @@
public boolean canInnerDrag(nsIDOMMouseEvent event) {
onHideTooltip();
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print("<<<<<< canInnerDrag"); //$NON-NLS-1$
}
if (innerDragInfo != null) {
@@ -1835,7 +1835,7 @@
VpeVisualInnerDragInfo dragInfo = selectionBuilder.getInnerDragInfo(event);
if (dragInfo != null) {
nsIDOMNode dragNode = dragInfo.getNode();
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print(" dragNode: " + dragNode.getNodeName() + "(" + dragNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
switch (dragNode.getNodeType()) {
@@ -1862,7 +1862,7 @@
dragInfo.Release();
}
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" canDrag: " + canDrag); //$NON-NLS-1$
}
return canDrag;
@@ -1893,7 +1893,7 @@
return null;
}
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print("<<<<<< canInnerDrop"); //$NON-NLS-1$
}
boolean canDrop = false;;
@@ -1902,7 +1902,7 @@
if (innerDragInfo != null) {
VpeVisualInnerDropInfo visualDropInfo = selectionBuilder.getInnerDropInfo(event);
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print(" x: " + visualDropInfo.getMouseX() + " y: " + visualDropInfo.getMouseY() + //$NON-NLS-1$ //$NON-NLS-2$
" container: " + visualDropInfo.getDropContainer().getNodeName() + //$NON-NLS-1$
"(" + visualDropInfo.getDropContainer() + ")" + //$NON-NLS-1$ //$NON-NLS-2$
@@ -1924,7 +1924,7 @@
}
visualDropInfo.Release();
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" canDrop: " + canDrop); //$NON-NLS-1$
}
return new MozillaDropInfo(canDrop, caretParent, caretOffset);
@@ -1933,13 +1933,13 @@
public void innerDrop(nsIDOMMouseEvent event) {
onHideTooltip();
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print("<<<<<< innerDrop"); //$NON-NLS-1$
}
if (innerDragInfo != null) {
VpeVisualInnerDropInfo visualDropInfo = selectionBuilder.getInnerDropInfo(event);
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print(" container: " + visualDropInfo.getDropContainer().getNodeName() + //$NON-NLS-1$
"(" + visualDropInfo.getDropContainer() + ")" + //$NON-NLS-1$ //$NON-NLS-2$
" offset: " + visualDropInfo.getDropOffset()); //$NON-NLS-1$
@@ -1962,7 +1962,7 @@
}
}
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println();
}
}
@@ -2040,7 +2040,7 @@
VpePlugin.reportProblem(ex);
}
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" canDrop: " + canDrop + (canDrop ? " container: " + caretParent.getNodeName() + " offset: " + caretOffset : "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
return new MozillaDropInfo(canDrop, caretParent, caretOffset);
@@ -2116,7 +2116,7 @@
}
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" drop! container: " + visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
}
externalDropAny(flavor, data, range, sourceDropInfo == null?null:sourceDropInfo.getContainer());
@@ -2299,7 +2299,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>> selectionChanged " + event.getSource()); //$NON-NLS-1$
}
sourceSelectionChanged();
@@ -2325,7 +2325,7 @@
}
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" drop! container: " + visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
}
final String finalFlavor = flavor;
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -83,7 +83,7 @@
if (visualSelectedNode == null) {
visualSelectedNode = visualNode;
}
- if (VpeDebug.printVisualSelectionEvent) {
+ if (VpeDebug.PRINT_VISUAL_SELECTION_EVENT) {
System.out.println(" visualNode: " + visualSelectedNode.getNodeName() + "(" + visualSelectedNode + ") sourceNode: " + (sourceNode == null ? null : sourceNode.getNodeName()) + " node: " + node);
}
if (sourceNode != null) {
@@ -335,7 +335,7 @@
}
Node setContextMenuSelection(nsIDOMNode visualNode) {
- if (VpeDebug.printVisualContextMenuEvent) {
+ if (VpeDebug.PRINT_VISUAL_CONTEXTMENU_EVENT) {
System.out.println(">>>>>>>>>>>>>> onShowContextMenu visualNode: " + visualNode.getNodeName() + "(" + visualNode + ")");
}
visualSelectionController.setCaretEnabled(false);
@@ -647,7 +647,7 @@
visualAnchorOffset = VisualDomUtil.getOffset(visualAnchorNode);
if (!anchorStartFlag) visualAnchorOffset++;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println("setVisualSelection");
System.out.println(" visualAnchorNode: " + visualAnchorNode.getNodeName() + "(" + visualAnchorNode + ") visualAnchorContainer: " + visualAnchorContainer.getNodeName() + "(" + visualAnchorContainer + ") visualAnchorOffset: " + visualAnchorOffset + " anchorStartFlag: " + anchorStartFlag);
}
@@ -689,7 +689,7 @@
visualFocusOffset = VisualDomUtil.getOffset(visualFocusNode);
if (!focusStartFlag) visualFocusOffset++;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(" visualFocusNode: " +
(visualFocusNode != null ?
visualFocusNode.getNodeName() + "(" + visualFocusNode + ")" : null) +
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-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -652,7 +652,7 @@
private void addPseudoElementImpl(nsIDOMNode visualParent) {
if (!templateManager.isWithoutPseudoElementContainer(visualParent
.getNodeName())) {
- if (VpeDebug.visualAddPseudoElement) {
+ if (VpeDebug.VISUAL_ADD_PSEUDO_ELEMENT) {
System.out.println("-------------------- addPseudoElement: "
+ visualParent.getNodeName());
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -96,7 +96,7 @@
} else {
handled = nonctrlKeyPressHandler(keyEvent);
}
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println(" handled: " + handled);
}
if (handled) {
@@ -255,7 +255,7 @@
}
Node focusNode = selection.getFocusNode();
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println(">>> 1. VpeVisualKeyHandler.deleteRight(): focusNode = " + focusNode + " | focusOffset = " + selection.getFocusOffset());
}
if (focusNode != null) {
@@ -523,7 +523,7 @@
}
Node focusNode = selection.getFocusNode();
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println(">>> 1. VpeVisualKeyHandler.deleteLeft(): focusNode = " + focusNode + " | focusOffset = " + selection.getFocusOffset());
}
if (focusNode != null) {
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2007-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -367,7 +367,7 @@
List newTaglibs = getTagLibs();
List delTaglibs = new ArrayList();
if (buildTaglibsDifferences(newTaglibs, delTaglibs)) {
- if (VpeDebug.printSourceMutationEvent) {
+ if (VpeDebug.PRINT_SOURCE_MUTATION_EVENT) {
System.out.println(">>> TaglibsChanged");
}
for (int i = 0; i < taglibListeners.length; i++) {
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java 2007-10-10 14:00:39 UTC (rev 4094)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java 2007-10-10 14:09:31 UTC (rev 4095)
@@ -17,7 +17,6 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilder;
-import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -113,7 +112,7 @@
public void setAttribute(VpePageContext pageContext, Element sourceElement,
Map visualNodeMap, String name, String value) {
if (isAttribute(name)) {
- Element visualElement = (Element) visualNodeMap.get(this);
+ nsIDOMElement visualElement = (nsIDOMElement) visualNodeMap.get(this);
visualElement.setAttribute(name, value);
}
}
17 years, 3 months
JBoss Tools SVN: r4094 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-10-10 10:00:39 -0400 (Wed, 10 Oct 2007)
New Revision: 4094
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newprojectjsp20.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-160 minor changes
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newprojectjsp20.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newprojectjsp20.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml 2007-10-10 13:02:31 UTC (rev 4093)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml 2007-10-10 14:00:39 UTC (rev 4094)
@@ -206,7 +206,7 @@
<section id="AutoRedeploy">
<?dbhtml filename="AutoRedeploy.html"?>
<title>Auto redeploy</title>
- <para>TO BE DONE</para>
+ <para>When you are creating a web application and register it on JBoss server it is automatically deployed into <emphasis>/deploy</emphasis> directory of the server. RHDS comes with the feature of auto-redeploy. It means that you don't need to restart JBoss. Any changes made in the application in exploded format will trigger a redeployment on the server.</para>
</section>
</section>
@@ -263,7 +263,7 @@
<title>Running project</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/default.png"/>
+ <imagedata fileref="images/newprojectjsp20.png"/>
</imageobject>
</mediaobject>
</figure>
17 years, 3 months