JBoss Tools SVN: r17160 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-08-19 09:32:30 -0400 (Wed, 19 Aug 2009)
New Revision: 17160
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
Log:
issue JBIDE-4416: Modify templates for ui:composition and ui:define
https://jira.jboss.org/jira/browse/JBIDE-4416
- part #2 has been fixed: now if the web-root folder is not found, it is assumed that the root folder is the parent folder of the opened file.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java 2009-08-19 12:51:09 UTC (rev 17159)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java 2009-08-19 13:32:30 UTC (rev 17160)
@@ -24,6 +24,7 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.VpeIncludeInfo;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.custom.VpeCustomStringStorage;
import org.jboss.tools.vpe.editor.util.FileUtil;
@@ -130,12 +131,14 @@
IEditorInput input = pageContext.getEditPart().getEditorInput();
IFile file = null;
- if(pageContext.getVisualBuilder().getCurrentIncludeInfo()==null
- || !(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {
+ VpeIncludeInfo currentIncludeInfo
+ = pageContext.getVisualBuilder().getCurrentIncludeInfo();
+ if(currentIncludeInfo==null
+ || !(currentIncludeInfo.getStorage() instanceof IFile)) {
file = FileUtil.getFile(input, fileName);
} else {
IFile includedFile =
- (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage();
+ (IFile) currentIncludeInfo.getStorage();
file = FileUtil.getFile(fileName, includedFile);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2009-08-19 12:51:09 UTC (rev 17159)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2009-08-19 13:32:30 UTC (rev 17160)
@@ -95,14 +95,18 @@
// .getWebArtifactEditForRead(includeFile.getProject());
IVirtualComponent com = ComponentCore
.createComponent(includeFile.getProject());
- if (com == null) {
- return null;
+ if (com != null) {
+ IVirtualFolder webRootFolder = com.getRootFolder().getFolder(
+ new Path("/")); //$NON-NLS-1$
+ IContainer folder = webRootFolder.getUnderlyingFolder();
+ IPath path = folder.getFullPath().append(fileName);
+ file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ } else {
+ /* Yahor Radtsevich (yradtsevich):
+ * Fix of JBIDE-4416: assume that the parent directory
+ * of the opened file is the web-root directory */
+ file = resolveRelatedPath(includeFile, fileName);
}
- IVirtualFolder webRootFolder = com.getRootFolder().getFolder(
- new Path("/")); //$NON-NLS-1$
- IContainer folder = webRootFolder.getUnderlyingFolder();
- IPath path = folder.getFullPath().append(fileName);
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
}
} else {
ResourceReference[] resources = RelativeFolderReferenceList
@@ -114,15 +118,24 @@
return ResourcesPlugin.getWorkspace().getRoot()
.getFileForLocation(path);
} else {
- IPath currentFolder = includeFile.getParent().getFullPath();
- IPath path = currentFolder.append(fileName);
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ file = resolveRelatedPath(includeFile, fileName);
}
}
return file;
}
-
+
/**
+ * Appends {@code relatedFilePath} to the parent directory of
+ * {@code baseFile}.
+ */
+ private static IFile resolveRelatedPath(IFile baseFile,
+ String relatedFilePath) {
+ IPath currentFolder = baseFile.getParent().getFullPath();
+ IPath path = currentFolder.append(relatedFilePath);
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ }
+
+ /**
* open editor
* @param file
*/
16 years, 4 months
JBoss Tools SVN: r17159 - trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-08-19 08:51:09 -0400 (Wed, 19 Aug 2009)
New Revision: 17159
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4788, validation listener for EL value field was added.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java 2009-08-19 12:45:45 UTC (rev 17158)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java 2009-08-19 12:51:09 UTC (rev 17159)
@@ -77,6 +77,8 @@
gd = new GridData(SWT.FILL, SWT.NONE, true, false);
elValue.setLayoutData(gd);
elValue.setText(elValueStr);
+ elValue.addListener(SWT.Selection, this);
+ elValue.addListener(SWT.Modify, this);
/*
* Dialog's control should be initialized.
16 years, 4 months
JBoss Tools SVN: r17158 - in trunk/vpe/plugins/org.jboss.tools.vpe/resources: meta and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-08-19 08:45:45 -0400 (Wed, 19 Aug 2009)
New Revision: 17158
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-4789, vpe.meta is still needed to create global EL variable dialog.
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta (from rev 17153, trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta)
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2009-08-19 09:52:48 UTC (rev 17153)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2009-08-19 12:45:45 UTC (rev 17158)
@@ -1,483 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE XModelEntityGroup PUBLIC "-//Red Hat, Inc.//DTD Meta 1.0//EN" "meta.dtd">
-<XModelEntityGroup>
- <VERSION MODULE="VPE" VERSION="1.0"/>
- <MAPPINGS/>
- <ICONS/>
- <GlobalActions kind="list"/>
- <XModelEntity ImplementingClass="%Regular%" name="VPECSSReference">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="FileFilter">
- <value name="allFiles=false"/>
- <value name="description=*.css files"/>
- <value name="mode=FILES_ONLY"/>
- <value name="extensions=css"/>
- </Constraint>
- <Editor name="FileChooser"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page: Only This Page"/>
- <value name="Folder: Any Page at the Same Folder"/>
- <value name="Project: Any Page at the Same Project"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceAddItem"
- displayName="Add CSS Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPECSSReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceEditItem"
- displayName="Edit CSS Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPECSSReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
- <XModelEntity ImplementingClass="%Regular%" name="VPECSSReferenceExt">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="FileFilter">
- <value name="allFiles=false"/>
- <value name="description=*.css files"/>
- <value name="mode=FILES_ONLY"/>
- <value name="extensions=css"/>
- </Constraint>
- <Editor name="FileChooser"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page: Only This Page"/>
- <value name="Folder: Any Page at the Same Folder"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceAddItem"
- displayName="Add CSS Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPECSSReferenceExt">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceEditItem"
- displayName="Edit CSS Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPECSSReferenceExt">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
-
- <!-- Added by estherbin //JBIDE-2010 -->
- <XModelEntity ImplementingClass="%Regular%" name="VPEElReference">
-
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint/>
- <Editor/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page: Only This Page"/>
- <value name="Folder: Any Page at the Same Folder"/>
- <value name="Project: Any Page at the Same Project"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- <XModelAttribute name="prefix">
- <Constraint/>
- <Editor/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
- key=VPEElReferenceAddItem"
- displayName="Add El Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPEElReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
- key=VPEElReferenceEditItem"
- displayName="Edit El Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPEElReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
-
-
- <!-- Added by estherbin https://jira.jboss.org/jira/browse/JBIDE-2594 -->
- <XModelEntity ImplementingClass="%Regular%" name="VPEGlobalElReference">
-
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint/>
- <Editor/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Global: For all projects in workspace"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- <XModelAttribute name="prefix">
- <Constraint/>
- <Editor/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
- key=VPEGlobalElReferenceAddItem"
- displayName="Add El Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPEGlobalElReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
- key=VPEGlobalElReferenceEditItem"
- displayName="Edit El Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPEGlobalElReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
-
-
- <XModelEntity ImplementingClass="%Regular%" name="VPEFolderReference">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="FileFilter">
- <value name="allFiles=false"/>
- <value name="description=*.css files"/>
- <value name="mode=FOLDERS_ONLY"/>
- </Constraint>
- <Editor name="FolderChooser"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page"/>
- <value name="Folder"/>
- <value name="Project"/>
- </Constraint>
- <Editor name="List"/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list"/>
- <XDependencies/>
- </XModelEntity>
- <XModelEntity ImplementingClass="%Regular%" name="VPEFolderReferenceExt">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="FileFilter">
- <value name="allFiles=false"/>
- <value name="description=*.css files"/>
- <value name="mode=FOLDERS_ONLY"/>
- </Constraint>
- <Editor name="FolderChooser"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page"/>
- <value name="Folder"/>
- </Constraint>
- <Editor name="List"/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list"/>
- <XDependencies/>
- </XModelEntity>
- <XModelEntity ImplementingClass="%Regular%" name="VPEImageReference">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="FileFilter">
- <value name="allFiles=false"/>
- <value name="description=images folder"/>
- <value name="mode=FOLDERS_ONLY"/>
- </Constraint>
- <Editor name="FolderChooser"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page: Only This Page"/>
- <value name="Folder: Any Page at the Same Folder"/>
- <value name="Project: Any Page at the Same Project"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
- displayName="Add CSS Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPEImageReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
- displayName="Edit CSS Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPEImageReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
- <XModelEntity ImplementingClass="%Regular%" name="VPEImageReferenceExt">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="FileFilter">
- <value name="allFiles=false"/>
- <value name="description=images folder"/>
- <value name="mode=FOLDERS_ONLY"/>
- </Constraint>
- <Editor name="FolderChooser"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page: Only This Page"/>
- <value name="Folder: Any Page at the Same Folder"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
- displayName="Add CSS Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPEImageReferenceExt">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
- displayName="Edit CSS Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPEImageReferenceExt">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
- <XModelEntity ImplementingClass="%Regular%" name="VPETLDReference">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="ListString"/>
- <Editor name="List"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page: Only This Page"/>
- <value name="Folder: Any Page at the Same Folder"/>
- <value name="Project: Any Page at the Same Project"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- <XModelAttribute name="prefix">
- <Constraint/>
- <Editor/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceAddItem"
- displayName="Add Taglib Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPETLDReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceEditItem"
- displayName="Edit Taglib Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPETLDReference">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
- <XModelEntity ImplementingClass="%Regular%" name="VPETLDReferenceExt">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="action.empty" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute name="location" xmlname="location">
- <Constraint loader="ListString"/>
- <Editor name="List"/>
- </XModelAttribute>
- <XModelAttribute PROPERTIES="border=true"
- default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
- <Constraint loader="ListString">
- <value name="Page: Only This Page"/>
- <value name="Folder: Any Page at the Same Folder"/>
- </Constraint>
- <Editor name="RadioArray"/>
- </XModelAttribute>
- <XModelAttribute name="prefix">
- <Constraint/>
- <Editor/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceAddItem"
- displayName="Add TLD Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPETLDReferenceExt">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- <XActionItem kind="list" name="EditActions">
- <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceEditItem"
- displayName="Edit TLD Reference..." kind="action" name="EditItem">
- <EntityData EntityName="VPETLDReferenceExt">
- <AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
- <AttributeData AttributeName="prefix" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
-</XModelEntityGroup>
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta (from rev 17153, trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2009-08-19 12:45:45 UTC (rev 17158)
@@ -0,0 +1,483 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE XModelEntityGroup PUBLIC "-//Red Hat, Inc.//DTD Meta 1.0//EN" "meta.dtd">
+<XModelEntityGroup>
+ <VERSION MODULE="VPE" VERSION="1.0"/>
+ <MAPPINGS/>
+ <ICONS/>
+ <GlobalActions kind="list"/>
+ <XModelEntity ImplementingClass="%Regular%" name="VPECSSReference">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="FileFilter">
+ <value name="allFiles=false"/>
+ <value name="description=*.css files"/>
+ <value name="mode=FILES_ONLY"/>
+ <value name="extensions=css"/>
+ </Constraint>
+ <Editor name="FileChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ <value name="Project: Any Page at the Same Project"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceAddItem"
+ displayName="Add CSS Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPECSSReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceEditItem"
+ displayName="Edit CSS Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPECSSReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Regular%" name="VPECSSReferenceExt">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="FileFilter">
+ <value name="allFiles=false"/>
+ <value name="description=*.css files"/>
+ <value name="mode=FILES_ONLY"/>
+ <value name="extensions=css"/>
+ </Constraint>
+ <Editor name="FileChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceAddItem"
+ displayName="Add CSS Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPECSSReferenceExt">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport, key=VPECSSReferenceEditItem"
+ displayName="Edit CSS Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPECSSReferenceExt">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+
+ <!-- Added by estherbin //JBIDE-2010 -->
+ <XModelEntity ImplementingClass="%Regular%" name="VPEElReference">
+
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ <value name="Project: Any Page at the Same Project"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ <XModelAttribute name="prefix">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
+ key=VPEElReferenceAddItem"
+ displayName="Add El Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPEElReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
+ key=VPEElReferenceEditItem"
+ displayName="Edit El Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPEElReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+
+
+ <!-- Added by estherbin https://jira.jboss.org/jira/browse/JBIDE-2594 -->
+ <XModelEntity ImplementingClass="%Regular%" name="VPEGlobalElReference">
+
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Global: For all projects in workspace"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ <XModelAttribute name="prefix">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
+ key=VPEGlobalElReferenceAddItem"
+ displayName="Add El Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPEGlobalElReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeELReferenceSupport,
+ key=VPEGlobalElReferenceEditItem"
+ displayName="Edit El Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPEGlobalElReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+
+
+ <XModelEntity ImplementingClass="%Regular%" name="VPEFolderReference">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="FileFilter">
+ <value name="allFiles=false"/>
+ <value name="description=*.css files"/>
+ <value name="mode=FOLDERS_ONLY"/>
+ </Constraint>
+ <Editor name="FolderChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page"/>
+ <value name="Folder"/>
+ <value name="Project"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list"/>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Regular%" name="VPEFolderReferenceExt">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="FileFilter">
+ <value name="allFiles=false"/>
+ <value name="description=*.css files"/>
+ <value name="mode=FOLDERS_ONLY"/>
+ </Constraint>
+ <Editor name="FolderChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page"/>
+ <value name="Folder"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list"/>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Regular%" name="VPEImageReference">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="FileFilter">
+ <value name="allFiles=false"/>
+ <value name="description=images folder"/>
+ <value name="mode=FOLDERS_ONLY"/>
+ </Constraint>
+ <Editor name="FolderChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ <value name="Project: Any Page at the Same Project"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
+ displayName="Add CSS Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPEImageReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
+ displayName="Edit CSS Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPEImageReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Regular%" name="VPEImageReferenceExt">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="FileFilter">
+ <value name="allFiles=false"/>
+ <value name="description=images folder"/>
+ <value name="mode=FOLDERS_ONLY"/>
+ </Constraint>
+ <Editor name="FolderChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
+ displayName="Add CSS Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPEImageReferenceExt">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
+ displayName="Edit CSS Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPEImageReferenceExt">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Regular%" name="VPETLDReference">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="ListString"/>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ <value name="Project: Any Page at the Same Project"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ <XModelAttribute name="prefix">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceAddItem"
+ displayName="Add Taglib Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPETLDReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceEditItem"
+ displayName="Edit Taglib Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPETLDReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Regular%" name="VPETLDReferenceExt">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="ListString"/>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope" xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ <XModelAttribute name="prefix">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceAddItem"
+ displayName="Add TLD Reference..." kind="action" name="AddItem">
+ <EntityData EntityName="VPETLDReferenceExt">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeTaglibReferenceSupport, key=VPETLDReferenceEditItem"
+ displayName="Edit TLD Reference..." kind="action" name="EditItem">
+ <EntityData EntityName="VPETLDReferenceExt">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+</XModelEntityGroup>
16 years, 4 months
JBoss Tools SVN: r17157 - in trunk/jst/plugins/org.jboss.tools.jst.jsp: src/org/jboss/tools/jst/jsp/contentassist and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-08-19 08:12:55 -0400 (Wed, 19 Aug 2009)
New Revision: 17157
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
Log:
JBIDE-4769: The Warning resource marker is to be added to the project indicating that the KB-nature and KB-builder are not specified on the project.
Issue is fixed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2009-08-19 11:02:00 UTC (rev 17156)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2009-08-19 12:12:55 UTC (rev 17157)
@@ -8,4 +8,6 @@
occurrenceStructureProvidersExtensionPoint= Occurrence Structure Providers
defaultOccurrenceStructureProviderName= Default Occurrence Provider
-Bundle-Name.0 = Jsp Editor Plug-in
\ No newline at end of file
+Bundle-Name.0 = Jsp Editor Plug-in
+
+KBProblemName=KB Problem
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-08-19 11:02:00 UTC (rev 17156)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-08-19 12:12:55 UTC (rev 17157)
@@ -530,4 +530,11 @@
sequence="Ctrl+Shift+C">
</key>
</extension>
+
+ <extension id="kbproblemmarker" name="%KBProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
</plugin>
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-08-19 11:02:00 UTC (rev 17156)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-08-19 12:12:55 UTC (rev 17157)
@@ -10,12 +10,18 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.resources.ICommand;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.text.IDocument;
@@ -31,8 +37,6 @@
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
@@ -42,8 +46,6 @@
import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
import org.jboss.tools.common.el.core.model.ELInstance;
@@ -56,8 +58,12 @@
import org.jboss.tools.common.el.core.resolver.ELResolver;
import org.jboss.tools.common.el.core.resolver.ELResolverFactoryManager;
import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.messages.JstUIMessages;
+import org.jboss.tools.jst.web.kb.IKbProject;
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.KbQuery.Type;
+import org.jboss.tools.jst.web.kb.internal.KbBuilder;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -86,10 +92,117 @@
this.fDocument = (viewer == null ? null : viewer.getDocument());
this.fDocumentPosition = offset;
this.fContext = createContext();
+
+ checkKBBuilderInstalled();
return super.computeCompletionProposals(viewer, offset);
}
+ private void checkKBBuilderInstalled() {
+ ELContext context = getContext();
+ IFile resource = context == null ? null : context.getResource();
+ IProject project = resource == null ? null : resource.getProject();
+ if (project == null)
+ return; // Cannot check anything
+
+ boolean kbNatureFound = false;
+ boolean kbBuilderFound = false;
+ try {
+ kbNatureFound = (project.getNature(IKbProject.NATURE_ID) != null);
+
+ IProjectDescription description = project.getDescription();
+ ICommand command = null;
+ ICommand commands[] = description.getBuildSpec();
+ for (int i = 0; i < commands.length && command == null; ++i) {
+ if (commands[i].getBuilderName().equals(KbBuilder.BUILDER_ID)) {
+ kbBuilderFound = true;
+ break;
+ }
+ }
+ } catch (CoreException ex) {
+ JspEditorPlugin.getPluginLog().logError(ex);
+ }
+
+ if (kbNatureFound && kbBuilderFound) {
+ // Find existing KBNATURE problem marker and kill it if exists
+ IMarker[] markers = getOwnedMarkers(project);
+ if (markers != null && markers.length > 0) {
+ for (IMarker m : markers) {
+ try {
+ project.deleteMarkers(KB_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ONE);
+ } catch (CoreException ex) {
+ JspEditorPlugin.getPluginLog().logError(ex);
+ }
+ }
+ }
+ return;
+ }
+
+ // Find existing KBNATURE problem marker and install it if doesn't exist
+ IMarker[] markers = getOwnedMarkers(project);
+
+ if (markers == null || markers.length == 0) {
+ try {
+ IMarker m = createOrUpdateKbProblemMarker(null, project, !kbNatureFound, !kbBuilderFound);
+ } catch (CoreException ex) {
+ JspEditorPlugin.getPluginLog().logError(ex);
+ }
+ } else {
+ for (IMarker m : markers) {
+ try {
+ m = createOrUpdateKbProblemMarker(m, project, !kbNatureFound, !kbBuilderFound);
+ } catch (CoreException ex) {
+ JspEditorPlugin.getPluginLog().logError(ex);
+ }
+ }
+ }
+ return;
+
+ }
+
+ public static final String KB_PROBLEM_MARKER_TYPE = "org.jboss.tools.jst.jsp.kbproblemmarker"; //$NON-NLS-1$
+
+ private IMarker createOrUpdateKbProblemMarker(IMarker m, IResource r, boolean kbNatureIsAbsent, boolean kbBuilderIsAbsent) throws CoreException {
+ ArrayList<String> args = new ArrayList<String>();
+ if (kbNatureIsAbsent) {
+ args.add(JstUIMessages.KBNATURE_NOT_FOUND);
+ }
+ if (kbBuilderIsAbsent) {
+ args.add(JstUIMessages.KBBUILDER_NOT_FOUND);
+ }
+ String message = MessageFormat.format(JstUIMessages.KBPROBLEM, args.toArray());
+ if (m == null) m = r.createMarker(KB_PROBLEM_MARKER_TYPE);
+ m.setAttribute(IMarker.MESSAGE, message);
+ m.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);
+ m.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_NORMAL);
+ return m;
+ }
+
+ private IMarker[] getOwnedMarkers(IResource r) {
+ ArrayList<IMarker> l = null;
+ try {
+ IMarker[] ms = r.findMarkers(null, false, 1);
+ if(ms != null) {
+ for (int i = 0; i < ms.length; i++) {
+ if(ms[i] == null) continue;
+
+ String _type = ms[i].getType();
+ if(_type == null) continue;
+ if(!_type.equals(KB_PROBLEM_MARKER_TYPE)) continue;
+ if(!ms[i].isSubtypeOf(IMarker.PROBLEM)) continue;
+
+ if(l == null)
+ l = new ArrayList<IMarker>();
+
+ l.add(ms[i]);
+ }
+ }
+ } catch (CoreException e) {
+ //ignore
+ }
+ return (l == null) ? null : l.toArray(new IMarker[0]);
+ }
+
/**
* The reason of overriding is that the method returns wrong region in case of incomplete tag (a tag with no '>'-closing char)
* In this case we have to return that previous incomplete tag instead of the current tag)
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2009-08-19 11:02:00 UTC (rev 17156)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2009-08-19 12:12:55 UTC (rev 17157)
@@ -115,4 +115,7 @@
public static String JSPDialogContentProposalProvider_NewELExpression;
public static String PROPERTY_NAME_COLUMN;
public static String PROPERTY_VALUE_COLUMN;
+ public static String KBNATURE_NOT_FOUND;
+ public static String KBBUILDER_NOT_FOUND;
+ public static String KBPROBLEM;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2009-08-19 11:02:00 UTC (rev 17156)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2009-08-19 12:12:55 UTC (rev 17157)
@@ -92,3 +92,7 @@
PROPERTY_NAME_COLUMN=Attribute
PROPERTY_VALUE_COLUMN=Value
+
+KBNATURE_NOT_FOUND=KB Nature is not installed.
+KBBUILDER_NOT_FOUND=KB Builder is not installed.
+KBPROBLEM=KB Problem: {0} {1} Use Quick Fix to allow JSF Content Assistant.
16 years, 4 months
JBoss Tools SVN: r17156 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-08-19 07:02:00 -0400 (Wed, 19 Aug 2009)
New Revision: 17156
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4761
Changed default name for id property.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-08-19 10:38:22 UTC (rev 17155)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-08-19 11:02:00 UTC (rev 17156)
@@ -26,7 +26,9 @@
import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.hibernate.cfg.NamingStrategy;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
+import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGenerator;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGeneratorHolder;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
@@ -183,7 +185,20 @@
public void removeGenericGenerator(GenericGenerator generator) {
if (this.genericGenerator == generator){
removeGenericGenerator();
- }
+ }
}
+
+ @Override
+ public HibernateJpaProject getJpaProject() {
+ return (HibernateJpaProject) super.getJpaProject();
+ }
+ @Override
+ public String getDefaultColumnName() {
+ NamingStrategy namingStrategy = getJpaProject().getNamingStrategy();
+ if (namingStrategy != null && getPersistentAttribute().getName() != null){
+ return namingStrategy.propertyToColumnName(getPersistentAttribute().getName());
+ }
+ return super.getDefaultColumnName();
+ }
}
16 years, 4 months
JBoss Tools SVN: r17155 - trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-08-19 06:38:22 -0400 (Wed, 19 Aug 2009)
New Revision: 17155
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4547, page validation right after creation was removed for VpeResourceDialog.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java 2009-08-19 10:13:06 UTC (rev 17154)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java 2009-08-19 10:38:22 UTC (rev 17155)
@@ -109,11 +109,6 @@
* Dialog's control should be initialized.
*/
setControl(pageControl);
- /*
- * Validate page right after creation.
- */
- validatePage();
-
}
@Override
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java 2009-08-19 10:13:06 UTC (rev 17154)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ELReferenceWizardPage.java 2009-08-19 10:38:22 UTC (rev 17155)
@@ -82,10 +82,6 @@
* Dialog's control should be initialized.
*/
setControl(pageControl);
- /*
- * Validate page right after creation.
- */
- validatePage();
}
@Override
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceWizardPage.java 2009-08-19 10:13:06 UTC (rev 17154)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceWizardPage.java 2009-08-19 10:38:22 UTC (rev 17155)
@@ -85,11 +85,6 @@
* Dialog's control should be initialized.
*/
setControl(pageControl);
- /*
- * Validate page right after creation.
- */
- validatePage();
-
}
@Override
16 years, 4 months
JBoss Tools SVN: r17153 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree: figures and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-08-19 05:52:48 -0400 (Wed, 19 Aug 2009)
New Revision: 17153
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java
Log:
JBIDE-4648
change the ConnectionAnchor
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java 2009-08-19 09:47:48 UTC (rev 17152)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java 2009-08-19 09:52:48 UTC (rev 17153)
@@ -4,22 +4,20 @@
package org.jboss.tools.smooks.gef.tree.editparts;
import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.ManhattanConnectionRouter;
-import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.PolylineConnection;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel;
import org.jboss.tools.smooks.gef.tree.editpolicy.TreeNodeConnectionEditPolicy;
import org.jboss.tools.smooks.gef.tree.editpolicy.TreeNodeEndpointEditPolicy;
-import org.jboss.tools.smooks.gef.tree.model.TreeContainerModel;
-import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
+import org.jboss.tools.smooks.gef.tree.figures.LeftOrRightAnchor;
/**
* @author DartPeng
@@ -39,21 +37,22 @@
}
public IFigure createFigure() {
- TreeNodeConnection model = (TreeNodeConnection) getModel();
- AbstractSmooksGraphicalModel sourceModel = model.getSourceNode();
- AbstractSmooksGraphicalModel targetModel = model.getTargetNode();
- PolylineConnection connection1 = new PolylineConnection() {
- @Override
- public void paintFigure(Graphics graphics) {
- graphics.setAlpha(alpha);
- super.paintFigure(graphics);
- }
- };
- if (sourceModel instanceof TreeContainerModel || targetModel instanceof TreeContainerModel) {
- // connection1.setConnectionRouter(new ManhattanConnectionRouter());
- connection1.setTargetDecoration(new PolygonDecoration());
- return connection1;
- }
+// TreeNodeConnection model = (TreeNodeConnection) getModel();
+// AbstractSmooksGraphicalModel sourceModel = model.getSourceNode();
+// AbstractSmooksGraphicalModel targetModel = model.getTargetNode();
+// PolylineConnection connection1 = new PolylineConnection() {
+// @Override
+// public void paintFigure(Graphics graphics) {
+// graphics.setAlpha(alpha);
+// super.paintFigure(graphics);
+// }
+// };
+ // if (sourceModel instanceof TreeContainerModel || targetModel
+ // instanceof TreeContainerModel) {
+ // // connection1.setConnectionRouter(new ManhattanConnectionRouter());
+ // connection1.setTargetDecoration(new PolygonDecoration());
+ // return connection1;
+ // }
PolylineConnection connection = new PolylineConnection() {
@Override
@@ -63,12 +62,36 @@
}
public PointList getPoints() {
+ ConnectionAnchor sourceAnchor = getSourceConnectionAnchor();
+ ConnectionAnchor targetAnchor = getTargetConnectionAnchor();
+ boolean startLeft = false;
+ if (sourceAnchor instanceof LeftOrRightAnchor) {
+ ((LeftOrRightAnchor) sourceAnchor).getLocation(targetAnchor.getReferencePoint());
+ startLeft = ((LeftOrRightAnchor) sourceAnchor).isLeft();
+ }
+
+ boolean targetLeft = false;
+ if (targetAnchor instanceof LeftOrRightAnchor) {
+ ((LeftOrRightAnchor) targetAnchor).getLocation(sourceAnchor.getReferencePoint());
+ targetLeft = ((LeftOrRightAnchor) targetAnchor).isLeft();
+ }
+
PointList list = super.getPoints();
- if(list.size() == 0) return list;
+ if (list.size() == 0)
+ return list;
Point start = getStart();
- Point start2 = new Point(start.x + 20, start.y);
+ int slength = 20;
+ int tlength = 20;
+ if (startLeft) {
+ slength = (-slength);
+ }
+ if (targetLeft) {
+ tlength = (-tlength);
+ }
+
+ Point start2 = new Point(start.x + slength, start.y);
Point end = getEnd();
- Point end2 = new Point(end.x - 20, end.y);
+ Point end2 = new Point(end.x + tlength, end.y);
list.removeAllPoints();
list.addPoint(start);
list.addPoint(start2);
@@ -86,18 +109,45 @@
*/
@Override
public void paint(Graphics graphics) {
+
+ ConnectionAnchor sourceAnchor = getSourceConnectionAnchor();
+ ConnectionAnchor targetAnchor = getTargetConnectionAnchor();
+ // boolean startLeft = false;
+ // if(sourceAnchor instanceof LeftOrRightAnchor){
+ // ((LeftOrRightAnchor)sourceAnchor).getLocation(targetAnchor.getReferencePoint());
+ // startLeft = ((LeftOrRightAnchor)sourceAnchor).isLeft();
+ // }
+ boolean targetLeft = false;
+ if (targetAnchor instanceof LeftOrRightAnchor) {
+ ((LeftOrRightAnchor) targetAnchor).getLocation(sourceAnchor.getReferencePoint());
+ targetLeft = ((LeftOrRightAnchor) targetAnchor).isLeft();
+ }
+
graphics.pushState();
graphics.setBackgroundColor(ColorConstants.button);
- Point p = this.getBounds().getTopLeft();
- Point p2 = this.getBounds().getBottomLeft();
- Point p3 = this.getBounds().getTopRight();
- p3 = new Point(p3.x, p3.y + this.getSize().height / 2);
- PointList pointList = new PointList();
- pointList.addPoint(p);
- pointList.addPoint(p2.x, p2.y - 1);
- pointList.addPoint(p3);
- graphics.fillPolygon(pointList);
- graphics.drawPolygon(pointList);
+ if (targetLeft) {
+ Point p = this.getBounds().getTopLeft();
+ Point p2 = this.getBounds().getBottomLeft();
+ Point p3 = this.getBounds().getTopRight();
+ p3 = new Point(p3.x, p3.y + this.getSize().height / 2);
+ PointList pointList = new PointList();
+ pointList.addPoint(p);
+ pointList.addPoint(p2.x, p2.y - 1);
+ pointList.addPoint(p3);
+ graphics.fillPolygon(pointList);
+ graphics.drawPolygon(pointList);
+ } else {
+ Point p = this.getBounds().getTopRight();
+ Point p2 = this.getBounds().getBottomRight();
+ Point p3 = this.getBounds().getTopLeft();
+ p3 = new Point(p3.x, p3.y + this.getSize().height / 2);
+ PointList pointList = new PointList();
+ pointList.addPoint(p.x - 1, p.y);
+ pointList.addPoint(p2.x - 1, p2.y - 1);
+ pointList.addPoint(p3);
+ graphics.fillPolygon(pointList);
+ graphics.drawPolygon(pointList);
+ }
graphics.popState();
}
@@ -113,25 +163,45 @@
@Override
public void paint(Graphics graphics) {
graphics.pushState();
+ ConnectionAnchor sourceAnchor = getSourceConnectionAnchor();
+ ConnectionAnchor targetAnchor = getTargetConnectionAnchor();
+ boolean startLeft = false;
+ if (sourceAnchor instanceof LeftOrRightAnchor) {
+ ((LeftOrRightAnchor) sourceAnchor).getLocation(targetAnchor.getReferencePoint());
+ startLeft = ((LeftOrRightAnchor) sourceAnchor).isLeft();
+ }
graphics.setForegroundColor(ColorConstants.black);
graphics.setBackgroundColor(ColorConstants.listBackground);
- Point p = this.getBounds().getTopLeft();
- Point p2 = this.getBounds().getBottomLeft();
- Point p3 = this.getBounds().getTopRight();
- p3 = new Point(p3.x, p3.y + this.getSize().height / 2);
- PointList pointList = new PointList();
- pointList.addPoint(p);
- pointList.addPoint(p2.x, p2.y - 1);
- pointList.addPoint(p3);
- graphics.fillPolygon(pointList);
- graphics.drawPolygon(pointList);
+ if (!startLeft) {
+ Point p = this.getBounds().getTopLeft();
+ Point p2 = this.getBounds().getBottomLeft();
+ Point p3 = this.getBounds().getTopRight();
+ p3 = new Point(p3.x, p3.y + this.getSize().height / 2);
+ PointList pointList = new PointList();
+ pointList.addPoint(p);
+ pointList.addPoint(p2.x, p2.y - 1);
+ pointList.addPoint(p3);
+ graphics.fillPolygon(pointList);
+ graphics.drawPolygon(pointList);
+ }else{
+ Point p = this.getBounds().getTopRight();
+ Point p2 = this.getBounds().getBottomRight();
+ Point p3 = this.getBounds().getTopLeft();
+ p3 = new Point(p3.x, p3.y + this.getSize().height / 2);
+ PointList pointList = new PointList();
+ pointList.addPoint(p.x - 1, p.y);
+ pointList.addPoint(p2.x - 1, p2.y - 1);
+ pointList.addPoint(p3);
+ graphics.fillPolygon(pointList);
+ graphics.drawPolygon(pointList);
+ }
graphics.popState();
super.paint(graphics);
}
};
- targetFlagFigure.setSize(10, 10);
- sourceFlagFigure.setSize(10, 10);
+ targetFlagFigure.setSize(5, 5);
+ sourceFlagFigure.setSize(5, 5);
ConnectionLocator targetLocator = new ConnectionLocator(connection, ConnectionLocator.TARGET);
connection.add(targetFlagFigure, targetLocator);
ConnectionLocator sourceLocator = new ConnectionLocator(connection, ConnectionLocator.SOURCE);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java 2009-08-19 09:47:48 UTC (rev 17152)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java 2009-08-19 09:52:48 UTC (rev 17153)
@@ -7,6 +7,8 @@
public class LeftOrRightAnchor extends ChopboxAnchor {
+ private boolean isLeft;
+
public LeftOrRightAnchor(IFigure owner) {
super(owner);
}
@@ -28,8 +30,8 @@
p = getOwner().getBounds().getCenter();
getOwner().translateToAbsolute(p);
Point referencePoint = reference;
- boolean isLeft = false;
- if(referencePoint.x > p.x){
+ isLeft = false;
+ if(referencePoint.x > (p.x + getOwner().getBounds().width / 2)){
isLeft = false;
}else{
isLeft = true;
@@ -45,5 +47,11 @@
getOwner().translateToAbsolute(p);
return p;
}
+
+ public boolean isLeft() {
+ return isLeft;
+ }
+
+
}
16 years, 4 months
JBoss Tools SVN: r17152 - trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-08-19 05:47:48 -0400 (Wed, 19 Aug 2009)
New Revision: 17152
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4784, initial path for select css file dialog was set to project root.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java 2009-08-19 09:22:46 UTC (rev 17151)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceWizardPage.java 2009-08-19 09:47:48 UTC (rev 17152)
@@ -4,6 +4,8 @@
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -27,12 +29,13 @@
public CSSReferenceWizardPage(String pageName, String title,
ImageDescriptor titleImage, Object fileLocation) {
super(pageName, title, titleImage, fileLocation);
+ if (fileLocation instanceof IFile) {
+ browseDialogFilterPath = ((IFile)fileLocation).getProject().getLocation().toString();
+ } else if (fileLocation instanceof IPath) {
+ browseDialogFilterPath = ((IPath)fileLocation).toString();
+ }
}
- public CSSReferenceWizardPage(String pageName) {
- super(pageName);
- }
-
public void createControl(Composite parent) {
Composite pageControl = new Composite(parent, SWT.NONE);
@@ -71,7 +74,7 @@
/*
* Add filter path
*/
- if ((null != browseDialogFilterPath) && (new File(browseDialogFilterPath).exists()) ){
+ if (null != browseDialogFilterPath) {
dialog.setFilterPath(browseDialogFilterPath);
}
dialog.setFilterExtensions(FILTER_EXTENSIONS);
@@ -79,8 +82,10 @@
String newPath = dialog.open();
if (newPath != null) {
newPath = newPath.trim();
- browseDialogFilterPath = newPath;
- cssName.setText(browseDialogFilterPath);
+ cssName.setText(newPath);
+ if (new File(newPath).exists()) {
+ browseDialogFilterPath = newPath;
+ }
}
}
});
16 years, 4 months