JBoss Tools SVN: r6212 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-02-08 11:22:29 -0500 (Fri, 08 Feb 2008)
New Revision: 6212
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-788, CA functionality for attributes on jsp pages was restored.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-02-08 14:44:54 UTC (rev 6211)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-02-08 16:22:29 UTC (rev 6212)
@@ -14,7 +14,6 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextViewer;
@@ -101,7 +100,8 @@
}
document = viewer.getDocument();
-
+ //added by Max Areshkau JBIDE-788
+ updateActiveContentAssistProcessor(document);
ICompletionProposal[] proposals = super.computeCompletionProposals(viewer, documentPosition);
// If proposal list from super is empty to try to get it from Red Hat dinamic jsp content assist processor.
try {
@@ -109,9 +109,10 @@
String partitionType = getPartitionType((StructuredTextViewer) viewer, documentPosition);
IContentAssistProcessor p = (IContentAssistProcessor) fPartitionToProcessorMap.get(partitionType);
if (!(p instanceof JavaScriptContentAssistProcessor || p instanceof CSSContentAssistProcessor)) {
+
IndexedRegion treeNode = ContentAssistUtils.getNodeAt((StructuredTextViewer) viewer, documentPosition);
-
Node node = (Node) treeNode;
+
while (node != null && node.getNodeType() == Node.TEXT_NODE && node.getParentNode() != null)
node = node.getParentNode();
IDOMNode xmlnode = (IDOMNode) node;
@@ -181,7 +182,33 @@
return autoActivChars;
}
+ public void updateActiveContentAssistProcessor(IDocument document) {
+ TLDCMDocumentManager manager = TaglibController.getTLDCMDocumentManager(document);
+ if (manager != null) {
+ List list = manager.getTaglibTrackers();
+ for(int i=0; i<list.size(); i++) {
+ TaglibTracker tracker = (TaglibTracker)list.get(i);
+ String version = TLDVersionHelper.getTldVersion(tracker);
+ KbTldResource resource = new KbTldResource(tracker.getURI(), "", tracker.getPrefix(), version);
+ getWtpKbConnector().registerResource(resource);
+ addActiveContentAssistProcessorToProcessorMap(tracker.getURI(), tracker.getPrefix(), version);
+ }
+ }
+ }
+
+ private void addActiveContentAssistProcessorToProcessorMap(String uri, String prefix, String version) {
+ try {
+ List names = getWtpKbConnector().getAllTagNamesFromTldByUri(uri, version);
+ for(Iterator iter = names.iterator(); iter.hasNext();) {
+ String fullName = prefix + ":" + iter.next();
+ fNameToProcessorMap.put(fullName, jspActiveCAP);
+ }
+ } catch (KbException e) {
+ JspEditorPlugin.getPluginLog().logError(e);
+ }
+ }
+
private WtpKbConnector getWtpKbConnector() {
if(wtpKbConnector == null && document != null) {
try {
16 years, 7 months
JBoss Tools SVN: r6211 - in trunk/documentation/guides/userguide/Exadel-migration/en: images/jsf_struts_war and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-02-08 09:44:54 -0500 (Fri, 08 Feb 2008)
New Revision: 6211
Added:
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_1.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_10.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_2.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_3.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_4.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_5.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_6.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_7.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_8.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_9.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_1.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_2.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_3.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_4.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_5.png
Removed:
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration1.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_2.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_21.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_3.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_4.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_5.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration3.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration4.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration5.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration1.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war1.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war2.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war2_1.png
trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war2_2.png
Modified:
trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts.xml
trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts_war.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-226 Migration guide - all screens are retaken with 96 resolution
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration1.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_2.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_21.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_3.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_4.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration2_5.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration3.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration4.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration5.png
===================================================================
(Binary files differ)
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_10.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_6.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_7.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_8.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_9.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts/migration_9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration1.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war1.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war2.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war2_1.png
===================================================================
(Binary files differ)
Deleted: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war2_2.png
===================================================================
(Binary files differ)
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Exadel-migration/en/images/jsf_struts_war/migration_war_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts.xml
===================================================================
--- trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts.xml 2008-02-08 14:27:32 UTC (rev 6210)
+++ trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts.xml 2008-02-08 14:44:54 UTC (rev 6211)
@@ -24,7 +24,7 @@
<title>Selecting the Import Menu Item</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration1.png"/>
+ <imagedata fileref="images/jsf_struts/migration_1.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -33,7 +33,7 @@
<title>Selecting the Import JSF Project Wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration2.png"/>
+ <imagedata fileref="images/jsf_struts/migration_2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -48,7 +48,7 @@
<title>Selecting the Web.xml File in the Project Location Screen</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration3.png"/>
+ <imagedata fileref="images/jsf_struts/migration_3.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -71,7 +71,7 @@
<title>The Project Folders Screen</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration4.png"/>
+ <imagedata fileref="images/jsf_struts/migration_4.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -84,7 +84,7 @@
<title>Imported Project in the Package Explorer View</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration5.png"/>
+ <imagedata fileref="images/jsf_struts/migration_5.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -100,7 +100,7 @@
<title>Selecting the Import Menu Item</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration1.png"/>
+ <imagedata fileref="images/jsf_struts/migration_1.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -109,7 +109,7 @@
<title>Selecting the Import Struts Project Wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration2_2.png"/>
+ <imagedata fileref="images/jsf_struts/migration_6.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -124,7 +124,7 @@
<title>The Project Location Screen</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration2_21.png"/>
+ <imagedata fileref="images/jsf_struts/migration_10.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -139,7 +139,7 @@
<title>The Project Modules Screen</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration2_3.png"/>
+ <imagedata fileref="images/jsf_struts/migration_7.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -161,7 +161,7 @@
<title>The Project Folders Screen</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration2_4.png"/>
+ <imagedata fileref="images/jsf_struts/migration_8.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -174,7 +174,7 @@
<title>Imported Project in the Package Explorer View</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts/migration2_5.png"/>
+ <imagedata fileref="images/jsf_struts/migration_9.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts_war.xml
===================================================================
--- trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts_war.xml 2008-02-08 14:27:32 UTC (rev 6210)
+++ trunk/documentation/guides/userguide/Exadel-migration/en/modules/jsf_struts_war.xml 2008-02-08 14:44:54 UTC (rev 6211)
@@ -30,7 +30,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts_war/migration1.png" />
+ <imagedata fileref="images/jsf_struts_war/migration_war_1.png" />
</imageobject>
</mediaobject>
</figure>
@@ -40,7 +40,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts_war/migration_war1.png" />
+ <imagedata fileref="images/jsf_struts_war/migration_war_2.png" />
</imageobject>
</mediaobject>
</figure>
@@ -79,7 +79,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts_war/migration_war2.png" />
+ <imagedata fileref="images/jsf_struts_war/migration_war_3.png" />
</imageobject>
</mediaobject>
</figure>
@@ -107,7 +107,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts_war/migration1.png" />
+ <imagedata fileref="images/jsf_struts_war/migration_war_1.png" />
</imageobject>
</mediaobject>
</figure>
@@ -116,7 +116,7 @@
<title>Selecting the Struts Project From *.war Import Wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts_war/migration_war2_1.png" />
+ <imagedata fileref="images/jsf_struts_war/migration_war_4.png" />
</imageobject>
</mediaobject>
</figure>
@@ -133,7 +133,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsf_struts_war/migration_war2_2.png" />
+ <imagedata fileref="images/jsf_struts_war/migration_war_5.png" />
</imageobject>
</mediaobject>
</figure>
16 years, 7 months
JBoss Tools SVN: r6210 - in trunk/common/plugins/org.jboss.tools.common.meta.ui: src/org/jboss/tools/common/meta/ui/form and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-08 09:27:32 -0500 (Fri, 08 Feb 2008)
New Revision: 6210
Modified:
trunk/common/plugins/org.jboss.tools.common.meta.ui/resources/meta/meta.meta
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaFormLayoutData.java
Log:
JBIDE-1670
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/resources/meta/meta.meta
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/resources/meta/meta.meta 2008-02-08 14:26:35 UTC (rev 6209)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/resources/meta/meta.meta 2008-02-08 14:27:32 UTC (rev 6210)
@@ -278,6 +278,51 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+ <XModelEntity ImplementingClass="%Meta%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.common.meta.ui.form.MetaFormLayoutData"
+ XMLSUBPATH="XActionItemReference" name="MetaActionItemReference">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.meta.action.list" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="action item reference" loader="ElementType" name="element type">
+ <Constraint loader="List">
+ <value name="attribute"/>
+ </Constraint>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="name" xmlname="name"/>
+ <XModelAttribute PROPERTIES="category=general" name="entity" xmlname="entity">
+ <Constraint loader="ListString"/>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="path" xmlname="path"/>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy attribute" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut attribute" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.empty" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete action item" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
<XModelEntity
ImplementingClass="org.jboss.tools.common.meta.ui.editor.MetaElementOrderedImpl"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.common.meta.ui.form.MetaFormLayoutData"
@@ -285,6 +330,7 @@
<XChildrenEntities>
<XChildEntity name="MetaActionList"/>
<XChildEntity name="MetaAction"/>
+ <XChildEntity name="MetaActionItemReference"/>
</XChildrenEntities>
<XEntityRenderer>
<ICONS>
@@ -337,6 +383,15 @@
<AttributeData AttributeName="name"/>
</EntityData>
</XActionItem>
+ <XActionItem HandlerClassName="%Create%"
+ ICON="action.new.meta.action" WizardClassName="%Default%"
+ displayName="Create an item reference..." kind="action" name="CreateMetaActionItemRef">
+ <EntityData EntityName="MetaActionItemReference">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="entity"/>
+ <AttributeData AttributeName="path"/>
+ </EntityData>
+ </XActionItem>
</XActionItem>
<XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
<XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaFormLayoutData.java 2008-02-08 14:26:35 UTC (rev 6209)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaFormLayoutData.java 2008-02-08 14:27:32 UTC (rev 6210)
@@ -52,7 +52,11 @@
public MetaFormLayoutData() {}
public IFormData getFormData(String entityName) {
- return (IFormData)FORM_LAYOUT_DEFINITION_MAP.get(entityName);
+ IFormData data = (IFormData)FORM_LAYOUT_DEFINITION_MAP.get(entityName);
+ if(data == null) {
+ data = ModelFormLayoutData.getInstance().getFormData(entityName);
+ }
+ return data;
}
}
16 years, 7 months
JBoss Tools SVN: r6209 - in trunk/common/plugins/org.jboss.tools.common.model: schema and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-08 09:26:35 -0500 (Fri, 08 Feb 2008)
New Revision: 6209
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/meta.dtd
trunk/common/plugins/org.jboss.tools.common.model/schema/meta.dtd
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/XActionItem.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataConstants.java
Log:
JBIDE-1670
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/meta.dtd
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/meta.dtd 2008-02-08 12:46:39 UTC (rev 6208)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/meta.dtd 2008-02-08 14:26:35 UTC (rev 6209)
@@ -30,7 +30,7 @@
<!ELEMENT GlobalActions (XActionItem*)>
<!ATTLIST GlobalActions kind (list) #REQUIRED>
-<!ELEMENT XActionItem (XActionItem*|EntityData*)>
+<!ELEMENT XActionItem ((XActionItem|XActionItemReference)*|EntityData*)>
<!ATTLIST XActionItem kind (list|action) #REQUIRED>
<!ATTLIST XActionItem name CDATA #IMPLIED>
<!ATTLIST XActionItem group (0|1) #IMPLIED>
@@ -43,6 +43,11 @@
<!ATTLIST XActionItem HIDE (never|disabled|always) "never">
<!ATTLIST XActionItem PROPERTIES CDATA #IMPLIED>
+<!ELEMENT XActionItemReference EMPTY>
+<!ATTLIST XActionItemReference name CDATA #REQUIRED>
+<!ATTLIST XActionItemReference entity CDATA #REQUIRED>
+<!ATTLIST XActionItemReference path CDATA #IMPLIED>
+
<!ELEMENT EntityData (AttributeData*)>
<!ATTLIST EntityData EntityName CDATA #REQUIRED>
<!ATTLIST EntityData Mandatory (yes|no) "yes">
Modified: trunk/common/plugins/org.jboss.tools.common.model/schema/meta.dtd
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/schema/meta.dtd 2008-02-08 12:46:39 UTC (rev 6208)
+++ trunk/common/plugins/org.jboss.tools.common.model/schema/meta.dtd 2008-02-08 14:26:35 UTC (rev 6209)
@@ -30,7 +30,7 @@
<!ELEMENT GlobalActions (XActionItem*)>
<!ATTLIST GlobalActions kind (list) #REQUIRED>
-<!ELEMENT XActionItem (XActionItem*|EntityData*)>
+<!ELEMENT XActionItem ((XActionItem|XActionItemReference)*|EntityData*)>
<!ATTLIST XActionItem kind (list|action) #REQUIRED>
<!ATTLIST XActionItem name CDATA #IMPLIED>
<!ATTLIST XActionItem group (0|1) #IMPLIED>
@@ -43,6 +43,11 @@
<!ATTLIST XActionItem HIDE (never|disabled|always) "never">
<!ATTLIST XActionItem PROPERTIES CDATA #IMPLIED>
+<!ELEMENT XActionItemReference EMPTY>
+<!ATTLIST XActionItemReference name CDATA #REQUIRED>
+<!ATTLIST XActionItemReference entity CDATA #REQUIRED>
+<!ATTLIST XActionItemReference path CDATA #IMPLIED>
+
<!ELEMENT EntityData (AttributeData*)>
<!ATTLIST EntityData EntityName CDATA #REQUIRED>
<!ATTLIST EntityData Mandatory (yes|no) "yes">
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/XActionItem.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/XActionItem.java 2008-02-08 12:46:39 UTC (rev 6208)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/XActionItem.java 2008-02-08 14:26:35 UTC (rev 6209)
@@ -21,6 +21,11 @@
public String getProperty(String name);
public interface Acceptor {
+ public static Acceptor DEFAULT = new Acceptor() {
+ public boolean accepts(XActionItem item) {
+ return true;
+ }
+ };
public boolean accepts(XActionItem item);
}
public XActionItem copy(Acceptor acceptor);
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java 2008-02-08 12:46:39 UTC (rev 6208)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java 2008-02-08 14:26:35 UTC (rev 6209)
@@ -12,6 +12,7 @@
import java.util.*;
import org.w3c.dom.*;
+import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.meta.action.*;
import org.jboss.tools.common.meta.impl.*;
@@ -28,11 +29,8 @@
}
public XActionItem getByPath(String path) {
- int i = (path == null) ? -1 : path.indexOf("/");
- if(i < 0) return getItem(path);
- XActionItem ci = getItem(path.substring(0, i));
- return (!(ci instanceof XActionListImpl)) ? null :
- ((XActionListImpl)ci).getByPath(path.substring(i + 1));
+ if(path == null) return getItem(path); // why?
+ return findItem(path);
}
public boolean isLoaded() {
@@ -65,40 +63,66 @@
}
public XActionItem getItem(String name) {
+ if(name == null) {
+ System.out.println("XActionListImpl.getItem: name=null");
+ }
for (int i = 0; i < items.length; i++) {
if(items[i].getName().equals(name)) return items[i];
}
return null;
}
+ public XActionItem findItem(String path) {
+ if(path == null || path.length() == 0) return null;
+ StringTokenizer st = new StringTokenizer(path, "./");
+ XActionItem item = this;
+ while(st.hasMoreTokens() && item != null) {
+ String part = st.nextToken();
+ item = item.getItem(part);
+ }
+ return item;
+ }
+
public XAction getAction(String path) {
- if(path == null) return null;
- int d = path.indexOf('.');
- if(d < 0) {
- XActionItem i = getItem(path);
- return (i instanceof XAction) ? (XAction)i : null;
- }
- String name = path.substring(0, d);
- path = path.substring(d + 1);
- XActionItem i = getItem(name);
- return (i instanceof XActionList) ? ((XActionList)i).getAction(path) : null;
+ XActionItem item = findItem(path);
+ return (item instanceof XAction) ? (XAction)item : null;
}
public void load(Element el) {
super.load(el);
groupfactor = (short)XMetaDataLoader.getInt(el, "group", 0);
- Element[] cs = XMetaDataLoader.getChildrenElements(el, "XActionItem");
- items = new XActionItem[cs.length];
- for (int i = 0; i < items.length; i++) {
- Element ei = cs[i];
- String kind = ei.getAttribute("kind");
- XActionItemImpl item = (kind.equals("list"))
+ NodeList ns = el.getChildNodes();
+ List<XActionItem> list = new ArrayList<XActionItem>();
+ for (int i = 0; i < ns.getLength(); i++) {
+ Node n = ns.item(i);
+ if(n.getNodeType() != Node.ELEMENT_NODE) continue;
+ Element ei = (Element)n;
+ String tag = ei.getNodeName();
+ if(XMODEL_ACTION_ITEM.equals(tag)) {
+ String kind = ei.getAttribute("kind");
+ XActionItemImpl item = (kind.equals("list"))
? (XActionItemImpl) new XActionListImpl()
: (XActionItemImpl) new XActionImpl();
- item.setParent(this);
- items[i] = item;
- item.load(ei);
+ item.setParent(this);
+ item.load(ei);
+ list.add(item);
+ } else if(XMODEL_ACTION_ITEM_REF.equals(tag)) {
+ String entityName = ei.getAttribute("entity");
+ String attrName = ei.getAttribute(NAME);
+ String path = ei.hasAttribute("path")
+ ? ei.getAttribute("path")
+ : attrName;
+
+ XModelEntity entity = getMetaModel().getEntity(entityName);
+ if(entity != null) {
+ XActionItem item = ((XActionListImpl)entity.getActionList()).findItem(path);
+ if(item != null) {
+ list.add(item.copy(Acceptor.DEFAULT));
+ }
+ }
+ }
}
+ items = list.toArray(new XActionItem[list.size()]);
}
public void merge(XActionListImpl ext) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataConstants.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataConstants.java 2008-02-08 12:46:39 UTC (rev 6208)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataConstants.java 2008-02-08 14:26:35 UTC (rev 6209)
@@ -20,6 +20,8 @@
String XMODEL_ATTRIBUTE_REF = "XModelAttributeReference";
String XMODEL_ACTIONS = "XModelActions";
String XMODEL_ACTION = "XModelAction";
+ String XMODEL_ACTION_ITEM = "XActionItem";
+ String XMODEL_ACTION_ITEM_REF = "XActionItemReference";
String XMODEL_CHILDREN = "XChildrenEntities";
String XMODEL_CHILD = "XChildEntity";
String NAME = "name";
16 years, 7 months
JBoss Tools SVN: r6208 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-02-08 07:46:39 -0500 (Fri, 08 Feb 2008)
New Revision: 6208
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/.classpath
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/.classpath
Log:
rolled back jdk1.4 changes plus updated hibernate plugins to explicit ask for jdk5
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/.classpath
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/.classpath 2008-02-08 12:33:37 UTC (rev 6207)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/.classpath 2008-02-08 12:46:39 UTC (rev 6208)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java 2008-02-08 12:33:37 UTC (rev 6207)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java 2008-02-08 12:46:39 UTC (rev 6208)
@@ -87,7 +87,7 @@
wc.setAttribute(TEMPORARY_CONFIG_FLAG, true);
ILaunchConfiguration saved = wc.doSave();
int res = DebugUITools.openLaunchConfigurationPropertiesDialog( part.getSite().getShell(), saved, "org.eclipse.debug.ui.launchGroup.run" );
- List listTempConfigs = new ArrayList();
+ List<ILaunchConfiguration> listTempConfigs = new ArrayList<ILaunchConfiguration>();
ILaunchConfiguration[] configs = launchManager.getLaunchConfigurations(launchConfigurationType);
for (int i = 0; i < configs.length; i++) {
boolean temporary = configs[i].getAttribute(AddConfigurationAction.TEMPORARY_CONFIG_FLAG, false);
@@ -97,11 +97,11 @@
}
if (res != Window.OK) {
for (int i = 0; i < listTempConfigs.size(); i++) {
- ((ILaunchConfiguration)listTempConfigs.get(i)).delete();
+ listTempConfigs.get(i).delete();
}
} else {
for (int i = 0; i < listTempConfigs.size(); i++) {
- wc = ((ILaunchConfiguration)listTempConfigs.get(i)).getWorkingCopy();
+ wc = listTempConfigs.get(i).getWorkingCopy();
wc.setAttribute(TEMPORARY_CONFIG_FLAG, (String)null); // Must be set to null since it should never be in the actual saved configuration!
wc.doSave();
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/.classpath
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/.classpath 2008-02-08 12:33:37 UTC (rev 6207)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/.classpath 2008-02-08 12:46:39 UTC (rev 6208)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
16 years, 7 months
JBoss Tools SVN: r6207 - in trunk: hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-02-08 07:33:37 -0500 (Fri, 08 Feb 2008)
New Revision: 6207
Modified:
trunk/
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
Log:
Merged revisions 6206 via svnmerge from
https://svn.jboss.org/repos/jbosstools/branches/jbosstools-2.0.x
........
r6206 | max.andersen(a)jboss.com | 2008-02-08 13:13:33 +0100 (Fri, 08 Feb 2008) | 1 line
JBIDE-1421 validation on duplicates
........
Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
- /branches/jbosstools-2.0.x:1-6135,6162,6165,6199
+ /branches/jbosstools-2.0.x:1-6135,6162,6165,6199,6206
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -37,11 +37,14 @@
ITableFilter createTableFilter();
void addTableFilter(ITableFilter filter);
+
ITableFilter[] getTableFilters();
+ void removeAllTableFilters();
void removeTableFilter(ITableFilter item);
void moveTableFilterDown(ITableFilter item);
void moveTableFilterUp(ITableFilter item);
-
+
+
ITypeMapping[] getTypeMappings();
ITypeMapping createTypeMapping();
void removeTypeMapping(ITypeMapping item);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -54,7 +54,7 @@
}
public ITableFilter createTableFilter() {
- return new TableFilterImpl();
+ return new TableFilterImpl(this);
}
List tableFilters = new ArrayList();
@@ -69,10 +69,19 @@
pcs.firePropertyChange(property, old, newValue);
}
+ protected void updateTableFilter(ITableFilter updated) {
+ firePropertyChange("tableFilter", null, updated);
+ }
+
public ITableFilter[] getTableFilters() {
return (ITableFilter[]) tableFilters.toArray(new ITableFilter[tableFilters.size()]);
}
+ public void removeAllTableFilters() {
+ tableFilters.clear();
+ firePropertyChange(TABLEFILTER_STRUCTURE, null, null);
+ }
+
public void removeTableFilter(ITableFilter item) {
tableFilters.remove(item);
firePropertyChange(TABLEFILTER_STRUCTURE, item, null);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -27,25 +27,35 @@
public class TableFilterImpl implements ITableFilter {
TableFilter tf = new TableFilter();
+ private final ReverseEngineeringDefinitionImpl revModel;
+ protected TableFilterImpl(
+ ReverseEngineeringDefinitionImpl reverseEngineeringDefinitionImpl) {
+ this.revModel = reverseEngineeringDefinitionImpl;
+ }
+
public void setExclude(Boolean exclude) {
tf.setExclude(exclude);
+ revModel.updateTableFilter(this);
}
public void setMatchCatalog(String catalog) {
tf.setMatchCatalog(catalog);
+ revModel.updateTableFilter(this);
}
public void setMatchSchema(String schema) {
tf.setMatchSchema(schema);
+ revModel.updateTableFilter(this);
}
public void setMatchName(String name) {
tf.setMatchName(name);
+ revModel.updateTableFilter(this);
}
public Boolean getExclude() {
- return tf.getExclude();
+ return tf.getExclude();
}
public String getMatchCatalog() {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -21,11 +21,17 @@
*/
package org.hibernate.eclipse.console.wizards;
+import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.CheckboxCellEditor;
+import org.eclipse.jface.viewers.ICellEditorListener;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
@@ -38,6 +44,7 @@
import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.model.IReverseEngineeringDefinition;
import org.hibernate.eclipse.console.model.ITableFilter;
+import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.hibernate.eclipse.console.workbench.DeferredContentProvider;
import org.hibernate.eclipse.console.workbench.LazyDatabaseSchema;
import org.hibernate.eclipse.console.workbench.TableContainer;
@@ -204,6 +211,12 @@
}
}
+ protected void doRemoveAll() {
+ if(MessageDialog.openQuestion( getShell(), "Remove all filters" , "Do you want to remove all filters ?")) {
+ revEngDef.removeAllTableFilters();
+ }
+ }
+
protected void doRemove() {
int sel = rightTable.getSelectionIndex();
TableItem[] selection = rightTable.getSelection();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -21,7 +21,13 @@
*/
package org.hibernate.eclipse.console.wizards;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ComboDialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -29,6 +35,7 @@
import org.eclipse.swt.widgets.Composite;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
+import org.hibernate.eclipse.console.model.IReverseEngineeringDefinition;
import org.hibernate.eclipse.console.model.ITableFilter;
import org.hibernate.eclipse.console.model.impl.ReverseEngineeringDefinitionImpl;
@@ -70,6 +77,13 @@
consoleConfigurationName.setItems(names);
consoleConfigurationName.doFillIntoGrid(container, 3);
+
+ IDialogFieldListener fieldlistener = new IDialogFieldListener() {
+ public void dialogFieldChanged(DialogField field) {
+ dialogChanged();
+ }
+ };
+ consoleConfigurationName.setDialogFieldListener(fieldlistener);
TreeToTableComposite tfc = createTableFilterPart( container );
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -81,8 +95,43 @@
if(selectedConfiguratonName!=null) {
consoleConfigurationName.setText(selectedConfiguratonName);
}
- }
+ dialogChanged();
+ }
+ private void updateWarningStatus(String message) {
+ setMessage(message, IMessageProvider.WARNING);
+ }
+
+ /**
+ * Ensures that contents is ok.
+ */
+ private void dialogChanged() {
+
+ if (hasDuplicates()) {
+ updateWarningStatus("Table filters contains duplicates.");
+ return;
+ }
+
+ updateWarningStatus(null);
+ }
+
+ protected boolean hasDuplicates() {
+ boolean res = false;
+ ITableFilter[] filters = getTableFilters();
+ for (int i = 1; i < filters.length; i++) {
+ for (int j = 0; j < i; j++) {
+ if (filters[i].getExclude().equals(filters[j].getExclude()) &&
+ filters[i].getMatchCatalog().equals(filters[j].getMatchCatalog()) &&
+ filters[i].getMatchSchema().equals(filters[j].getMatchSchema()) &&
+ filters[i].getMatchName().equals(filters[j].getMatchName())) {
+ res = true;
+ break;
+ }
+ }
+ }
+ return res;
+ }
+
private TreeToTableComposite createTableFilterPart(Composite container) {
tfc = new TableFilterView(container, SWT.NULL){
@@ -91,7 +140,14 @@
}
};
- tfc.setModel(new ReverseEngineeringDefinitionImpl());
+
+ IReverseEngineeringDefinition model = new ReverseEngineeringDefinitionImpl();
+ model.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ dialogChanged();
+ }
+ });
+ tfc.setModel(model);
return tfc;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -144,6 +144,7 @@
private Button upButton = null;
private Button downButton = null;
private Button removeButton = null;
+ private Button removeAllButton = null;
private Label fillLabel = null;
private Composite composite = null;
private Label label = null;
@@ -261,12 +262,19 @@
removeButton = new Button(manipulationGroup, SWT.NONE);
removeButton.setText("Remove");
removeButton.setLayoutData(gridData3);
- removeButton
- .addSelectionListener( new org.eclipse.swt.events.SelectionAdapter() {
- public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
- doRemove();
- }
- } );
+ removeButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
+ public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
+ doRemove();
+ }
+ });
+ removeAllButton = new Button(manipulationGroup, SWT.NONE);
+ removeAllButton.setText("Remove All");
+ removeAllButton.setLayoutData(gridData3);
+ removeAllButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
+ public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
+ doRemoveAll();
+ }
+ });
}
private void createAddButtons(Composite parent) {
@@ -302,6 +310,11 @@
}
+ protected void doRemoveAll() {
+ // TODO Auto-generated method stub
+
+ }
+
protected void doMoveDown() {
// TODO Auto-generated method stub
@@ -393,5 +406,15 @@
}
+
+ public void setEnabled(boolean enabled) {
+ upButton.setEnabled(enabled);
+ downButton.setEnabled(enabled);
+ removeButton.setEnabled(enabled);
+ refreshButton.setEnabled(enabled);
+ for (int i = 0; i < addButtons.length; i++) {
+ addButtons[i].setEnabled(enabled);
+ }
+ }
} // @jve:decl-index=0:visual-constraint="10,10"
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -236,9 +236,9 @@
}
private ConsoleConfiguration askForConsoleConfiguration() {
- ChooseConsoleConfigurationDialog dialog = new ChooseConsoleConfigurationDialog(getContainer().getShell(),null);
+ ChooseConsoleConfigurationDialog dialog = new ChooseConsoleConfigurationDialog(getContainer().getShell(),"");
dialog.prompt();
- if(dialog.getSelectedConfigurationName()==null) {
+ if(StringHelper.isEmpty(dialog.getSelectedConfigurationName())) {
return null;
} else {
return KnownConfigurations.getInstance().find( dialog.getSelectedConfigurationName() ); // TODO: double check to see if an result is actually returned ?
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-02-08 12:13:33 UTC (rev 6206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-02-08 12:33:37 UTC (rev 6207)
@@ -31,6 +31,7 @@
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.hibernate.dialect.FirebirdDialect;
import org.hibernate.eclipse.console.model.IRevEngColumn;
import org.hibernate.eclipse.console.model.IRevEngGenerator;
import org.hibernate.eclipse.console.model.IRevEngPrimaryKey;
@@ -97,7 +98,7 @@
public ITableFilter createTableFilter() {
return (ITableFilter) factory.adapt((INodeNotifier) getDocument().createElement("table-filter"));
}
-
+
public void addTableFilter(ITableFilter filter) {
if ( filter instanceof TableFilterAdapter ) {
TableFilterAdapter tf = (TableFilterAdapter) filter;
@@ -151,6 +152,14 @@
return (ITableFilter[]) getTableFiltersList().toArray(new ITableFilter[0]);
}
+ public void removeAllTableFilters() {
+ List list = getTableFiltersList();
+ for (java.util.Iterator it = list.iterator(); it.hasNext(); ) {
+ ITableFilter filter = (ITableFilter)it.next();
+ removeTableFilter(filter);
+ }
+ }
+
public void removeTableFilter(ITableFilter filter) {
if ( filter instanceof TableFilterAdapter ) {
TableFilterAdapter tf = (TableFilterAdapter) filter;
@@ -346,5 +355,4 @@
return (IRevEngGenerator) factory.adapt((INodeNotifier) getDocument().createElement("generator"));
}
-
}
16 years, 7 months
JBoss Tools SVN: r6206 - in branches/jbosstools-2.0.x/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-02-08 07:13:33 -0500 (Fri, 08 Feb 2008)
New Revision: 6206
Modified:
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
Log:
JBIDE-1421 validation on duplicates
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -37,11 +37,14 @@
ITableFilter createTableFilter();
void addTableFilter(ITableFilter filter);
+
ITableFilter[] getTableFilters();
+ void removeAllTableFilters();
void removeTableFilter(ITableFilter item);
void moveTableFilterDown(ITableFilter item);
void moveTableFilterUp(ITableFilter item);
-
+
+
ITypeMapping[] getTypeMappings();
ITypeMapping createTypeMapping();
void removeTypeMapping(ITypeMapping item);
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -54,7 +54,7 @@
}
public ITableFilter createTableFilter() {
- return new TableFilterImpl();
+ return new TableFilterImpl(this);
}
List tableFilters = new ArrayList();
@@ -69,10 +69,19 @@
pcs.firePropertyChange(property, old, newValue);
}
+ protected void updateTableFilter(ITableFilter updated) {
+ firePropertyChange("tableFilter", null, updated);
+ }
+
public ITableFilter[] getTableFilters() {
return (ITableFilter[]) tableFilters.toArray(new ITableFilter[tableFilters.size()]);
}
+ public void removeAllTableFilters() {
+ tableFilters.clear();
+ firePropertyChange(TABLEFILTER_STRUCTURE, null, null);
+ }
+
public void removeTableFilter(ITableFilter item) {
tableFilters.remove(item);
firePropertyChange(TABLEFILTER_STRUCTURE, item, null);
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/TableFilterImpl.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -27,25 +27,35 @@
public class TableFilterImpl implements ITableFilter {
TableFilter tf = new TableFilter();
+ private final ReverseEngineeringDefinitionImpl revModel;
+ protected TableFilterImpl(
+ ReverseEngineeringDefinitionImpl reverseEngineeringDefinitionImpl) {
+ this.revModel = reverseEngineeringDefinitionImpl;
+ }
+
public void setExclude(Boolean exclude) {
tf.setExclude(exclude);
+ revModel.updateTableFilter(this);
}
public void setMatchCatalog(String catalog) {
tf.setMatchCatalog(catalog);
+ revModel.updateTableFilter(this);
}
public void setMatchSchema(String schema) {
tf.setMatchSchema(schema);
+ revModel.updateTableFilter(this);
}
public void setMatchName(String name) {
tf.setMatchName(name);
+ revModel.updateTableFilter(this);
}
public Boolean getExclude() {
- return tf.getExclude();
+ return tf.getExclude();
}
public String getMatchCatalog() {
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -21,11 +21,17 @@
*/
package org.hibernate.eclipse.console.wizards;
+import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.CheckboxCellEditor;
+import org.eclipse.jface.viewers.ICellEditorListener;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
@@ -38,6 +44,7 @@
import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.model.IReverseEngineeringDefinition;
import org.hibernate.eclipse.console.model.ITableFilter;
+import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.hibernate.eclipse.console.workbench.DeferredContentProvider;
import org.hibernate.eclipse.console.workbench.LazyDatabaseSchema;
import org.hibernate.eclipse.console.workbench.TableContainer;
@@ -204,6 +211,12 @@
}
}
+ protected void doRemoveAll() {
+ if(MessageDialog.openQuestion( getShell(), "Remove all filters" , "Do you want to remove all filters ?")) {
+ revEngDef.removeAllTableFilters();
+ }
+ }
+
protected void doRemove() {
int sel = rightTable.getSelectionIndex();
TableItem[] selection = rightTable.getSelection();
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterWizardPage.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -21,7 +21,13 @@
*/
package org.hibernate.eclipse.console.wizards;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ComboDialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -29,6 +35,7 @@
import org.eclipse.swt.widgets.Composite;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
+import org.hibernate.eclipse.console.model.IReverseEngineeringDefinition;
import org.hibernate.eclipse.console.model.ITableFilter;
import org.hibernate.eclipse.console.model.impl.ReverseEngineeringDefinitionImpl;
@@ -70,6 +77,13 @@
consoleConfigurationName.setItems(names);
consoleConfigurationName.doFillIntoGrid(container, 3);
+
+ IDialogFieldListener fieldlistener = new IDialogFieldListener() {
+ public void dialogFieldChanged(DialogField field) {
+ dialogChanged();
+ }
+ };
+ consoleConfigurationName.setDialogFieldListener(fieldlistener);
TreeToTableComposite tfc = createTableFilterPart( container );
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -81,8 +95,43 @@
if(selectedConfiguratonName!=null) {
consoleConfigurationName.setText(selectedConfiguratonName);
}
- }
+ dialogChanged();
+ }
+ private void updateWarningStatus(String message) {
+ setMessage(message, IMessageProvider.WARNING);
+ }
+
+ /**
+ * Ensures that contents is ok.
+ */
+ private void dialogChanged() {
+
+ if (hasDuplicates()) {
+ updateWarningStatus("Table filters contains duplicates.");
+ return;
+ }
+
+ updateWarningStatus(null);
+ }
+
+ protected boolean hasDuplicates() {
+ boolean res = false;
+ ITableFilter[] filters = getTableFilters();
+ for (int i = 1; i < filters.length; i++) {
+ for (int j = 0; j < i; j++) {
+ if (filters[i].getExclude().equals(filters[j].getExclude()) &&
+ filters[i].getMatchCatalog().equals(filters[j].getMatchCatalog()) &&
+ filters[i].getMatchSchema().equals(filters[j].getMatchSchema()) &&
+ filters[i].getMatchName().equals(filters[j].getMatchName())) {
+ res = true;
+ break;
+ }
+ }
+ }
+ return res;
+ }
+
private TreeToTableComposite createTableFilterPart(Composite container) {
tfc = new TableFilterView(container, SWT.NULL){
@@ -91,7 +140,14 @@
}
};
- tfc.setModel(new ReverseEngineeringDefinitionImpl());
+
+ IReverseEngineeringDefinition model = new ReverseEngineeringDefinitionImpl();
+ model.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ dialogChanged();
+ }
+ });
+ tfc.setModel(model);
return tfc;
}
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TreeToTableComposite.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -144,6 +144,7 @@
private Button upButton = null;
private Button downButton = null;
private Button removeButton = null;
+ private Button removeAllButton = null;
private Label fillLabel = null;
private Composite composite = null;
private Label label = null;
@@ -261,12 +262,19 @@
removeButton = new Button(manipulationGroup, SWT.NONE);
removeButton.setText("Remove");
removeButton.setLayoutData(gridData3);
- removeButton
- .addSelectionListener( new org.eclipse.swt.events.SelectionAdapter() {
- public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
- doRemove();
- }
- } );
+ removeButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
+ public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
+ doRemove();
+ }
+ });
+ removeAllButton = new Button(manipulationGroup, SWT.NONE);
+ removeAllButton.setText("Remove All");
+ removeAllButton.setLayoutData(gridData3);
+ removeAllButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
+ public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
+ doRemoveAll();
+ }
+ });
}
private void createAddButtons(Composite parent) {
@@ -302,6 +310,11 @@
}
+ protected void doRemoveAll() {
+ // TODO Auto-generated method stub
+
+ }
+
protected void doMoveDown() {
// TODO Auto-generated method stub
@@ -393,5 +406,15 @@
}
+
+ public void setEnabled(boolean enabled) {
+ upButton.setEnabled(enabled);
+ downButton.setEnabled(enabled);
+ removeButton.setEnabled(enabled);
+ refreshButton.setEnabled(enabled);
+ for (int i = 0; i < addButtons.length; i++) {
+ addButtons[i].setEnabled(enabled);
+ }
+ }
} // @jve:decl-index=0:visual-constraint="10,10"
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -236,9 +236,9 @@
}
private ConsoleConfiguration askForConsoleConfiguration() {
- ChooseConsoleConfigurationDialog dialog = new ChooseConsoleConfigurationDialog(getContainer().getShell(),null);
+ ChooseConsoleConfigurationDialog dialog = new ChooseConsoleConfigurationDialog(getContainer().getShell(),"");
dialog.prompt();
- if(dialog.getSelectedConfigurationName()==null) {
+ if(StringHelper.isEmpty(dialog.getSelectedConfigurationName())) {
return null;
} else {
return KnownConfigurations.getInstance().find( dialog.getSelectedConfigurationName() ); // TODO: double check to see if an result is actually returned ?
Modified: branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
===================================================================
--- branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-02-08 11:46:28 UTC (rev 6205)
+++ branches/jbosstools-2.0.x/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-02-08 12:13:33 UTC (rev 6206)
@@ -31,6 +31,7 @@
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.hibernate.dialect.FirebirdDialect;
import org.hibernate.eclipse.console.model.IRevEngColumn;
import org.hibernate.eclipse.console.model.IRevEngGenerator;
import org.hibernate.eclipse.console.model.IRevEngPrimaryKey;
@@ -97,7 +98,7 @@
public ITableFilter createTableFilter() {
return (ITableFilter) factory.adapt((INodeNotifier) getDocument().createElement("table-filter"));
}
-
+
public void addTableFilter(ITableFilter filter) {
if ( filter instanceof TableFilterAdapter ) {
TableFilterAdapter tf = (TableFilterAdapter) filter;
@@ -151,6 +152,14 @@
return (ITableFilter[]) getTableFiltersList().toArray(new ITableFilter[0]);
}
+ public void removeAllTableFilters() {
+ List list = getTableFiltersList();
+ for (java.util.Iterator it = list.iterator(); it.hasNext(); ) {
+ ITableFilter filter = (ITableFilter)it.next();
+ removeTableFilter(filter);
+ }
+ }
+
public void removeTableFilter(ITableFilter filter) {
if ( filter instanceof TableFilterAdapter ) {
TableFilterAdapter tf = (TableFilterAdapter) filter;
@@ -346,5 +355,4 @@
return (IRevEngGenerator) factory.adapt((INodeNotifier) getDocument().createElement("generator"));
}
-
}
16 years, 7 months
JBoss Tools SVN: r6205 - in branches/jbosstools-2.0.x: jsf/tests/org.jboss.tools.jsf.ui.test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-02-08 06:46:28 -0500 (Fri, 08 Feb 2008)
New Revision: 6205
Modified:
branches/jbosstools-2.0.x/common/tests/org.jboss.tools.common.model.ui.test/
branches/jbosstools-2.0.x/jsf/tests/org.jboss.tools.jsf.ui.test/
branches/jbosstools-2.0.x/jsf/tests/org.jboss.tools.jsf.vpe.myfaces.test/
branches/jbosstools-2.0.x/jst/tests/org.jboss.tools.jst.jsp.test/
Log:
Adding svn bin ignore
Property changes on: branches/jbosstools-2.0.x/common/tests/org.jboss.tools.common.model.ui.test
___________________________________________________________________
Name: svn:ignore
+ bin
Property changes on: branches/jbosstools-2.0.x/jsf/tests/org.jboss.tools.jsf.ui.test
___________________________________________________________________
Name: svn:ignore
+ bin
Property changes on: branches/jbosstools-2.0.x/jsf/tests/org.jboss.tools.jsf.vpe.myfaces.test
___________________________________________________________________
Name: svn:ignore
+ bin
Property changes on: branches/jbosstools-2.0.x/jst/tests/org.jboss.tools.jst.jsp.test
___________________________________________________________________
Name: svn:ignore
+ bin
16 years, 7 months
JBoss Tools SVN: r6204 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-02-08 06:35:15 -0500 (Fri, 08 Feb 2008)
New Revision: 6204
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1761
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2008-02-08 11:35:10 UTC (rev 6203)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2008-02-08 11:35:15 UTC (rev 6204)
@@ -54,7 +54,7 @@
IConsoleConfigurationLaunchConstants.FILE_MAPPINGS,
};
- static boolean isConfigurationChanged(ILaunchConfiguration config, IPath oldPath) throws CoreException{
+ public static boolean isConfigurationChanged(ILaunchConfiguration config, IPath oldPath) throws CoreException{
String attrib = null;
for (int i = 0; i < stringAttribs.length; i++) {
attrib = config.getAttribute(stringAttribs[i], (String)null);
16 years, 7 months
JBoss Tools SVN: r6203 - in trunk/hibernatetools/tests/org.hibernate.eclipse.console.test: src/org/hibernate/eclipse/console/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-02-08 06:35:10 -0500 (Fri, 08 Feb 2008)
New Revision: 6203
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsolePluginAllTests.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1761
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF 2008-02-08 11:33:46 UTC (rev 6202)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF 2008-02-08 11:35:10 UTC (rev 6203)
@@ -30,7 +30,8 @@
org.apache.ant,
org.eclipse.ui.views,
org.jboss.tools.hibernate.ui.view,
- org.eclipse.ui.editors
+ org.eclipse.ui.editors,
+ org.eclipse.debug.core
Eclipse-LazyStart: true
Bundle-Activator: org.hibernate.eclipse.console.test.HibernateConsoleTestPlugin
Eclipse-RegisterBuddy: org.hibernate.eclipse
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsolePluginAllTests.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsolePluginAllTests.java 2008-02-08 11:33:46 UTC (rev 6202)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsolePluginAllTests.java 2008-02-08 11:35:10 UTC (rev 6203)
@@ -18,6 +18,7 @@
suite.addTestSuite( PerspectiveTest.class );
suite.addTestSuite( ConsoleConfigurationTest.class );
suite.addTestSuite( JavaFormattingTest.class );
+ suite.addTestSuite( RefactoringTest.class );
suite.addTestSuite( HibernateAllMappingTests.class );
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java 2008-02-08 11:35:10 UTC (rev 6203)
@@ -0,0 +1,540 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.console.test;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchDelegate;
+import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
+import org.hibernate.eclipse.launch.core.refactoring.HibernateRefactoringUtil;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class RefactoringTest extends TestCase {
+
+ private final String[] oldPathElements = new String[]{"oldPrj","oldSrc", "oldPack", "oldHibernate.cfg.xml"};
+ private final String[] newPathElements = new String[]{"newPrj","newSrc", "newPack", "newHibernate.cfg.xml"};
+
+ private TestLaunchConfig testStrConfig = null;
+ private TestLaunchConfig testStrListConfig = null;
+ private TestLaunchConfig testNotChangedConfig = null;
+ private String oldPathStr = null;
+ private Path oldPath = null;
+
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ oldPathStr = oldPathElements[0];
+ String notChangedPathStr = oldPathElements[0] + 1;
+ for (int i = 1; i < oldPathElements.length; i++) {
+ oldPathStr += "/" + oldPathElements[i];
+ notChangedPathStr += "/" + oldPathElements[i] + 1;
+ }
+ Map testStrAttr = new HashMap();
+ Map testStrListAttr = new HashMap();
+ Map testNotChangedAttr = new HashMap();
+
+ testStrAttr.put(IConsoleConfigurationLaunchConstants.CFG_XML_FILE, oldPathStr);
+
+ testStrListAttr.put(IConsoleConfigurationLaunchConstants.FILE_MAPPINGS, Arrays.asList(new String[]{oldPathStr}));
+
+ testNotChangedAttr.put(IConsoleConfigurationLaunchConstants.CFG_XML_FILE, notChangedPathStr);
+ testNotChangedAttr.put(IConsoleConfigurationLaunchConstants.FILE_MAPPINGS, Arrays.asList(new String[]{notChangedPathStr}));
+
+ testStrConfig = new TestLaunchConfig(testStrAttr);
+ testStrListConfig = new TestLaunchConfig(testStrListAttr);
+ testNotChangedConfig = new TestLaunchConfig(testNotChangedAttr);
+ oldPath = new Path(oldPathStr);
+ }
+
+ public void testFindChanged(){
+ try {
+ assertTrue(HibernateRefactoringUtil.isConfigurationChanged(testStrConfig, oldPath));
+ assertTrue(HibernateRefactoringUtil.isConfigurationChanged(testStrListConfig, oldPath));
+ assertTrue(!HibernateRefactoringUtil.isConfigurationChanged(testNotChangedConfig, oldPath));
+ } catch (CoreException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testProjectNameChange(){
+ int segmentNum = 0;
+ try {
+ updateConfigs(generateOldPathForSegment(segmentNum), generateNewPathForSegment(segmentNum));
+ checkPaths(generateTruePathForSegment(segmentNum));
+ } catch (CoreException e) {
+ fail("Exception while ProjectNameChange refactor processing!");
+ }
+ }
+
+ public void testSrcNameChange(){
+ int segmentNum = 1;
+ try {
+ updateConfigs(generateOldPathForSegment(segmentNum), generateNewPathForSegment(segmentNum));
+ checkPaths(generateTruePathForSegment(segmentNum));
+ } catch (CoreException e) {
+ fail("Exception while SrcNameChange refactor processing!");
+ }
+ }
+
+ public void testPackNameChange(){
+ int segmentNum = 2;
+ try {
+ updateConfigs(generateOldPathForSegment(segmentNum), generateNewPathForSegment(segmentNum));
+ checkPaths(generateTruePathForSegment(segmentNum));
+ } catch (CoreException e) {
+ fail("Exception while PackNameChange refactor processing!");
+ }
+ }
+
+ public void testFileNameChange(){
+ int segmentNum = 3;
+ try {
+ updateConfigs(generateOldPathForSegment(segmentNum), generateNewPathForSegment(segmentNum));
+ checkPaths(generateTruePathForSegment(segmentNum));
+ } catch (CoreException e) {
+ fail("Exception while FileNameChange refactor processing!");
+ }
+ }
+
+ private void updateConfigs(Path oldPath, Path newPath) throws CoreException{
+ HibernateRefactoringUtil.updateLaunchConfig(testStrConfig, oldPath, newPath);
+ HibernateRefactoringUtil.updateLaunchConfig(testStrListConfig, oldPath, newPath);
+ }
+
+ private void checkPaths(Path truePath) throws CoreException{
+ String newPath = (String) testStrConfig.getNewAttribute(IConsoleConfigurationLaunchConstants.CFG_XML_FILE);
+ assertEquals(truePath, new Path(newPath));
+ newPath = (String) ((List) testStrListConfig.getNewAttribute(IConsoleConfigurationLaunchConstants.FILE_MAPPINGS)).get(0);
+ assertEquals(truePath, new Path(newPath));
+ }
+
+ private Path generateNewPathForSegment(int segmentNum){
+ assertTrue("SegmentNum is too mach.", segmentNum < oldPathElements.length);
+ String newPath = "";
+ for (int i = 0; i < segmentNum; i++) {
+ newPath += oldPathElements[i] + "/";
+ }
+ newPath += newPathElements[segmentNum];
+ return new Path(newPath);
+ }
+
+ private Path generateOldPathForSegment(int segmentNum){
+ assertTrue("SegmentNum is too mach.", segmentNum < oldPathElements.length);
+ String oldPathPart = "";
+ for (int i = 0; i <= segmentNum; i++) {
+ oldPathPart += oldPathElements[i] + "/";
+ }
+ return new Path(oldPathPart);
+ }
+
+ private Path generateTruePathForSegment(int segmentNum){
+ assertTrue("SegmentNum is too mach.", segmentNum < oldPathElements.length);
+ String newPath = "";
+ for (int i = 0; i < oldPathElements.length; i++) {
+ if (i != segmentNum){
+ newPath += oldPathElements[i] + "/";
+ } else
+ newPath += newPathElements[i] + "/";
+ }
+ return new Path(newPath);
+ }
+
+
+
+
+
+ class TestWorkingCopy implements ILaunchConfigurationWorkingCopy{
+
+ private TestLaunchConfig parent;
+
+ private Map attributes = new HashMap();
+
+ TestWorkingCopy(TestLaunchConfig parent){
+ this.parent = parent;
+ }
+
+ public void addModes(Set modes) {}
+
+ public ILaunchConfiguration doSave() throws CoreException {
+ parent.updatedAttributes.putAll(attributes);
+ return parent;
+ }
+
+ public ILaunchConfiguration getOriginal() {
+ return parent;
+ }
+
+ public ILaunchConfigurationWorkingCopy getParent() {
+ return null;
+ }
+
+ public boolean isDirty() {
+ return true;
+ }
+
+ public void removeModes(Set modes) {}
+
+ public void rename(String name) {}
+
+ public void setAttribute(String attributeName, int value) { }
+
+ public void setAttribute(String attributeName, String value) {
+ attributes.put(attributeName, value);
+ }
+
+ public void setAttribute(String attributeName, List value) {
+ attributes.put(attributeName, value);
+ }
+
+ public void setAttribute(String attributeName, Map value) {fail("Method doesn't tested");}
+
+ public void setAttribute(String attributeName, boolean value) {fail("Method doesn't tested");}
+
+ public void setAttributes(Map attributes) { fail("Method doesn't tested");}
+
+ public void setContainer(IContainer container) {fail("Method doesn't tested");}
+
+ public void setMappedResources(IResource[] resources) {fail("Method doesn't tested");}
+
+ public void setModes(Set modes) {fail("Method doesn't tested");}
+
+ public void setPreferredLaunchDelegate(Set modes, String delegateId) {fail("Method doesn't tested");}
+
+ public boolean contentsEqual(ILaunchConfiguration configuration) {
+ return false;
+ }
+
+ public ILaunchConfigurationWorkingCopy copy(String name)
+ throws CoreException {
+ fail("Method doesn't tested");
+ return null;
+ }
+
+ public void delete() throws CoreException {}
+
+ public boolean exists() {
+ return false;
+ }
+
+ public boolean getAttribute(String attributeName, boolean defaultValue)
+ throws CoreException {
+ return parent.getAttribute(attributeName, defaultValue);
+ }
+
+ public int getAttribute(String attributeName, int defaultValue)
+ throws CoreException {
+ fail("Method doesn't tested");
+ return 0;
+ }
+
+ public List getAttribute(String attributeName, List defaultValue)
+ throws CoreException {
+ return parent.getAttribute(attributeName, defaultValue);
+ }
+
+ public Set getAttribute(String attributeName, Set defaultValue)
+ throws CoreException {
+ fail("Method doesn't tested");
+ return null;
+ }
+
+ public Map getAttribute(String attributeName, Map defaultValue)
+ throws CoreException {
+ fail("Method doesn't tested");
+ return null;
+ }
+
+ public String getAttribute(String attributeName, String defaultValue)
+ throws CoreException {
+ return parent.getAttribute(attributeName, defaultValue);
+ }
+
+ public Map getAttributes() throws CoreException {
+ return attributes;
+ }
+
+ public String getCategory() throws CoreException {
+ return parent.getCategory();
+ }
+
+ public IFile getFile() {
+ return null;
+ }
+
+ public IPath getLocation() {
+ return null;
+ }
+
+ public IResource[] getMappedResources() throws CoreException {
+ return null;
+ }
+
+ public String getMemento() throws CoreException {
+ return null;
+ }
+
+ public Set getModes() throws CoreException {
+ return null;
+ }
+
+ public String getName() {
+ return null;
+ }
+
+ public ILaunchDelegate getPreferredDelegate(Set modes)
+ throws CoreException {
+ return null;
+ }
+
+ public ILaunchConfigurationType getType() throws CoreException {
+ return null;
+ }
+
+ public ILaunchConfigurationWorkingCopy getWorkingCopy()
+ throws CoreException {
+ return null;
+ }
+
+ public boolean isLocal() {
+ return false;
+ }
+
+ public boolean isMigrationCandidate() throws CoreException {
+ return false;
+ }
+
+ public boolean isReadOnly() {
+ return false;
+ }
+
+ public boolean isWorkingCopy() {
+ return false;
+ }
+
+ public ILaunch launch(String mode, IProgressMonitor monitor)
+ throws CoreException {
+ return null;
+ }
+
+ public ILaunch launch(String mode, IProgressMonitor monitor,
+ boolean build) throws CoreException {
+ return null;
+ }
+
+ public ILaunch launch(String mode, IProgressMonitor monitor,
+ boolean build, boolean register) throws CoreException {
+ return null;
+ }
+
+ public void migrate() throws CoreException {}
+
+ public boolean supportsMode(String mode) throws CoreException {
+ return false;
+ }
+
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+
+ }
+
+ class TestLaunchConfig implements ILaunchConfiguration{
+
+ private Map attributes = new HashMap();
+
+ public Map updatedAttributes = new HashMap();
+
+ // returns updated attribute
+ public Object getNewAttribute(String attributeName){
+ return updatedAttributes.get(attributeName);
+ }
+
+ TestLaunchConfig(Map attributes){
+ if (attributes != null){
+ this.attributes = attributes;
+ }
+ }
+
+ public boolean contentsEqual(ILaunchConfiguration configuration) {
+ return false;
+ }
+
+ public ILaunchConfigurationWorkingCopy copy(String name)
+ throws CoreException {
+ return null;
+ }
+
+ public void delete() throws CoreException {
+
+ }
+
+ public boolean exists() {
+ return false;
+ }
+
+ public boolean getAttribute(String attributeName, boolean defaultValue)
+ throws CoreException {
+ if (attributes.containsKey(attributeName)){
+ return (Boolean) attributes.get(attributeName);
+ } else {
+ return defaultValue;
+ }
+ }
+
+ public int getAttribute(String attributeName, int defaultValue)
+ throws CoreException {
+ if (attributes.containsKey(attributeName)){
+ return (Integer) attributes.get(attributeName);
+ } else {
+ return defaultValue;
+ }
+ }
+
+ public List getAttribute(String attributeName, List defaultValue)
+ throws CoreException {
+ if (attributes.containsKey(attributeName)){
+ return (List) attributes.get(attributeName);
+ } else {
+ return defaultValue;
+ }
+ }
+
+ public Set getAttribute(String attributeName, Set defaultValue)
+ throws CoreException {
+ return null;
+ }
+
+ public Map getAttribute(String attributeName, Map defaultValue)
+ throws CoreException {
+ return null;
+ }
+
+ public String getAttribute(String attributeName, String defaultValue)
+ throws CoreException {
+ if (attributes.containsKey(attributeName)){
+ return (String) attributes.get(attributeName);
+ } else {
+ return defaultValue;
+ }
+ }
+
+ public Map getAttributes() throws CoreException {
+ return null;
+ }
+
+ public String getCategory() throws CoreException {
+ return "Categiry";
+ }
+
+ public IFile getFile() {
+ return null;
+ }
+
+ public IPath getLocation() {
+ return null;
+ }
+
+ public IResource[] getMappedResources() throws CoreException {
+ return null;
+ }
+
+ public String getMemento() throws CoreException {
+ return null;
+ }
+
+ public Set getModes() throws CoreException {
+ return null;
+ }
+
+ public String getName() {
+ return "Test Launch Config";
+ }
+
+ public ILaunchDelegate getPreferredDelegate(Set modes)
+ throws CoreException {
+ return null;
+ }
+
+ public ILaunchConfigurationType getType() throws CoreException {
+ return null;
+ }
+
+ public ILaunchConfigurationWorkingCopy getWorkingCopy()
+ throws CoreException {
+ return new TestWorkingCopy(this);
+ }
+
+ public boolean isLocal() {
+ return false;
+ }
+
+ public boolean isMigrationCandidate() throws CoreException {
+ return false;
+ }
+
+ public boolean isReadOnly() {
+ return false;
+ }
+
+ public boolean isWorkingCopy() {
+ return false;
+ }
+
+ public ILaunch launch(String mode, IProgressMonitor monitor)
+ throws CoreException {
+ return null;
+ }
+
+ public ILaunch launch(String mode, IProgressMonitor monitor,
+ boolean build) throws CoreException {
+ return null;
+ }
+
+ public ILaunch launch(String mode, IProgressMonitor monitor,
+ boolean build, boolean register) throws CoreException {
+ return null;
+ }
+
+ public void migrate() throws CoreException {
+
+ }
+
+ public boolean supportsMode(String mode) throws CoreException {
+ return false;
+ }
+
+ public Object getAdapter(Class adapter) {
+ return null;
+ }};
+}
+
+
Property changes on: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 7 months