You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(178) |
Feb
(169) |
Mar
(286) |
Apr
(117) |
May
(98) |
Jun
(68) |
Jul
(63) |
Aug
(121) |
Sep
(88) |
Oct
(124) |
Nov
(2) |
Dec
(111) |
2007 |
Jan
(224) |
Feb
(69) |
Mar
(10) |
Apr
(72) |
May
(7) |
Jun
(21) |
Jul
(33) |
Aug
(35) |
Sep
(12) |
Oct
(22) |
Nov
(5) |
Dec
(6) |
2008 |
Jan
(2) |
Feb
(10) |
Mar
(39) |
Apr
(58) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(10) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Vance K. <va...@us...> - 2006-05-05 05:34:11
|
User: vancek Date: 06/05/04 22:34:12 cartridges/andromda-ejb3/src/site/resources/images/org/andromda/test/20/a - New directory |
From: Vance K. <va...@us...> - 2006-05-05 05:34:11
|
User: vancek Date: 06/05/04 22:34:11 cartridges/andromda-ejb3/src/site/resources/images/org/andromda/test/19/a - New directory |
From: Vance K. <va...@us...> - 2006-05-05 05:34:11
|
User: vancek Date: 06/05/04 22:34:11 cartridges/andromda-ejb3/src/site/resources/images/org/andromda/test/19 - New directory |
From: Vance K. <va...@us...> - 2006-05-05 05:33:42
|
User: vancek Date: 06/05/04 22:33:41 Modified: andromda-ejb3/src/site site.xml Log: added embeddable value object menu item Revision Changes Path 1.11 +1 -0 cartridges/andromda-ejb3/src/site/site.xml Index: site.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/site.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- site.xml 2 May 2006 02:26:23 -0000 1.10 +++ site.xml 5 May 2006 05:33:41 -0000 1.11 @@ -36,6 +36,7 @@ <item name="Manageable Entities" href="howto16.html"/> <item name="Caching and Clustering" href="howto17.html"/> <item name="Webservices" href="howto18.html"/> + <item name="Embeddable Value Objects" href="howto20.html"/> <item name="Tips & Tricks" href="tips.html"/> </menu> </body> |
From: Vance K. <va...@us...> - 2006-05-05 05:33:17
|
User: vancek Date: 06/05/04 22:33:12 Modified: andromda-ejb3/src/site/xdoc howto.xml Log: added embeddable value object link Revision Changes Path 1.14 +3 -0 cartridges/andromda-ejb3/src/site/xdoc/howto.xml Index: howto.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -r1.13 -r1.14 --- howto.xml 2 May 2006 02:24:43 -0000 1.13 +++ howto.xml 5 May 2006 05:33:12 -0000 1.14 @@ -189,6 +189,9 @@ <li><a href="howto18.html#Helpful_Hints">Helpful Hints</a></li> </ul> </li> + <li> + <a href="howto20.html">Embeddable Value Objects</a> + </li> </ul> </p> <p> |
From: Vance K. <va...@us...> - 2006-05-05 05:32:48
|
User: vancek Date: 06/05/04 22:32:49 Modified: andromda-ejb3/src/site/xdoc howto18.xml Log: added navigation to howto20 Revision Changes Path 1.2 +6 -0 cartridges/andromda-ejb3/src/site/xdoc/howto18.xml Index: howto18.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto18.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto18.xml 17 Apr 2006 14:53:06 -0000 1.1 +++ howto18.xml 5 May 2006 05:32:49 -0000 1.2 @@ -144,5 +144,11 @@ </p> </subsection> </section> + <section name="Next"> + <p> + To see how you can use embedded value objects as part of your entities, click + <a href="howto20.html">here</a>. + </p> + </section> </body> </document> |
From: Vance K. <va...@us...> - 2006-05-05 05:32:32
|
User: vancek Date: 06/05/04 22:32:32 Added: andromda-ejb3/src/site/xdoc howto20.xml Log: initial revision - embeddable value object howto Revision Changes Path 1.1 cartridges/andromda-ejb3/src/site/xdoc/howto20.xml Index: howto20.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="va...@us...">Vance Karimi</author> <title>AndroMDA - EJB3 - HowTo Embeddable Objects</title> </properties> <body> <section name="Embeddable Objects"> <p> In some cases you may want to embed plain Java objects or value objects inside your entities. These are called embedded value objects. Each persistent property of these embeddable value objects are mapped to column within the entity's table. </p> <p> The <code>@Embeddable</code> annotation is specified on the class whose instance is an embeddable value object of an entity. Only a limited number of annotations are permitted on the properties of the embeddable value object. </p> <p> A persistent property of an entity which is an instance of an embeddable value object is marked with the <code>@Embedded</code> annotation. The <code>@AttributeOverride</code> and <code>@AttributeOverrides</code> annotations can override column mappings declared in the embedded value object. </p> <p> <img src="images/org/andromda/test/20/a/uml.gif"/> </p> <p> <ul> <li class="gen">Auto-generated source that does not need manual editing</li> <li class="impl">Auto-generated source that should be edited manually</li> <li class="changed">File that is affected by the modifications applied in this section</li> </ul> </p> <p> <ul> <li class="gen"><a class="changed" href="src/org/andromda/test/howto20/a/Person.java"><code>Person.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto20/a/PersonDao.java"><code>PersonDao.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto20/a/PersonDaoBase.java"><code>PersonDaoBase.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto20/a/PersonDaoImpl.java"><code>PersonDaoImpl.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto20/a/PersonDaoException.java"><code>PersonDaoException.java</code></a></li> <li class="gen"><a class="changed" href="src/org/andromda/test/howto20/a/PersonName.java"><code>PersonName.java</code></a></li> <li class="impl"><a class="changed" href="src/org/andromda/test/howto20/a/PersonNameImpl.java"><code>PersonNameImpl.java</code></a></li> </ul> </p> <p> The cartridge provides basic support for embeddable value objects. Currently, no mapping annotations on properties of the embeddable value object are generated. This can easily be supported by modification to the <code>EJB3EmbeddedValueFacade</code> and corresponding <code>EmbeddedValue.vsl</code> template. </p> </section> </body> </document> |
From: Chad B. <cwb...@us...> - 2006-05-04 22:05:27
|
User: cwbrandon Date: 06/05/04 15:05:27 Modified: maven2/plugins pom.xml maven2/plugins/andromdanetapp pom.xml Log: fix poms Revision Changes Path 1.3 +1 -11 plugins/maven2/plugins/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/maven2/plugins/pom.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- pom.xml 4 May 2006 21:58:35 -0000 1.2 +++ pom.xml 4 May 2006 22:05:27 -0000 1.3 @@ -5,22 +5,12 @@ <artifactId>andromda-plugins</artifactId> <version>1.0-SNAPSHOT</version> </parent> - <groupId>org.andromda.plugins.plugins</groupId> - <artifactId>andromda-plugins</artifactId> - <version>1.0-SNAPSHOT</version> + <artifactId>andromda-plugins-maven2-plugins</artifactId> <packaging>pom</packaging> <name>AndroMDA Plugins</name> <description> The grouping of AndroMDApp plugins. </description> - <inceptionYear>2005</inceptionYear> - <dependencies> - <dependency> - <groupId>org.andromda</groupId> - <artifactId>andromda-core</artifactId> - <version>3.2-RC1-SNAPSHOT</version> - </dependency> - </dependencies> <modules> <module>andromdanetapp</module> </modules> 1.2 +6 -11 plugins/maven2/plugins/andromdanetapp/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/maven2/plugins/andromdanetapp/pom.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- pom.xml 5 Mar 2006 06:19:23 -0000 1.1 +++ pom.xml 4 May 2006 22:05:27 -0000 1.2 @@ -3,9 +3,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>andromda-maven-plugins</artifactId> - <groupId>org.andromda.maven.plugins</groupId> - <version>3.2-RC1-SNAPSHOT</version> + <artifactId>andromda-plugins-maven2-plugins</artifactId> + <groupId>org.andromda.plugins</groupId> + <version>1.0-SNAPSHOT</version> </parent> <groupId>org.apache.maven.plugins</groupId> <artifactId>andromdanetapp-maven-plugin</artifactId> @@ -20,12 +20,12 @@ <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>andromdapp-maven-plugin</artifactId> - <version>${pom.version}</version> + <version>3.2-RC1-SNAPSHOT</version> </dependency> <dependency> <groupId>org.andromda.andromdapp</groupId> <artifactId>andromda-andromdapp-core</artifactId> - <version>${pom.version}</version> + <version>3.2-RC1-SNAPSHOT</version> </dependency> <dependency> <groupId>org.andromda.plugins.andromdapp.projects</groupId> @@ -33,14 +33,9 @@ <version>1.0-SNAPSHOT</version> </dependency> <dependency> - <groupId>org.andromda</groupId> - <artifactId>andromda-core</artifactId> - <version>${pom.version}</version> - </dependency> - <dependency> <groupId>org.andromda.templateengines</groupId> <artifactId>andromda-templateengine-velocity</artifactId> - <version>${pom.version}</version> + <version>3.2-RC1-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> |
From: Chad B. <cwb...@us...> - 2006-05-04 21:58:38
|
User: cwbrandon Date: 06/05/04 14:58:35 Modified: maven2/plugins pom.xml Log: fix parent Revision Changes Path 1.2 +3 -3 plugins/maven2/plugins/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/maven2/plugins/pom.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- pom.xml 5 Mar 2006 06:19:22 -0000 1.1 +++ pom.xml 4 May 2006 21:58:35 -0000 1.2 @@ -1,9 +1,9 @@ <project> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.andromda</groupId> - <artifactId>andromda</artifactId> - <version>4.0-M1-SNAPSHOT</version> + <groupId>org.andromda.plugins</groupId> + <artifactId>andromda-plugins</artifactId> + <version>1.0-SNAPSHOT</version> </parent> <groupId>org.andromda.plugins.plugins</groupId> <artifactId>andromda-plugins</artifactId> |
From: Chris M. <cm...@us...> - 2006-05-04 21:16:51
|
User: cmicali Date: 06/05/04 14:13:25 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn MDASolutionManager.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/Installer AndroMDA VS2005 Add-In Setup.exe Log: Revision Changes Path 1.7 +1 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs Index: MDASolutionManager.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- MDASolutionManager.cs 4 May 2006 18:55:35 -0000 1.6 +++ MDASolutionManager.cs 4 May 2006 21:13:24 -0000 1.7 @@ -323,7 +323,7 @@ } else { - AddInUtils.ShowWarning("The schema export project for this solution could not be found.\nPlease ensure the following variables are set correctly in mda\\project.properties\n\nmaven.andromda.schemaexport.available: true\nmaven.andromda.schemaexport.dir: <path to schema export project>"); + AddInUtils.ShowWarning("The schema export project for this solution could not be found.\nPlease ensure the following variables are set correctly in mda\\project.properties\n\nmaven.andromda.schemaexport.available=true\nmaven.andromda.schemaexport.dir=<path to schema export project>"); } } catch (Exception e) No revision No revision No revision No revision |
From: Chris M. <cm...@us...> - 2006-05-04 18:55:36
|
User: cmicali Date: 06/05/04 11:55:35 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn AddInSettings.cs MDASolutionManager.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/Installer AndroMDA VS2005 Add-In Setup.exe Log: - Changed hide schema export button default to 'false' - Fixed bug with resync that was causing the filehash to be read improperly - Updated install package with new build Revision Changes Path 1.5 +1 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AddInSettings.cs Index: AddInSettings.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AddInSettings.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- AddInSettings.cs 3 May 2006 20:23:05 -0000 1.4 +++ AddInSettings.cs 4 May 2006 18:55:35 -0000 1.5 @@ -198,7 +198,7 @@ public bool HideSchemaExportButtonIfProjectUnavailable { - get { return m_settings.GetBool("ADMAHideSCEX", true); } + get { return m_settings.GetBool("ADMAHideSCEX", false); } set { m_settings.SetBool("ADMAHideSCEX", value); } } 1.6 +2 -2 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs Index: MDASolutionManager.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- MDASolutionManager.cs 3 May 2006 20:23:05 -0000 1.5 +++ MDASolutionManager.cs 4 May 2006 18:55:35 -0000 1.6 @@ -446,7 +446,7 @@ m_commonProject.ManualPath, m_commonProject.Name); - m_commonProject.FileListHashCodeTarget= ResyncFolder(m_commonProject.FileListHashCodeSrc, + m_commonProject.FileListHashCodeTarget= ResyncFolder(m_commonProject.FileListHashCodeTarget, m_commonProject.GeneratedPathProjectItem, m_commonProject.GeneratedPath, m_commonProject.Name); @@ -456,7 +456,7 @@ m_coreProject.ManualPath, m_coreProject.Name); - m_coreProject.FileListHashCodeTarget = ResyncFolder(m_coreProject.FileListHashCodeSrc, + m_coreProject.FileListHashCodeTarget = ResyncFolder(m_coreProject.FileListHashCodeTarget, m_coreProject.GeneratedPathProjectItem, m_coreProject.GeneratedPath, m_coreProject.Name); No revision No revision No revision No revision |
From: Chris M. <cm...@us...> - 2006-05-04 12:04:26
|
User: cmicali Date: 06/05/04 05:04:05 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn/Installer AndroMDA VS2005 Add-In Setup.exe Log: Revision Changes Path No revision No revision No revision No revision |
From: Vance K. <va...@us...> - 2006-05-04 02:48:41
|
User: vancek Date: 06/05/03 19:48:36 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBeanBase.vsl Log: changed dao references to private visibility and added getter accessor. Revision Changes Path 1.3 +16 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanBase.vsl Index: SessionBeanBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanBase.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- SessionBeanBase.vsl 24 Apr 2006 02:31:02 -0000 1.2 +++ SessionBeanBase.vsl 4 May 2006 02:48:36 -0000 1.3 @@ -129,7 +129,7 @@ * Inject DAO ${daoReference.daoName} */ @javax.annotation.EJB - protected ${daoReference.fullyQualifiedDaoName} $stringUtils.uncapitalize(${daoReference.daoName}); + private ${daoReference.fullyQualifiedDaoName} $stringUtils.uncapitalize(${daoReference.daoName}); #**##end #end #set ($mdbReferences = $service.messageDrivenReferences) @@ -287,6 +287,21 @@ #* *##end #**##end #end +#if (!$entityReferences.empty) + + // ------ DAO Getters -------- +#**##foreach ($daoDependency in $entityReferences) +#* *##set ($daoReference = $daoDependency.targetElement) + + /** + * Get the injected DAO ${daoReference.daoName} + */ + protected $daoReference.fullyQualifiedDaoName ${daoDependency.daoGetterName}() + { + return this.$stringUtils.uncapitalize(${daoReference.daoName}); + } +#**##end +#end #set ($operations = $service.businessOperations) #if (!$operations.empty) |
From: Vance K. <va...@us...> - 2006-05-04 02:46:53
|
User: vancek Date: 06/05/03 19:46:52 Modified: andromda-ejb3/src/main/resources/templates/ejb3 DaoLocal.vsl Log: added composite PK support to load and remove methods. support for finder methods to execute queries without returning object(s) ie delete and updates. Revision Changes Path 1.3 +23 -11 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoLocal.vsl Index: DaoLocal.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoLocal.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- DaoLocal.vsl 30 Apr 2006 01:47:44 -0000 1.2 +++ DaoLocal.vsl 4 May 2006 02:46:52 -0000 1.3 @@ -95,9 +95,16 @@ #set ($argumentName = $stringUtils.uncapitalize($entity.name)) /** * Loads an instance of $entity.fullyQualifiedEntityName from the persistent store. +#if ($entity.compositePrimaryKeyPresent) +#**##foreach ($identifier in $entity.identifers) + * @param $identifer.name identifier part of the composite PK of the entity to load. +#**##end +#else + * @param $identifier.name the identifier of the entity to load. +#end * @throws ${entity.fullyQualifiedDaoDefaultExceptionName} */ - public $rootEntityType load($identifier.type.fullyQualifiedName $identifier.name) + public $rootEntityType load(#foreach ($identifier in $entity.identifiers)$identifier.type.fullyQualifiedName $identifier.name#if ($velocityCount != $entity.identifiers.size()), #end#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName}; /** @@ -110,11 +117,17 @@ * not occur. * </p> * +#if ($entity.compositePrimaryKeyPresent) +#**##foreach ($identifier in $entity.identifers) + * @param $identifer.name identifier part of the composite PK of the entity to load. +#**##end +#else * @param $identifier.name the identifier of the entity to load. +#end * @return either the entity or the object transformed from the entity. * @throws ${entity.fullyQualifiedDaoDefaultExceptionName} */ - public Object load(int transform, $identifier.type.fullyQualifiedName $identifier.name) + public Object load(int transform,#foreach ($identifier in $entity.identifiers) $identifier.type.fullyQualifiedName $identifier.name#if ($velocityCount != $entity.identifiers.size()),#end#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName}; /** @@ -300,7 +313,7 @@ * <code>identifier</code> from the persistent store. * @throws ${entity.fullyQualifiedDaoDefaultExceptionName} */ - public void remove($identifier.type.fullyQualifiedName $identifier.name) + public void remove(#foreach ($identifier in $entity.identifiers)$identifier.type.fullyQualifiedName $identifier.name#if ($velocityCount != $entity.identifiers.size()), #end#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName}; /** @@ -315,11 +328,10 @@ /** $operation.getDocumentation(" * ") */ -#**##if ($operation.exceptionsPresent) $operation.visibility $returnType $operation.signature +#**##if ($operation.exceptionsPresent) throws $operation.exceptionList, ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##else - $operation.visibility $returnType $operation.signature throws ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##end @@ -330,11 +342,11 @@ * argument allows you to override the query string defined in {@link #${operation.getSignature(false)}}. * </p> */ -#**##if ($operation.exceptionsPresent) + $operation.visibility $returnType ${operation.name}(String queryString#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) +#**##if ($operation.exceptionsPresent) throws $operation.exceptionList, ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##else - $operation.visibility $returnType ${operation.name}(String queryString#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##end @@ -352,11 +364,11 @@ * not occur. * </p> */ + + $operation.visibility#if ($operation.returnTypePresent) $returnType#else void#end ${operation.name}(int transform#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) #**##if ($operation.exceptionsPresent) - $operation.visibility $returnType ${operation.name}(int transform#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) throws $operation.exceptionList, ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##else - $operation.visibility $returnType ${operation.name}(int transform#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##end @@ -367,11 +379,11 @@ * argument allows you to override the query string defined in {@link #${operation.name}(int#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end)}. * </p> */ + + $operation.visibility#if ($operation.returnTypePresent) $returnType#else void#end ${operation.name}(int transform, String queryString#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) #**##if ($operation.exceptionsPresent) - $operation.visibility $returnType ${operation.name}(int transform, String queryString#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) throws $operation.exceptionList, ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##else - $operation.visibility $returnType ${operation.name}(int transform, String queryString#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##end |
From: Vance K. <va...@us...> - 2006-05-04 02:44:55
|
User: vancek Date: 06/05/03 19:44:53 Modified: andromda-ejb3/src/main/resources/templates/ejb3 DaoBase.vsl Log: added composite PK support to load and remove methods. support for finder methods to execute queries without returning object(s) ie delete and updates. Revision Changes Path 1.5 +65 -37 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoBase.vsl Index: DaoBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoBase.vsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- DaoBase.vsl 2 May 2006 01:57:47 -0000 1.4 +++ DaoBase.vsl 4 May 2006 02:44:53 -0000 1.5 @@ -79,27 +79,32 @@ } #end -#set ($identifier = $entity.identifiers.iterator().next()) +#if (!$entity.compositePrimaryKeyPresent) +#**##set ($identifier = $entity.identifiers.iterator().next()) +#end #set ($argumentName = $stringUtils.uncapitalize($entity.name)) /** - * @see ${entity.fullyQualifiedDaoName}#load(int, $identifier.type.fullyQualifiedName) + * @see ${entity.fullyQualifiedDaoName}#load(int,#foreach($identifier in $entity.identifers) $identifier.type.fullyQualifiedName#if ($velocityCount != $entity.identifiers.size()),#end#end) */ - public Object load(final int transform, final $identifier.type.fullyQualifiedName $identifier.name) + public Object load(final int transform,#foreach($identifier in $entity.identifiers) final $identifier.type.fullyQualifiedName $identifier.name#if ($velocityCount != $entity.identifiers.size()),#end#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName} { -#set ($argument = $identifier.name) -#if($identifier.type.primitive) -#**##set ($argument = "new ${identifier.type.wrapperName}(${identifier.name})") -#else - if ($argument == null) +#foreach ($identifier in $entity.identifiers) +#**##if(!$identifier.type.primitive) + if ($identifier.name == null) { throw new IllegalArgumentException( - "${entity.name}.load - '$argument' can not be null"); + "${entity.name}.load - '$identifier.name' can not be null"); } +#**##end #end try { - final Object entity = (${entity.fullyQualifiedEntityName})emanager.find(${entity.fullyQualifiedEntityName}.class, $argument); +#if ($entity.compositePrimaryKeyPresent) + final Object entity = (${entity.fullyQualifiedEntityName})emanager.find(${entity.fullyQualifiedEntityName}.class, new ${entity.fullyQualifiedEntityCompositePrimaryKeyName}(#foreach ($identifier in $entity.identifiers)#if($identifier.type.primitive) new ${identifier.type.wrapperName}(${identifier.name})#else $identifier.name#end#if ($velocityCount != $entity.identifiers.size()),#end#end)); +#else + final Object entity = (${entity.fullyQualifiedEntityName})emanager.find(${entity.fullyQualifiedEntityName}.class, $identifier.name); +#end return transformEntity(transform, ($entity.fullyQualifiedName)entity); } catch (Exception ex) @@ -109,12 +114,12 @@ } /** - * @see ${entity.fullyQualifiedDaoName}#load($identifier.type.fullyQualifiedName) + * @see ${entity.fullyQualifiedDaoName}#load(#foreach($identifier in $entity.identifers) $identifier.type.fullyQualifiedName#if ($velocityCount != $entity.identifiers.size()),#end#end) */ - public $rootEntityType load($identifier.type.fullyQualifiedName $identifier.name) + public $rootEntityType load(#foreach($identifier in $entity.identifiers) final $identifier.type.fullyQualifiedName $identifier.name#if ($velocityCount != $entity.identifiers.size()),#end#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName} { - return ($entity.fullyQualifiedEntityName)this.load($entity.daoNoTransformationConstantName, $identifier.name); + return ($entity.fullyQualifiedEntityName)this.load($entity.daoNoTransformationConstantName,#foreach($identifier in $entity.identifiers) $identifier.name#if ($velocityCount != $entity.identifiers.size()),#end#end); } /** @@ -368,22 +373,25 @@ } /** - * @see ${entity.fullyQualifiedDaoName}#remove($identifier.type.fullyQualifiedName) + * @see ${entity.fullyQualifiedDaoName}#remove(#foreach ($identifier in $entity.identifiers)$identifier.type.fullyQualifiedName#if ($velocityCount != $entity.identifiers.size()), #end#end) */ - public void remove($identifier.type.fullyQualifiedName $identifier.name) + public void remove(#foreach ($identifier in $entity.identifiers)$identifier.type.fullyQualifiedName $identifier.name#if ($velocityCount != $entity.identifiers.size()), #end#end) throws ${entity.fullyQualifiedDaoDefaultExceptionName} { -#set ($argument = $identifier.name) -#if($identifier.type.primitive) -#**##set ($argument = "new ${identifier.type.wrapperName}(${identifier.name})") -#else - if ($argument == null) +#foreach ($identifier in $entity.identifiers) +#**##if(!$identifier.type.primitive) + if ($identifier.name == null) { throw new IllegalArgumentException( "${entity.name}.remove - '$identifier.name' can not be null"); } +#**##end +#end +#if (!$entity.compositePrimaryKeyPresent) +#**##set ($loadCall = "this.load($identifier.name)") +#else +#**##set ($loadCall = "this.load(#foreach ($identifier in $entity.identifiers)$identifier.name#if ($velocityCount != $entity.identifiers.size()), #end#end)") #end -#set ($loadCall = "this.load($identifier.name)") #if ($entity.generalization) #**##set ($loadCall = "($entity.fullyQualifiedEntityName)${loadCall}") #end @@ -438,10 +446,14 @@ #**##end { #**##set ($finderCall = "this.${finder.name}($entity.daoNoTransformationConstantName#if(!$finder.arguments.empty), ${finder.argumentNames}#end);") +#**##if ($finder.returnTypePresent) #**##if (!$finder.returnType.collectionType) #* *##set ($finderCall = "($returnType)$finderCall") #**##end return $finderCall +#**##else + $finderCall +#**##end } /** @@ -455,10 +467,14 @@ #**##end { #**##set ($finderCall = "this.${finder.name}($entity.daoNoTransformationConstantName, queryString#if(!$finder.arguments.empty), ${finder.argumentNames}#end);") +#**##if ($finder.returnTypePresent) #**##if (!$finder.returnType.collectionType) #* *##set ($finderCall = "($returnType)$finderCall") #**##end return $finderCall +#**##else + $finderCall +#**##end } #**##if (!$finder.returnType.collectionType) @@ -467,7 +483,7 @@ /** * @see ${entity.fullyQualifiedDaoName}#${finder.name}(int#if(!$finder.arguments.empty), ${finder.argumentTypeNames}#end) */ - $finder.visibility $returnType ${finder.name}(final int transform#if(!$finder.arguments.empty), ${finder.getTypedArgumentList('final')}#end) + $finder.visibility#if ($finder.returnTypePresent) $returnType#else void#end ${finder.name}(final int transform#if(!$finder.arguments.empty), ${finder.getTypedArgumentList('final')}#end) #**##if ($finder.exceptionsPresent) throws $finder.exceptionList, ${entity.fullyQualifiedDaoDefaultExceptionName} #**##else @@ -513,6 +529,7 @@ #* *##if ($finder.useQueryCache && !$entity.useDefaultCacheRegion) queryObject.setHint("org.hibernate.cacheRegion", "/${entity.fullyQualifiedNamePath}_${finder.name}"); #* *##end +#* *##if ($finder.returnTypePresent) #* *##if ($finder.returnType.setType) java.util.Set results = new java.util.LinkedHashSet(queryObject.getResultList()); transformEntities(transform, results); @@ -522,24 +539,31 @@ transformEntities(transform, results); return results; #* *##else - $finder.returnType.fullyQualifiedName result = ($finder.returnType.fullyQualifiedName)queryObject.getSingleResult(); + Object result = queryObject.getSingleResult(); result = transformEntity(transform, ($entity.fullyQualifiedName)result); return result; #* *##end +#* *##else + queryObject.executeUpdate(); +#* *##end } catch (Exception ex) { throw new ${entity.fullyQualifiedDaoDefaultExceptionName}(ex); } #**##else +#* *##if ($finder.returnTypePresent) return this.${finder.name}(transform, "$finder.getQuery($entity)"#if(!$finder.arguments.empty), ${finder.argumentNames}#end); +#* *##else + this.${finder.name}(transform, "$finder.getQuery($entity)"#if(!$finder.arguments.empty), ${finder.argumentNames}#end); +#* *##end #**##end } /** * @see ${entity.fullyQualifiedDaoName}#${finder.name}(int, java.lang.String#if(!$finder.arguments.empty), ${finder.argumentTypeNames}#end) */ - $finder.visibility $returnType ${finder.name}(final int transform, final java.lang.String queryString#if(!$finder.arguments.empty), ${finder.getTypedArgumentList('final')}#end) + $finder.visibility#if ($finder.returnTypePresent) $returnType#else void#end ${finder.name}(final int transform, final java.lang.String queryString#if(!$finder.arguments.empty), ${finder.getTypedArgumentList('final')}#end) #**##if ($finder.exceptionsPresent) throws ${finder.exceptionList}, ${entity.fullyQualifiedDaoDefaultExceptionName} #**##else @@ -584,6 +608,7 @@ #**##if ($finder.useQueryCache && !$entity.useDefaultCacheRegion) queryObject.setHint("org.hibernate.cacheRegion", "/${entity.fullyQualifiedNamePath}_${finder.name}"); #**##end +#**##if ($finder.returnTypePresent) #**##if ($finder.returnType.setType) java.util.Set results = new java.util.LinkedHashSet(queryObject.getResultList()); transformEntities(transform, results); @@ -593,10 +618,13 @@ transformEntities(transform, results); return results; #**##else - $finder.returnType.fullyQualifiedName result = ($finder.returnType.fullyQualifiedName)queryObject.getSingleResult(); + Object result = queryObject.getSingleResult(); result = transformEntity(transform, ($entity.fullyQualifiedName)result); return result; #**##end +#**##else + queryObject.executeUpdate(); +#**##end } catch (Exception ex) { |
From: Naresh B. <nb...@us...> - 2006-05-04 01:33:31
|
User: nbhatia Date: 06/05/03 18:33:27 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn AndroMDA VS2005 Add-In Readme.rtf Log: Minor clarifications. Revision Changes Path No revision No revision No revision No revision |
From: Chris M. <cm...@us...> - 2006-05-03 20:48:54
|
User: cmicali Date: 06/05/03 13:48:52 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn AndroMDA VS2005 Add-In Readme.rtf etc/andromda-dotnet/AndroMDA.VS80AddIn/Installer AndroMDA VS2005 Add-In Setup.exe Log: - Updated readme with better info - Updated install package with new readme and better compressor (LZMA/Solid) Revision Changes Path No revision No revision No revision No revision No revision No revision No revision No revision |
From: Chris M. <cm...@us...> - 2006-05-03 20:23:14
|
User: cmicali Date: 06/05/03 13:23:06 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn AndroMDA VS2005 Add-In Readme.rtf etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn AddInSettings.cs MDASolutionManager.cs MavenProxy.cs WizardSolutionProcessor.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands RunSchemaExportCommand.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs AboutDialog.cs AboutDialog.designer.cs AboutOptionsPage.cs AboutOptionsPage.designer.cs AboutOptionsPage.resx ExternalToolsOptionsPage.cs ExternalToolsOptionsPage.designer.cs ExternalToolsOptionsPage.resx GeneralOptionsPage.Designer.cs GeneralOptionsPage.cs MDASolutionWizard.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Utils AsyncOperation.cs VSExternalToolProxy.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/Installer AndroMDA VS2005 Add-In Setup.exe Log: - Cleaned up about dialog - Removed maven path option since it is no longer used (MAVEN_HOME variable i used instead) - Updated WizardSolutionProcessor to use AsyncOperation instead of a custom thread - Added some comments Revision Changes Path No revision No revision No revision No revision 1.4 +21 -53 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AddInSettings.cs Index: AddInSettings.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AddInSettings.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- AddInSettings.cs 2 May 2006 04:47:10 -0000 1.3 +++ AddInSettings.cs 3 May 2006 20:23:05 -0000 1.4 @@ -31,6 +31,8 @@ #endregion + #region Constructors + public AddInSettings(DTE applicationObject) { m_applicationObject = applicationObject; @@ -41,15 +43,6 @@ FirstRun = false; AddInBuild = ADDIN_SETTINGS_VERSION; ResyncIgnoreList = "CVS;.cvsignore;.svn;.svnignore"; - string mavenHome = System.Environment.GetEnvironmentVariable("MAVEN_HOME"); - if (mavenHome != string.Empty) - { - MavenExecutablePath = mavenHome + "\\bin\\maven.bat"; - } - else - { - MavenExecutablePath = "maven.bat"; - } MavenUseOfflineMode = true; MavenCleanFirst = true; MavenUseCustomCommandLine = false; @@ -60,6 +53,8 @@ } } + #endregion + #region General settings public bool FirstRun @@ -107,12 +102,6 @@ #region Maven settings - public string MavenExecutablePath - { - get { return m_settings["AMDAMavenPath"]; } - set { m_settings["AMDAMavenPath"] = value; } - } - public bool MavenUseOfflineMode { get { return m_settings.GetBool("AMDAMavenOffln"); } @@ -207,44 +196,21 @@ set { m_settings.SetBool("ADMAShowSCEX", value); } } - /* - private string GetCommandSetting(AddInCommandBase command, string setting) - { - setting = "AMDAC" + command.Name + setting; - return m_settings.GetSetting(setting); - } - - private void SetCommandSetting(AddInCommandBase command, string setting, string value) - { - setting = "AMDAC" + command.Name + setting; - m_settings.SetSetting(setting, value); - } - - public bool GetCommandIsVisible(AddInCommandBase command) - { - string setting = GetCommandSetting(command, "Vs"); - if (setting == string.Empty) - { - return true; - } - else + public bool HideSchemaExportButtonIfProjectUnavailable { - return bool.Parse(setting); - } + get { return m_settings.GetBool("ADMAHideSCEX", true); } + set { m_settings.SetBool("ADMAHideSCEX", value); } } - public void SetCommandIsVisible(AddInCommandBase command, bool value) - { - SetCommandSetting(command, "Vs", value.ToString()); - } - */ - #endregion + #region Helper methods + public bool IsInIgnoreList(string file) { return IsInIgnoreList(file, true); } + public bool IsInIgnoreList(string file, bool stripPath) { // Get the list of files to ignore @@ -260,5 +226,7 @@ return false; } + #endregion + } } 1.5 +36 -17 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs Index: MDASolutionManager.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- MDASolutionManager.cs 2 May 2006 21:33:42 -0000 1.4 +++ MDASolutionManager.cs 3 May 2006 20:23:05 -0000 1.5 @@ -39,6 +39,7 @@ private MDAProject m_coreProject = null; private MDAProject m_commonProject = null; + private MDAProject m_schemaExportProject = null; private bool m_restartBuild = false; private Mutex m_restartBuildMutex = new Mutex(false); @@ -78,6 +79,11 @@ get { return m_commonProject; } } + public MDAProject SchemaExportProject + { + get { return m_schemaExportProject; } + } + public bool IsEnabled { get { return m_enabled && m_applicationObject.Solution.IsOpen; } @@ -148,6 +154,14 @@ } } + public bool IsSchemaExportProjectAvailable + { + get + { + return m_projectProperties["maven.andromda.schemaexport.available"].ToLower().Trim() == "true"; + } + } + #endregion public MDASolutionManager(DTE applicationObject, AddInSettings addInSettings) @@ -183,6 +197,7 @@ m_coreProject = null; m_commonProject = null; + m_schemaExportProject = null; // Iterate through the projects and search for the core and common directories foreach (Project p in m_applicationObject.Solution.Projects) @@ -209,6 +224,14 @@ string generatedPath = m_projectProperties.GetPath("maven.andromda.common.generated.dir"); m_commonProject = new MDAProject(p, FileUtils.GetFilename(projectPath), projectPath, generatedPath, string.Empty); } + + // Check if the current (schemaexport) directory is the same as the project directory + if (IsSchemaExportProjectAvailable && FileUtils.CompareDirectories(projectPath, m_projectProperties.GetPath("maven.andromda.schemaexport.dir"))) + { + // if so this is the common project + m_schemaExportProject = new MDAProject(p, FileUtils.GetFilename(projectPath), projectPath, string.Empty, string.Empty); + } + } catch (NotImplementedException) { @@ -286,26 +309,22 @@ { try { - if (m_projectProperties["maven.andromda.schemaexport.available"].ToLower().Trim() == "true") + if (IsSchemaExportProjectAvailable && m_schemaExportProject != null) { - string schemaExportProjectPath = FileUtils.CleanDirectory(m_projectProperties["maven.andromda.schemaexport.dir"]); string solutionName = VSSolutionUtils.GetSolutionName(m_applicationObject.Solution); - Project schemaExportProject = VSSolutionUtils.FindProjectByDirectory(schemaExportProjectPath, m_applicationObject.Solution); - if (schemaExportProject != null) - { - string schamaExportName = FileUtils.GetFilename(schemaExportProject.FileName).Replace(".csproj", string.Empty); // Activate the solution explorer window m_applicationObject.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate(); // Grab the UIHierarchy object for the schema export project - UIHierarchyItem item = ((UIHierarchy)m_applicationObject.ActiveWindow.Object).GetItem(solutionName + "\\" + schamaExportName); + UIHierarchyItem item = ((UIHierarchy)m_applicationObject.ActiveWindow.Object).GetItem(solutionName + "\\" + m_schemaExportProject.Name); // Select the project item.Select(vsUISelectionType.vsUISelectionTypeSelect); // Execute the Debug.StartNewInstance command m_applicationObject.ExecuteCommand("ClassViewContextMenus.ClassViewProject.Debug.Startnewinstance", string.Empty); - return; } + else + { + AddInUtils.ShowWarning("The schema export project for this solution could not be found.\nPlease ensure the following variables are set correctly in mda\\project.properties\n\nmaven.andromda.schemaexport.available: true\nmaven.andromda.schemaexport.dir: <path to schema export project>"); } - AddInUtils.ShowWarning("The schema export for this project could not be found.\nPlease ensure the following variables are set correctly in mda\\project.properties\n\nmaven.andromda.schemaexport.available: true\nmaven.andromda.schemaexport.dir: <path to schema export project>"); } catch (Exception e) { 1.3 +1 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MavenProxy.cs Index: MavenProxy.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MavenProxy.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- MavenProxy.cs 28 Apr 2006 04:40:37 -0000 1.2 +++ MavenProxy.cs 3 May 2006 20:23:05 -0000 1.3 @@ -106,7 +106,7 @@ this.OutputWindowPane.Clear(); this.OutputWindowPane.Activate(); - this.ExecutablePath = m_addInSettings.MavenExecutablePath; + //this.ExecutablePath = m_addInSettings.MavenExecutablePath; if (m_addInSettings.MavenUseCustomCommandLine) { 1.2 +81 -48 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/WizardSolutionProcessor.cs Index: WizardSolutionProcessor.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/WizardSolutionProcessor.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- WizardSolutionProcessor.cs 2 May 2006 04:47:10 -0000 1.1 +++ WizardSolutionProcessor.cs 3 May 2006 20:23:05 -0000 1.2 @@ -6,8 +6,8 @@ using System; using System.IO; -using System.Collections.Generic; using System.Text; +using System.ComponentModel; using System.Threading; using EnvDTE; @@ -21,13 +21,16 @@ namespace AndroMDA.VS80AddIn { - public class WizardSolutionProcessor + /// <summary> + /// This class will process an existing solution and add + /// AndroMDA support. This is used solely by the MDA Solution Wizard. + /// </summary> + public class WizardSolutionProcessor : AsyncOperation { #region Member variables private DTE m_applicationObject = null; - private System.Threading.Thread m_thread = null; public delegate void SolutionProcessingCompleteHandler(bool success, string errorMessage); public delegate void SolutionProcessingStatusHandler(string status); @@ -39,36 +42,27 @@ #endregion - public WizardSolutionProcessor(ConfigFile config, DTE applicationObject) + #region Constructors + + public WizardSolutionProcessor(ConfigFile config, DTE applicationObject) : base() { m_configuration = config; m_applicationObject = applicationObject; } - private void AddToStatus(string message) - { - if (OnSolutionProcessingStatus != null) - { - if (OnSolutionProcessingStatus.Target is System.Windows.Forms.Control) + public WizardSolutionProcessor(ISynchronizeInvoke target, ConfigFile config, DTE applicationObject) : base(target) { - System.Windows.Forms.Control target = OnSolutionProcessingStatus.Target as System.Windows.Forms.Control; - target.BeginInvoke(OnSolutionProcessingStatus, new Object[] { message }); - } - else - { - OnSolutionProcessingStatus(message); - } - } - System.Threading.Thread.Sleep(100); + m_configuration = config; + m_applicationObject = applicationObject; } - public void EnableSolutionForMDA() - { - m_thread = new System.Threading.Thread(new ThreadStart(this.UpdateSolutionThread)); - m_thread.Start(); - } + #endregion - private void UpdateSolutionThread() + /// <summary> + /// The base class calls this method on a worker + /// thread when the Start method is called. + /// </summary> + protected override void DoWork() { bool success = false; string errorMessage = string.Empty; @@ -83,23 +77,13 @@ } finally { - // Fire the processing complete event - if (OnSolutionProcessingComplete != null) - { - if (OnSolutionProcessingComplete.Target is System.Windows.Forms.Control) - { - System.Windows.Forms.Control target = OnSolutionProcessingComplete.Target as System.Windows.Forms.Control; - target.BeginInvoke(OnSolutionProcessingComplete, new Object[] { success, errorMessage }); - } - else - { - OnSolutionProcessingComplete(success, errorMessage); - } - } + FireAsync(OnSolutionProcessingComplete, new Object[] { success, errorMessage }); } } - + /// <summary> + /// The actually processing happens in this method + /// </summary> private void UpdateSolution() { string basePath = m_configuration["solution.path"]; @@ -120,6 +104,7 @@ AddToStatus("Using existing common project " + m_configuration["projects.common.name"] + "..."); commonProject = VSSolutionUtils.FindProjectByName(m_configuration["projects.common.name"], m_applicationObject.Solution); } + //CreateDirectory(basePath + "\\" + m_configuration["projects.common.dir"] + "\\src"); //CreateDirectory(basePath + "\\" + m_configuration["projects.common.dir"] + "\\target"); commonProject.ProjectItems.AddFolder("src", Constants.vsProjectItemKindPhysicalFolder); @@ -228,15 +213,37 @@ } + #region Helper methods + + /// <summary> + /// Adds a line of text to the status window + /// </summary> + /// <param name="message">The message.</param> + private void AddToStatus(string message) + { + FireAsync(OnSolutionProcessingStatus, new Object[] { message }); + System.Threading.Thread.Sleep(0); + } + + /// <summary> + /// Adds a project reference to a project in the solution + /// </summary> + /// <param name="destination">The destination project.</param> + /// <param name="projectToReference">The project to reference.</param> private void AddProjectReference(Project destination, Project projectToReference) { VSProject proj = destination.Object as VSProject; proj.References.AddProject(projectToReference); } - private void AddBinaryReferences(Project p, string basePath) + /// <summary> + /// Adds a binary reference to a project in the solution. + /// </summary> + /// <param name="p">The destination project</param> + /// <param name="basePath">The base path.</param> + private void AddBinaryReferences(Project destination, string basePath) { - VSProject proj = p.Object as VSProject; + VSProject proj = destination.Object as VSProject; proj.References.Add(basePath + "\\Lib\\AndroMDA.NHibernateSupport.dll"); proj.References.Add(basePath + "\\Lib\\Castle.DynamicProxy.dll"); proj.References.Add(basePath + "\\Lib\\HashCodeProvider.dll"); @@ -247,6 +254,10 @@ proj.References.Add(basePath + "\\Lib\\NHibernate.Nullables2.dll"); } + /// <summary> + /// Creates a directory + /// </summary> + /// <param name="directoryName">Name of the directory.</param> private void CreateDirectory(string directoryName) { if (System.IO.Directory.Exists(directoryName)) @@ -267,6 +278,11 @@ } } + /// <summary> + /// Parses and resolves all variables in a string + /// </summary> + /// <param name="content">The string to parse.</param> + /// <returns></returns> private string ParseVariables(string content) { foreach (string key in m_configuration.Keys) @@ -280,6 +296,11 @@ return content; } + /// <summary> + /// Writes a file to disk. This will call ParseVariables() on the content. + /// </summary> + /// <param name="filePath">The file to which to write.</param> + /// <param name="fileContent">The content to write to the file.</param> private void WriteFile(string filePath, string fileContent) { if (System.IO.File.Exists(filePath)) @@ -295,6 +316,12 @@ sw.Close(); } + /// <summary> + /// Writes content to a file into a ZIP file + /// </summary> + /// <param name="fileNameInZip">The file name in zip.</param> + /// <param name="destinationFile">The destination zip file.</param> + /// <param name="fileContent">Content of the file.</param> private void WriteCompressedFile(string fileNameInZip, string destinationFile, string fileContent) { if (System.IO.File.Exists(destinationFile)) @@ -328,6 +355,11 @@ zip.Close(); } + /// <summary> + /// Writes a binary file to disk. + /// </summary> + /// <param name="filePath">The file to which to write.</param> + /// <param name="fileContent">The content to write to the file.</param> private void WriteFile(string filePath, Byte[] fileContent) { if (System.IO.File.Exists(filePath)) @@ -343,6 +375,7 @@ fs.Close(); } + #endregion } } 1.3 +1 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/RunSchemaExportCommand.cs Index: RunSchemaExportCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/RunSchemaExportCommand.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- RunSchemaExportCommand.cs 2 May 2006 21:33:43 -0000 1.2 +++ RunSchemaExportCommand.cs 3 May 2006 20:23:05 -0000 1.3 @@ -40,7 +40,7 @@ public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { base.QueryStatus(commandName, neededText, ref status, ref commandText); - if (!m_addInSettings.ShowSchemaExportButton) + if (!m_addInSettings.ShowSchemaExportButton || (!m_solutionManager.IsSchemaExportProjectAvailable && m_addInSettings.HideSchemaExportButtonIfProjectUnavailable)) { status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; } 1.2 +28 -16 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutDialog.cs Index: AboutDialog.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutDialog.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- AboutDialog.cs 18 Apr 2006 16:14:44 -0000 1.1 +++ AboutDialog.cs 3 May 2006 20:23:06 -0000 1.2 @@ -18,14 +18,23 @@ { public partial class AboutDialog : Form { + + #region Member variables + private MDASolutionManager m_solutionManager; + #endregion + + #region Properties + public MDASolutionManager MDASolutionManager { get { return m_solutionManager; } set { m_solutionManager = value; } } + #endregion + public AboutDialog() { InitializeComponent(); @@ -47,12 +56,18 @@ { aboutOptionsPage1.LastGenerated = m_solutionManager.MavenLastRunDateTime.ToString(); } - else + if (m_solutionManager.CommonProject != null) { - aboutOptionsPage1.LastGenerated = "Never"; - } aboutOptionsPage1.CommonProject = m_solutionManager.CommonProject.Name; + } + if (m_solutionManager.CoreProject != null) + { aboutOptionsPage1.CoreProject = m_solutionManager.CoreProject.Name; + } + if (m_solutionManager.SchemaExportProject != null) + { + aboutOptionsPage1.SchemaExportProject = m_solutionManager.SchemaExportProject.Name; + } string modelFile = m_solutionManager.ModelFilePath; modelFile = modelFile.Replace(m_solutionManager.SolutionPath, string.Empty); int position = modelFile.LastIndexOf('!'); @@ -60,15 +75,11 @@ { modelFile = modelFile.Substring(0, position); } - aboutOptionsPage1.ModelFile = modelFile; + aboutOptionsPage1.ModelFile = FileUtils.GetFilename(modelFile); } else { aboutOptionsPage1.SolutionUsingMDA = "No"; - aboutOptionsPage1.LastGenerated = "n/a"; - aboutOptionsPage1.CommonProject = "n/a"; - aboutOptionsPage1.CoreProject = "n/a"; - aboutOptionsPage1.ModelFile = "n/a"; } } @@ -76,5 +87,6 @@ { button1.Focus(); } + } } \ No newline at end of file 1.2 +41 -40 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutDialog.designer.cs Index: AboutDialog.designer.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutDialog.designer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- AboutDialog.designer.cs 18 Apr 2006 16:14:44 -0000 1.1 +++ AboutDialog.designer.cs 3 May 2006 20:23:06 -0000 1.2 @@ -35,19 +35,20 @@ // button1 // this.button1.BackColor = System.Drawing.SystemColors.Control; - this.button1.Location = new System.Drawing.Point(161, 234); + this.button1.Location = new System.Drawing.Point(155, 297); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(73, 25); - this.button1.TabIndex = 0; + this.button1.Size = new System.Drawing.Size(84, 25); + this.button1.TabIndex = 2; this.button1.Text = "&Ok"; this.button1.UseVisualStyleBackColor = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // aboutOptionsPage1 // + this.aboutOptionsPage1.Dock = System.Windows.Forms.DockStyle.Top; this.aboutOptionsPage1.Location = new System.Drawing.Point(0, 0); this.aboutOptionsPage1.Name = "aboutOptionsPage1"; - this.aboutOptionsPage1.Size = new System.Drawing.Size(395, 228); + this.aboutOptionsPage1.Size = new System.Drawing.Size(394, 291); this.aboutOptionsPage1.TabIndex = 1; // // AboutDialog @@ -55,10 +56,10 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.Control; - this.ClientSize = new System.Drawing.Size(394, 275); + this.ClientSize = new System.Drawing.Size(394, 331); this.ControlBox = false; - this.Controls.Add(this.aboutOptionsPage1); this.Controls.Add(this.button1); + this.Controls.Add(this.aboutOptionsPage1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Name = "AboutDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -71,7 +72,7 @@ #endregion - private System.Windows.Forms.Button button1; private AboutOptionsPage aboutOptionsPage1; + private System.Windows.Forms.Button button1; } } \ No newline at end of file 1.3 +38 -24 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.cs Index: AboutOptionsPage.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- AboutOptionsPage.cs 28 Apr 2006 16:07:24 -0000 1.2 +++ AboutOptionsPage.cs 3 May 2006 20:23:06 -0000 1.3 @@ -18,9 +18,23 @@ { public partial class AboutOptionsPage : UserControl, EnvDTE.IDTToolsOptionsPage { + + #region Member variables + + static AboutOptionsPage m_properties = new AboutOptionsPage(); + + #endregion + + #region Properties + public string SolutionUsingMDA { - set { lblSolutionUsingMDA.Text = value; } + set + { + bool solutionEnabled = value == "Yes"; + pnlSolutionInfo.Visible = solutionEnabled; + lblSolutionUsingMDA.Text = value; + } } public string LastGenerated @@ -43,23 +57,27 @@ set { lblModelFile.Text = value; } } - static AboutOptionsPage m_properties = new AboutOptionsPage(); + public string SchemaExportProject + { + set { lblSchemaExportProject.Text = value; } + } + + #endregion public AboutOptionsPage() { InitializeComponent(); //linkLabel1.Links.Add(0, linkLabel1.Text.Length); - lblVersion.Text = VS80AddIn.ADD_IN_VERSION; + lblVersion.Text = "v" + VS80AddIn.ADD_IN_VERSION; } #region IDTToolsOptionsPage Members - public void GetProperties(ref object PropertiesObject) + public void OnAfterCreated(EnvDTE.DTE DTEObject) { - PropertiesObject = m_properties; } - public void OnAfterCreated(EnvDTE.DTE DTEObject) + public void OnOK() { } @@ -71,8 +89,9 @@ { } - public void OnOK() + public void GetProperties(ref object PropertiesObject) { + PropertiesObject = m_properties; } #endregion @@ -83,11 +102,6 @@ System.Diagnostics.Process.Start(label.Text); } - private void AboutOptionsPage_Load(object sender, EventArgs e) - { - - } - } [System.Runtime.InteropServices.ComVisible(true)] 1.4 +267 -149 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.designer.cs Index: AboutOptionsPage.designer.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.designer.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- AboutOptionsPage.designer.cs 28 Apr 2006 16:07:24 -0000 1.3 +++ AboutOptionsPage.designer.cs 3 May 2006 20:23:06 -0000 1.4 @@ -28,152 +28,52 @@ /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutOptionsPage)); + this.linkLabel2 = new System.Windows.Forms.LinkLabel(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.lblVersion = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.pnlSolutionInfo = new System.Windows.Forms.Panel(); + this.label7 = new System.Windows.Forms.Label(); this.lblModelFile = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.lblSchemaExportProject = new System.Windows.Forms.Label(); this.lblCommonProject = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); this.lblLastGenerated = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); this.lblCoreProject = new System.Windows.Forms.Label(); this.lblSolutionUsingMDA = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); - this.linkLabel2 = new System.Windows.Forms.LinkLabel(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.lblVersion = new System.Windows.Forms.Label(); - this.groupBox2.SuspendLayout(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label8 = new System.Windows.Forms.Label(); + this.imageList1 = new System.Windows.Forms.ImageList(this.components); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.pnlSolutionInfo.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.groupBox1.SuspendLayout(); this.SuspendLayout(); // - // groupBox2 - // - this.groupBox2.Controls.Add(this.lblModelFile); - this.groupBox2.Controls.Add(this.lblCommonProject); - this.groupBox2.Controls.Add(this.lblLastGenerated); - this.groupBox2.Controls.Add(this.lblCoreProject); - this.groupBox2.Controls.Add(this.lblSolutionUsingMDA); - this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.label5); - this.groupBox2.Controls.Add(this.label7); - this.groupBox2.Controls.Add(this.label4); - this.groupBox2.Controls.Add(this.label3); - this.groupBox2.Location = new System.Drawing.Point(3, 101); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(389, 122); - this.groupBox2.TabIndex = 3; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Status"; - // - // lblModelFile - // - this.lblModelFile.AutoSize = true; - this.lblModelFile.Location = new System.Drawing.Point(169, 98); - this.lblModelFile.Name = "lblModelFile"; - this.lblModelFile.Size = new System.Drawing.Size(24, 13); - this.lblModelFile.TabIndex = 1; - this.lblModelFile.Text = "n/a"; - // - // lblCommonProject - // - this.lblCommonProject.AutoSize = true; - this.lblCommonProject.Location = new System.Drawing.Point(169, 78); - this.lblCommonProject.Name = "lblCommonProject"; - this.lblCommonProject.Size = new System.Drawing.Size(24, 13); - this.lblCommonProject.TabIndex = 1; - this.lblCommonProject.Text = "n/a"; - // - // lblLastGenerated - // - this.lblLastGenerated.AutoSize = true; - this.lblLastGenerated.Location = new System.Drawing.Point(169, 38); - this.lblLastGenerated.Name = "lblLastGenerated"; - this.lblLastGenerated.Size = new System.Drawing.Size(24, 13); - this.lblLastGenerated.TabIndex = 1; - this.lblLastGenerated.Text = "n/a"; - // - // lblCoreProject - // - this.lblCoreProject.AutoSize = true; - this.lblCoreProject.Location = new System.Drawing.Point(169, 58); - this.lblCoreProject.Name = "lblCoreProject"; - this.lblCoreProject.Size = new System.Drawing.Size(24, 13); - this.lblCoreProject.TabIndex = 1; - this.lblCoreProject.Text = "n/a"; - // - // lblSolutionUsingMDA - // - this.lblSolutionUsingMDA.AutoSize = true; - this.lblSolutionUsingMDA.Location = new System.Drawing.Point(169, 18); - this.lblSolutionUsingMDA.Name = "lblSolutionUsingMDA"; - this.lblSolutionUsingMDA.Size = new System.Drawing.Size(40, 13); - this.lblSolutionUsingMDA.TabIndex = 1; - this.lblSolutionUsingMDA.Text = "yes/no"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(105, 98); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(58, 13); - this.label6.TabIndex = 0; - this.label6.Text = "Model File:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(76, 78); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(87, 13); - this.label5.TabIndex = 0; - this.label5.Text = "Common Project:"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(80, 38); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(83, 13); - this.label7.TabIndex = 0; - this.label7.Text = "Last Generated:"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(95, 58); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(68, 13); - this.label4.TabIndex = 0; - this.label4.Text = "Core Project:"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(8, 18); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(155, 13); - this.label3.TabIndex = 0; - this.label3.Text = "Solution is AndroMDA Enabled:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // linkLabel2 // - this.linkLabel2.AutoSize = true; - this.linkLabel2.BackColor = System.Drawing.Color.Black; - this.linkLabel2.Location = new System.Drawing.Point(257, 72); + this.linkLabel2.ForeColor = System.Drawing.Color.Black; + this.linkLabel2.Location = new System.Drawing.Point(6, 50); this.linkLabel2.Name = "linkLabel2"; - this.linkLabel2.Size = new System.Drawing.Size(135, 13); + this.linkLabel2.Size = new System.Drawing.Size(369, 17); this.linkLabel2.TabIndex = 1; this.linkLabel2.TabStop = true; this.linkLabel2.Text = "http://www.andromda.org/"; - this.linkLabel2.Visible = false; + this.linkLabel2.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel_LinkClicked); // // label1 @@ -215,29 +115,238 @@ this.lblVersion.BackColor = System.Drawing.Color.Black; this.lblVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblVersion.ForeColor = System.Drawing.Color.LightGray; - this.lblVersion.Location = new System.Drawing.Point(319, 56); + this.lblVersion.Location = new System.Drawing.Point(249, 56); this.lblVersion.Name = "lblVersion"; this.lblVersion.Size = new System.Drawing.Size(73, 13); this.lblVersion.TabIndex = 0; this.lblVersion.Text = "version"; - this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.ImageList = this.imageList1; + this.tabControl1.Location = new System.Drawing.Point(0, 99); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(395, 190); + this.tabControl1.TabIndex = 5; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.groupBox2); + this.tabPage1.ImageIndex = 0; + this.tabPage1.Location = new System.Drawing.Point(4, 23); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(387, 163); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Status"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.pnlSolutionInfo); + this.groupBox2.Controls.Add(this.lblSolutionUsingMDA); + this.groupBox2.Controls.Add(this.label3); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox2.Location = new System.Drawing.Point(3, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(381, 157); + this.groupBox2.TabIndex = 0; + this.groupBox2.TabStop = false; + // + // pnlSolutionInfo + // + this.pnlSolutionInfo.Controls.Add(this.label7); + this.pnlSolutionInfo.Controls.Add(this.lblModelFile); + this.pnlSolutionInfo.Controls.Add(this.label4); + this.pnlSolutionInfo.Controls.Add(this.lblSchemaExportProject); + this.pnlSolutionInfo.Controls.Add(this.lblCommonProject); + this.pnlSolutionInfo.Controls.Add(this.label9); + this.pnlSolutionInfo.Controls.Add(this.label5); + this.pnlSolutionInfo.Controls.Add(this.lblLastGenerated); + this.pnlSolutionInfo.Controls.Add(this.label6); + this.pnlSolutionInfo.Controls.Add(this.lblCoreProject); + this.pnlSolutionInfo.Location = new System.Drawing.Point(6, 36); + this.pnlSolutionInfo.Name = "pnlSolutionInfo"; + this.pnlSolutionInfo.Size = new System.Drawing.Size(372, 115); + this.pnlSolutionInfo.TabIndex = 8; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(69, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(83, 13); + this.label7.TabIndex = 0; + this.label7.Text = "Last Generated:"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblModelFile + // + this.lblModelFile.AutoSize = true; + this.lblModelFile.Location = new System.Drawing.Point(158, 76); + this.lblModelFile.Name = "lblModelFile"; + this.lblModelFile.Size = new System.Drawing.Size(83, 13); + this.lblModelFile.TabIndex = 1; + this.lblModelFile.Text = "unable to locate"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(84, 19); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(68, 13); + this.label4.TabIndex = 0; + this.label4.Text = "Core Project:"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblSchemaExportProject + // + this.lblSchemaExportProject.AutoSize = true; + this.lblSchemaExportProject.Location = new System.Drawing.Point(158, 57); + this.lblSchemaExportProject.Name = "lblSchemaExportProject"; + this.lblSchemaExportProject.Size = new System.Drawing.Size(83, 13); + this.lblSchemaExportProject.TabIndex = 1; + this.lblSchemaExportProject.Text = "unable to locate"; + // + // lblCommonProject + // + this.lblCommonProject.AutoSize = true; + this.lblCommonProject.Location = new System.Drawing.Point(158, 38); + this.lblCommonProject.Name = "lblCommonProject"; + this.lblCommonProject.Size = new System.Drawing.Size(83, 13); + this.lblCommonProject.TabIndex = 1; + this.lblCommonProject.Text = "unable to locate"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(34, 57); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(118, 13); + this.label9.TabIndex = 0; + this.label9.Text = "Schema Export Project:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(65, 38); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(87, 13); + this.label5.TabIndex = 0; + this.label5.Text = "Common Project:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblLastGenerated + // + this.lblLastGenerated.AutoSize = true; + this.lblLastGenerated.Location = new System.Drawing.Point(158, 0); + this.lblLastGenerated.Name = "lblLastGenerated"; + this.lblLastGenerated.Size = new System.Drawing.Size(34, 13); + this.lblLastGenerated.TabIndex = 1; + this.lblLastGenerated.Text = "never"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(94, 76); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(58, 13); + this.label6.TabIndex = 0; + this.label6.Text = "Model File:"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblCoreProject + // + this.lblCoreProject.AutoSize = true; + this.lblCoreProject.Location = new System.Drawing.Point(158, 19); + this.lblCoreProject.Name = "lblCoreProject"; + this.lblCoreProject.Size = new System.Drawing.Size(83, 13); + this.lblCoreProject.TabIndex = 1; + this.lblCoreProject.Text = "unable to locate"; + // + // lblSolutionUsingMDA + // + this.lblSolutionUsingMDA.AutoSize = true; + this.lblSolutionUsingMDA.Location = new System.Drawing.Point(164, 16); + this.lblSolutionUsingMDA.Name = "lblSolutionUsingMDA"; + this.lblSolutionUsingMDA.Size = new System.Drawing.Size(40, 13); + this.lblSolutionUsingMDA.TabIndex = 7; + this.lblSolutionUsingMDA.Text = "yes/no"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 16); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(155, 13); + this.label3.TabIndex = 6; + this.label3.Text = "Solution is AndroMDA Enabled:"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.groupBox1); + this.tabPage2.ImageIndex = 1; + this.tabPage2.Location = new System.Drawing.Point(4, 23); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(387, 163); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "About"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label8); + this.groupBox1.Controls.Add(this.linkLabel2); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(381, 157); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + // + // label8 + // + this.label8.Location = new System.Drawing.Point(6, 16); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(369, 34); + this.label8.TabIndex = 2; + this.label8.Text = "AndroMDA Visual Studio 2005 Add-In\r\n(c)2006 AndroMDA.org"; + this.label8.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // imageList1 + // + this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); + this.imageList1.TransparentColor = System.Drawing.Color.Transparent; + this.imageList1.Images.SetKeyName(0, "propertiesORoptions.ico"); + this.imageList1.Images.SetKeyName(1, "help.ico"); // // AboutOptionsPage // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tabControl1); this.Controls.Add(this.label2); this.Controls.Add(this.lblVersion); this.Controls.Add(this.label1); - this.Controls.Add(this.linkLabel2); this.Controls.Add(this.pictureBox1); - this.Controls.Add(this.groupBox2); this.Name = "AboutOptionsPage"; this.Size = new System.Drawing.Size(395, 289); - this.Load += new System.EventHandler(this.AboutOptionsPage_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.pnlSolutionInfo.ResumeLayout(false); + this.pnlSolutionInfo.PerformLayout(); + this.tabPage2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -245,21 +354,30 @@ #endregion - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label lblCommonProject; - private System.Windows.Forms.Label lblCoreProject; - private System.Windows.Forms.Label lblSolutionUsingMDA; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.LinkLabel linkLabel2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label lblVersion; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.ImageList imageList1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Panel pnlSolutionInfo; + private System.Windows.Forms.Label label7; private System.Windows.Forms.Label lblModelFile; - private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label lblCommonProject; + private System.Windows.Forms.Label label5; private System.Windows.Forms.Label lblLastGenerated; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label lblVersion; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label lblCoreProject; + private System.Windows.Forms.Label lblSolutionUsingMDA; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label lblSchemaExportProject; + private System.Windows.Forms.Label label9; } } 1.2 +62 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.resx Index: AboutOptionsPage.resx =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.resx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- AboutOptionsPage.resx 18 Apr 2006 16:14:44 -0000 1.1 +++ AboutOptionsPage.resx 3 May 2006 20:23:06 -0000 1.2 @@ -684,4 +684,66 @@ gAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP/2Q== </value> </data> + <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD8 + CwAAAk1TRnQBSQFMAgEBAgEAAQQBAAEEAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + AwABEAMAAQEBAAEgBgABEBoAAX0CAwH/AWACAwH/AWACAwH/AWACAwH/AWACAwH/AWACAwH/AWACAwH/ + AWACAwH/AWACAwH/AWACAwH/AWACAwH/AWECAwH/AbcCAwH/EAABBwIBAQcBHgIBASgBPQIBAWcBTAIC + AZkBTwICAa0BTgICAa4BTgICAaIBQwIBAXcBJwIBATgBDAIBAQ4BAgMBkAAB7AHaAdMC/wHoAdYC/wHm + AdIC/wHlAc4C/wHiAcoC/wHhAcYC/wHgAcMC/wHdAb8C/wHcAbsC/wHaAbgC/wHZAbMB/wGLAVkBVQH/ + AbMCAwH/DAABCgIBAQwBMwIBAU8B3QHJAcAB/AH0AegB4wH/AvQB8wH/AfAB8gHzAf8B8QHyAfMB/wH0 + Ae0B6QH/Ae4B2wHQAf8BVgITAdQBQQIBAXABFAIBARkBAgMBjAAB4gHZAdIC/wHqAdUC/wHoAc8C/wHl + AcoC/wHiAcQC/wHeAb8C/wHdAboC/wHaAbUC/wHYAbEC/wHWAasC/wHUAaMB/wGJAVcBWwH/AbMCAwH/ + CAABCQIBAQoBRQICAXkB9QHrAeUB/wHwAfEB8gH/AeQB3QHbAf8BvgGLAXUB/wHCAXsBVQH/AcwBjwF0 + Af8B3wHOAcQB/wHtAfAB8gH/AfYC9AH/AbEBkAGIAfgBRQIBAX0BEgIBARYBAgMBiAAB5AHdAdYC/wHt + AdsC/wHqAdYC/wHoAdEC/wHqAccB/wHBAboB0gL/AecBvgL/Ad4BuwL/AdsBtgL/AdgBsQL/AdcBqQH/ + AYsBWQFcAf8BswIDAf8IAAEwAgEBSgH3AfEB7QH/AfAB9AH1Af8ByAGBAWAB/wG/AV4BLQH/AcIBaQE7 + Af8B7AHuAe8B/wHSAYgBZgH/AcABYQEwAf8BvQFjATUB/wHqAekB6AH/AfUB9gH3Af8BigFfAVoB8QE7 + AgEBYAEIAgEBCYgAAeYB4AHbAv8B8wHmAv8B8wHmAv8B7gG+Af8BJwFDAe8B/wEDATYC/wFjAXIB4AL/ + Ad4BvQL/Ad4BvQL/Ad4BvQL/Ad4BvQH/AY4BXAFdAf8BswIDAf8IAAHxAd4B0wH/AfQC9gH/AcQBcQFG + Af8BxQFmATUB/wHLAWkBNgH/AcABcgFKAf8B/gP/AdkBqAGPAf8BygFoATYB/wHHAWYBNAH/AbwBWwEp + Af8B7gHvAfAB/wH2Ae4B6gH/AVACBAG6ARwCAQEliAAB6QHjAd8C/wHmAckB/wGQAY8ByQH/AQMBKwL/ + AQMBLAL/ARQBQwL/AQMBLQL/AfkB3AGsAv8B3gG9Av8B3gG9Av8B3AG0Af8BjgFdAV4B/wGzAgMB/wQA + ATECAQFLAfkB+gH5Af8B4QHBAbEB/wHGAWYBNQH/AcwBagE4Af8BzAFqATcB/wHMAWkBNQH/AcoBYwEu + Af8BywFmATIB/wHMAWkBNgH/AcsBaQE3Af8BxwFnATUB/wHGAXkBUAH/AfMC9QH/AdMBvwG0AfwBNAIB + AVKIAAHrAeYB4wL/AeUByQH/AVgBcwHzAf8BJwFNAv8B/AHkAbkC/wHpAbIB/wEDASoC/wEfAUIB8wL/ + AdwBrAL/AdUBrAL/Ad4BuQH/AY8BXgFgAf8BswIDAf8EAAGlAWcBYQHhAfoB/QH+Af8BxgFpATkB/wHN + AWsBOQH/Ac0BawE4Af8BzAFpATYB/wHHAWoBOgX/AdoBkQFuAf8BzAFpATYB/wHMAWoBNwH/AcsBaQE3 + Af8BwQFfASsB/wPxAf8B8gHfAdUB/wFDAgEBd4gAAe0B6gHnAv8B5wHOAv8B5AHCAv8B4wG+Av8B3gG9 + Av8B3AG6Af8CpQHZAf8BAwEzAv8BxgGzAbwC/wHXAa8C/wHhAb4B/wGTAWABYgH/AbMCAwH/BAAB6gHT + AcgC/gP/AcoBaAE1Af8B0AFuATsB/wHMAWkBNgH/AcwBaQE2Af8BzAFmATIB/wHkAeoB7AH/AfoB8QHs + Af8BygFjAS8B/wHMAWkBNgH/Ac0BawE4Af8ByAFnATUB/wHrAdsB0wH/AfUB6QHjAf8BRwICAYKIAAHv + Ae0B6wL/AegB0QL/AeEBwwL/AeABwAL/Ad8BvgL/Ad0BuwL/AeUBtQH/AQ4BOAL/AQMBKgP/Ad4BvQL/ + AeQBxAH/AZQBYgFkAf8BswIDAf8EAAHwAdwB0QX/AdIBbwE8Af8B0wFxAT4B/wHMAWkBNgH/AcwBaQE2 + Af8BzAFpATYB/wHFAWsBPAH/AfYB+QH7Af8B+wHxAe0B/wHLAWUBMAH/Ac8BbAE6Af8BzAFrATkB/wHu + AdsB0gH/AfcB7AHlAf8BRQIBAXyIAAHyAvEC/wHnAdEC/wHgAcAC/wHfAb8C/wHdAbwC/wHcAboC/wHb + AbgB/wHtAdYBvwH/AQMBMAL/AWMBbgHbAv8B5gHJAf8BmAFkAWYB/wGzAgMB/wQAAdMBrAGjAfUE/wHf + AXwBSQH/AdsBeQFHAf8BzgFrATgB/wHLAWQBLwH/AcsBZwEzAf8BzAFpATYB/wHEAXcBTwX/AdwBlAFz + Af8B0gFwAT4B/wHPAWwBOQH/AfsB9QHzAf8B9QHkAdwB/wE6AgEBX4gAAfQC8wL/AeIBxgL/AdcBsQL/ + AdcBsAL/AdYBrwL/AdYBrQL/AdYBrAL/AdcBqQH/AUkBZQHzAf8B/AHdAaUC/wHpAc8B/wGaAWQBZgH/ + AbMCAwH/BAABSgIFAYAE/wH7AckBrgH/Ae4BigFaAf8B0gF5AUsB/wHxAfYB+QH/AesBwgGuAf8BywFm + ATIB/wHKAXMBRgX/Ad8BpQGJAf8B3AF6AUgB/wHYAXkBRwX/AegB0AHGAf4BIwIBATGIAAL2AfUC/wHh + AcIC/wHWAawC/wHVAasC/wHVAasC/wHUAakC/wHUAakC/wHTAagC/wHVAaYC/wHRAaQC/wHtAdYB/wGc + AWIBYwH/AbMCAwH/CAAB9gHoAeAG/wGjAXEB/wH6AZUBZAH/Ac0BxgHDBf8B/AH1AfEF/wH2AfsB/QH/ + AeYBgwFVAf8B6wGDAVIB/wH9AfUB7gH/Af4C/AH/AU0CBAGTAQwCAQEOiAAC+AH1Cv8B/gP/AfsB+QL/ + AfkB9AL/AfYB7wL/AfQB6gL/AfMB5gH/AfsB8AHjAv8B8QHXAf8BnwFeAV8B/wGwAgMB/wgAAU0CBQGG + Cf8B0AGcAv8BuwGHAf8B6QG/AaoB/wHXAccBwAH/Ad8ByQG/Af8B/AGpAX8C/wGkAXIC/wHoAdcF/wHe + AcoBwQH8AR4CAQEoAQMCAQECiAAB+gH5AfcO/wL+Av8B+wH4Av8B+QH0Av8B9gHuAf8B7gHfAdoB/wHx + AZgBJQH/Ad4BgQEPAf8BugGJAX4B/wHKAgMB/wgAAQIDAQGLAUYBQgHTCv8B7QL/AfsB0QL/Ae8BuwL/ + AeQBsQL/AesBzQn/AesB1AHKAf4BIwIBATEBBAIBAQSMAAH9AfoB+BL/Av4C/wH8AfkC/wH5AfQB/wHv + AeEB3AL/Ac8BfAH/AboBiQF+Af8BygIDAf8QAAECAwEBSAEEAQMBewH1AeYB3hX/AfoB8QHsAf8BrgF2 + AXAB6QEYAgEBHwEDAgEBA5AAAfcB0gGvAf8B8gHLAasB/wHqAcQBpwH/AeEBuwGiAf8B2QGzAZ0B/wHQ + AaoBmAH/AcoBpAGUAf8ByAGiAZMB/wHIAaIBkwH/AboBiQF+Af8BygIDAf8gAAFBAQMBAgFtAb4BiwGF + AewB6wHUAckB/gHgAcUBuQH6AVoCDQGemAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGA + FwAD/wEAAcABAQHgAQMEAAHAAQEBwAEBBAABwAEBAYAFAAHAAQEBgAUAAcABAQGABQABwAEBBgABwAEB + BgABwAEBBgABwAEBBgABwAEBBgABwAEBBgABwAEBAYAFAAHAAQEBgAUAAcABAQGAAQEEAAHAAQMBwAED + BAABwAEHAfgBPwQACw== +</value> + </data> </root> \ No newline at end of file 1.2 +33 -70 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/ExternalToolsOptionsPage.cs Index: ExternalToolsOptionsPage.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/ExternalToolsOptionsPage.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- ExternalToolsOptionsPage.cs 18 Apr 2006 17:18:51 -0000 1.1 +++ ExternalToolsOptionsPage.cs 3 May 2006 20:23:06 -0000 1.2 @@ -21,9 +21,13 @@ public partial class ExternalToolsOptionsPage : UserControl, EnvDTE.IDTToolsOptionsPage { + #region Member variables + static MDAOptionPageProperties m_properties = new MDAOptionPageProperties(); static AddInSettings m_settings = null; + #endregion + public ExternalToolsOptionsPage() { InitializeComponent(); @@ -31,16 +35,9 @@ #region IDTToolsOptionsPage Members - public void GetProperties(ref object PropertiesObject) - { - PropertiesObject = m_properties; - System.Windows.Forms.MessageBox.Show("GetProperties"); - } - public void OnAfterCreated(DTE DTEObject) { m_settings = new AddInSettings(DTEObject); - txtMavenExecutable.Text = m_settings.MavenExecutablePath; cbUseOfflineMode.Checked = m_settings.MavenUseOfflineMode; cbUseClean.Checked = m_settings.MavenCleanFirst; cbUseCustomCommandLine.Checked = m_settings.MavenUseCustomCommandLine; @@ -50,22 +47,14 @@ UpdateState(); } - protected void UpdateState() - { - cbUseClean.Enabled = !cbUseCustomCommandLine.Checked; - cbUseOfflineMode.Enabled = !cbUseCustomCommandLine.Checked; - txtCustomCommandLine.Enabled = cbUseCustomCommandLine.Checked; - } - - protected override void OnEnter(EventArgs e) - { - base.OnEnter(e); - - } - - protected override void OnVisibleChanged(EventArgs e) + public void OnOK() { - base.OnVisibleChanged(e); + m_settings.MavenUseOfflineMode = cbUseOfflineMode.Checked; + m_settings.MavenCleanFirst = cbUseClean.Checked; + m_settings.MavenUseCustomCommandLine = cbUseCustomCommandLine.Checked; + m_settings.MavenCustomCommandLine = txtCustomCommandLine.Text; + m_settings.MagicDrawPath = txtMagicDrawPath.Text; + m_settings.AutoMakeModelFileWritable = cbMakeModelWritable.Checked; } public void OnEnter() @@ -80,49 +69,23 @@ { } - public void OnOK() + public void GetProperties(ref object PropertiesObject) { - m_settings.MavenExecutablePath = txtMavenExecutable.Text; - m_settings.MavenUseOfflineMode = cbUseOfflineMode.Checked; - m_settings.MavenCleanFirst = cbUseClean.Checked; - m_settings.MavenUseCustomCommandLine = cbUseCustomCommandLine.Checked; - m_settings.MavenCustomCommandLine = txtCustomCommandLine.Text; - m_settings.MagicDrawPath = txtMagicDrawPath.Text; - m_settings.AutoMakeModelFileWritable = cbMakeModelWritable.Checked; + PropertiesObject = m_properties; } #endregion - private void cbUseCustomCommandLine_CheckedChanged(object sender, EventArgs e) + prot... [truncated message content] |
From: Chris M. <cm...@us...> - 2006-05-02 21:34:32
|
User: cmicali Date: 06/05/02 14:34:28 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn AndroMDA VS2005 Add-In Readme.rtf Log: Revision Changes Path No revision No revision No revision No revision |
From: Chris M. <cm...@us...> - 2006-05-02 21:33:45
|
User: cmicali Date: 06/05/02 14:33:43 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn AndroMDA VS2005 Add-In Readme.rtf etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn AndroMDA.VS80AddIn.csproj Connect.cs MDASolutionManager.cs VS80AddIn.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands AboutCommand.cs AddInCommandBase.cs OpenModelCommand.cs ResyncCommand.cs RunSchemaExportCommand.cs StopCommand.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Utils VSSolutionUtils.cs Added: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands AndroMDALogoCommand.cs GenerateCodeCommand.cs Log: - Updated toolbar so if show/hide button settings are changed the buttons will show/hide immediately w/o a restart of visual studio - Added schema export button to toolbar - Added better error handling when projects are not available on solution load - Added better tooltips to the buttons on the tool bar - Added AndroMDA text when no buttons are visible on the tool bar Revision Changes Path No revision No revision No revision No revision 1.6 +4 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj Index: AndroMDA.VS80AddIn.csproj =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- AndroMDA.VS80AddIn.csproj 2 May 2006 04:47:10 -0000 1.5 +++ AndroMDA.VS80AddIn.csproj 2 May 2006 21:33:42 -0000 1.6 @@ -34,6 +34,8 @@ </PropertyGroup> <ItemGroup> <Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <Reference Include="Microsoft.VisualStudio.VCProject, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Design" /> @@ -48,11 +50,12 @@ </Compile> <Compile Include="Commands\AboutCommand.cs" /> <Compile Include="Commands\AddInCommandBase.cs" /> + <Compile Include="Commands\AndroMDALogoCommand.cs" /> <Compile Include="Commands\RunSchemaExportCommand.cs" /> <Compile Include="Commands\ReloadMDAConfigCommand.cs" /> <Compile Include="Commands\OpenModelCommand.cs" /> <Compile Include="Commands\ResyncCommand.cs" /> - <Compile Include="Commands\RunMavenCommand.cs" /> + <Compile Include="Commands\GenerateCodeCommand.cs" /> <Compile Include="Commands\RunSolutionWizardCommand.cs" /> <Compile Include="Commands\StopCommand.cs" /> <Compile Include="ConfigFile.cs" /> 1.2 +3 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Connect.cs Index: Connect.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Connect.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- Connect.cs 18 Apr 2006 16:14:43 -0000 1.1 +++ Connect.cs 2 May 2006 21:33:42 -0000 1.2 @@ -12,6 +12,7 @@ using System.Resources; using System.Reflection; using System.Globalization; +using System.Runtime.InteropServices; #endregion @@ -19,6 +20,8 @@ { /// <summary>The object for implementing an Add-in.</summary> /// <seealso class='IDTExtensibility2' /> + /// + [GuidAttribute("C40038DE-DA1D-11DA-9B41-B622A1EF5492"), ProgId("AndroMDA.VS80AddIn.Connect")] public class Connect : IDTExtensibility2, IDTCommandTarget { 1.4 +27 -8 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs Index: MDASolutionManager.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- MDASolutionManager.cs 2 May 2006 04:47:10 -0000 1.3 +++ MDASolutionManager.cs 2 May 2006 21:33:42 -0000 1.4 @@ -11,6 +11,7 @@ using EnvDTE; using EnvDTE80; using Microsoft.VisualStudio.CommandBars; +using Microsoft.VisualStudio.VCProject; using System.Resources; using System.Reflection; using System.Globalization; @@ -283,16 +284,34 @@ public void RunSchemaExport() { + try + { if (m_projectProperties["maven.andromda.schemaexport.available"].ToLower().Trim() == "true") { - string schemaExportProject = FileUtils.CleanDirectory(m_projectProperties["maven.andromda.schemaexport.available"]); - string schamaExportName = FileUtils.GetFilename(schemaExportProject); + string schemaExportProjectPath = FileUtils.CleanDirectory(m_projectProperties["maven.andromda.schemaexport.dir"]); string solutionName = VSSolutionUtils.GetSolutionName(m_applicationObject.Solution); - - //m_applicationObject.ActiveWindow.ite - m_applicationObject.ExecuteCommand("Debug.StartNewInstance", "WindowsApplication1.SchemaExport"); - + Project schemaExportProject = VSSolutionUtils.FindProjectByDirectory(schemaExportProjectPath, m_applicationObject.Solution); + if (schemaExportProject != null) + { + string schamaExportName = FileUtils.GetFilename(schemaExportProject.FileName).Replace(".csproj", string.Empty); + // Activate the solution explorer window + m_applicationObject.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate(); + // Grab the UIHierarchy object for the schema export project + UIHierarchyItem item = ((UIHierarchy)m_applicationObject.ActiveWindow.Object).GetItem(solutionName + "\\" + schamaExportName); + // Select the project + item.Select(vsUISelectionType.vsUISelectionTypeSelect); + // Execute the Debug.StartNewInstance command + m_applicationObject.ExecuteCommand("ClassViewContextMenus.ClassViewProject.Debug.Startnewinstance", string.Empty); + return; + } } + AddInUtils.ShowWarning("The schema export for this project could not be found.\nPlease ensure the following variables are set correctly in mda\\project.properties\n\nmaven.andromda.schemaexport.available: true\nmaven.andromda.schemaexport.dir: <path to schema export project>"); + } + catch (Exception e) + { + AddInUtils.ShowError(e.Message); + } + } #endregion 1.5 +24 -8 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/VS80AddIn.cs Index: VS80AddIn.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/VS80AddIn.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- VS80AddIn.cs 2 May 2006 04:47:10 -0000 1.4 +++ VS80AddIn.cs 2 May 2006 21:33:42 -0000 1.5 @@ -51,6 +51,7 @@ private ArrayList m_commands = null; + private AndroMDALogoCommand m_logoCommand = null; #endregion #region Properties @@ -77,6 +78,8 @@ m_commands.Clear(); // Add commands to the add-in + m_logoCommand = new AndroMDALogoCommand(); + m_commands.Add(m_logoCommand); m_commands.Add(new ReloadMDAConfigCommand()); m_commands.Add(new RunSolutionWizardCommand()); m_commands.Add(new RunMavenCommand()); @@ -317,6 +320,18 @@ return null; } + public bool AreAnyToolbarButtonsVisible() + { + foreach (AddInCommandBase cmd in m_commands) + { + if (cmd.IsToolbarButtonVisible) + { + return true; + } + } + return false; + } + public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { if (m_connected && neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone) @@ -324,6 +339,7 @@ AddInCommandBase cmd = GetCommand(commandName); if (cmd != null) { + m_logoCommand.Visible = !AreAnyToolbarButtonsVisible(); cmd.QueryStatus(commandName, neededText, ref status, ref commandText); if (!IsAvailable) { 1.3 +10 -10 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AboutCommand.cs Index: AboutCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AboutCommand.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- AboutCommand.cs 2 May 2006 04:47:10 -0000 1.2 +++ AboutCommand.cs 2 May 2006 21:33:43 -0000 1.3 @@ -18,10 +18,18 @@ { public AboutCommand() { - Init("About", "About", "About AndroMDA", 487, AddInCommandBase.AddInCommandType.AlwaysEnabled); + Init("About", "About", "About AndroMDA Add-In", 487, AddInCommandBase.AddInCommandType.AlwaysEnabled); m_isStartOfGroup = true; } + public override bool IsToolbarButtonVisible + { + get + { + return base.IsToolbarButtonVisible && m_addInSettings.ShowAboutButton; + } + } + public override void Exec(vsCommandExecOption executeOption, ref object varIn, ref object varOut) { Dialogs.AboutDialog a = new Dialogs.AboutDialog(); @@ -34,15 +42,7 @@ base.QueryStatus(commandName, neededText, ref status, ref commandText); if (!m_addInSettings.ShowAboutButton) { - status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; - } - } - - public override void AddToToolbar(CommandBar toolbar, int position) - { - if (m_addInSettings.ShowAboutButton) - { - base.AddToToolbar(toolbar, position); + status = status | vsCommandStatus.vsCommandStatusInvisible; } } 1.4 +29 -3 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AddInCommandBase.cs Index: AddInCommandBase.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AddInCommandBase.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- AddInCommandBase.cs 2 May 2006 04:47:10 -0000 1.3 +++ AddInCommandBase.cs 2 May 2006 21:33:43 -0000 1.4 @@ -20,7 +20,7 @@ #region Enumerations - public enum AddInCommandType { AlwaysEnabled, NoMDAAlwaysEnabled, MDADisabled, MDAAlwaysEnabled, MDAEnabledWhileMavenNotRunning, MDAEnabledWhileMavenRunning } + public enum AddInCommandType { AlwaysEnabled, AlwaysDisabled, NoMDAAlwaysEnabled, MDADisabled, MDAAlwaysEnabled, MDAEnabledWhileMavenNotRunning, MDAEnabledWhileMavenRunning } #endregion @@ -43,6 +43,8 @@ protected AddInCommandType m_commandType = AddInCommandType.AlwaysEnabled; + protected vsCommandStatus m_lastStatus = vsCommandStatus.vsCommandStatusUnsupported; + #endregion #region Properties @@ -62,6 +64,16 @@ get { return m_commandBarButton; } } + public virtual bool IsToolbarButtonVisible + { + get + { + bool enabled = (m_lastStatus & vsCommandStatus.vsCommandStatusEnabled) > 0; + bool supported = (m_lastStatus & vsCommandStatus.vsCommandStatusSupported) > 0; + return enabled && supported; + } + } + #endregion public AddInCommandBase() @@ -101,6 +113,15 @@ if (m_command != null) { m_commandBarButton = (CommandBarButton)m_command.AddControl(toolbar, position); + m_commandBarButton.TooltipText = m_toolTip; + if (m_bitmapNumber == -1) + { + m_commandBarButton.Style = MsoButtonStyle.msoButtonCaption; + } + else + { + m_commandBarButton.Style = MsoButtonStyle.msoButtonIconAndCaption; + } if (m_isStartOfGroup) { m_commandBarButton.BeginGroup = true; @@ -143,9 +164,13 @@ { if (commandName == m_fullName && neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone) { + switch (m_commandType) { + case AddInCommandType.AlwaysDisabled: + status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported; + break; case AddInCommandType.AlwaysEnabled: status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; break; @@ -211,6 +236,7 @@ } break; } + m_lastStatus = status; } } 1.4 +10 -10 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/OpenModelCommand.cs Index: OpenModelCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/OpenModelCommand.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- OpenModelCommand.cs 2 May 2006 04:47:10 -0000 1.3 +++ OpenModelCommand.cs 2 May 2006 21:33:43 -0000 1.4 @@ -19,9 +19,10 @@ { public OpenModelCommand() { - Init("OpenUMLModel", "Open Model", "Open Model", 589, AddInCommandBase.AddInCommandType.MDAAlwaysEnabled); + Init("OpenModel", "Open Model", "Open Model", 589, AddInCommandBase.AddInCommandType.MDAAlwaysEnabled); m_isStartOfGroup = true; } + public override void Exec(vsCommandExecOption executeOption, ref object varIn, ref object varOut) { string magicDrawPath = m_addInSettings.MagicDrawPath; @@ -51,21 +52,20 @@ } } - - public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) + public override bool IsToolbarButtonVisible { - base.QueryStatus(commandName, neededText, ref status, ref commandText); - if (!m_addInSettings.ShowOpenModelButton) + get { - status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; + return base.IsToolbarButtonVisible && m_addInSettings.ShowOpenModelButton; } } - public override void AddToToolbar(CommandBar toolbar, int position) + public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { - if (m_addInSettings.ShowOpenModelButton) + base.QueryStatus(commandName, neededText, ref status, ref commandText); + if (!m_addInSettings.ShowOpenModelButton) { - base.AddToToolbar(toolbar, position); + status = status | vsCommandStatus.vsCommandStatusInvisible; } } 1.2 +1 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/ResyncCommand.cs Index: ResyncCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/ResyncCommand.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- ResyncCommand.cs 18 Apr 2006 16:14:44 -0000 1.1 +++ ResyncCommand.cs 2 May 2006 21:33:43 -0000 1.2 @@ -17,7 +17,7 @@ { public ResyncCommand() { - Init("Resync", "Resync", "Resync generated files", 37, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenNotRunning); + Init("ResyncFiles", "Resync", "Resync Generated Files", 37, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenNotRunning); } public override void Exec(vsCommandExecOption executeOption, ref object varIn, ref object varOut) 1.2 +9 -10 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/RunSchemaExportCommand.cs Index: RunSchemaExportCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/RunSchemaExportCommand.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- RunSchemaExportCommand.cs 2 May 2006 04:47:10 -0000 1.1 +++ RunSchemaExportCommand.cs 2 May 2006 21:33:43 -0000 1.2 @@ -20,7 +20,7 @@ { public RunSchemaExportCommand() { - Init("RunSchemaExport", "Export Schema", "Export Schema", 4005, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenNotRunning); + Init("ExportSchema", "Export Schema", "Export Database Schema", 4005, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenNotRunning); m_isStartOfGroup = true; } @@ -29,21 +29,20 @@ m_solutionManager.RunSchemaExport(); } - - public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) + public override bool IsToolbarButtonVisible { - base.QueryStatus(commandName, neededText, ref status, ref commandText); - if (!m_addInSettings.ShowSchemaExportButton) + get { - status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; + return base.IsToolbarButtonVisible && m_addInSettings.ShowSchemaExportButton; } } - public override void AddToToolbar(CommandBar toolbar, int position) + public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { - if (m_addInSettings.ShowSchemaExportButton) + base.QueryStatus(commandName, neededText, ref status, ref commandText); + if (!m_addInSettings.ShowSchemaExportButton) { - base.AddToToolbar(toolbar, position); + status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; } } 1.2 +1 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/StopCommand.cs Index: StopCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/StopCommand.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- StopCommand.cs 18 Apr 2006 16:14:44 -0000 1.1 +++ StopCommand.cs 2 May 2006 21:33:43 -0000 1.2 @@ -18,7 +18,7 @@ public StopCommand() { - Init("Stop", "Stop", "Stop the currently running operation", 1670, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenRunning); + Init("StopGeneration", "Stop", "Stop Code Generation", 1670, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenRunning); } public override void Exec(vsCommandExecOption executeOption, ref object varIn, ref object varOut) 1.1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AndroMDALogoCommand.cs Index: AndroMDALogoCommand.cs =================================================================== // AndroMDA Visual Studio 2005 Add-In // (c)2006 Sapient Corporation #region Using statements using System; using Microsoft.VisualStudio.CommandBars; using EnvDTE; #endregion namespace AndroMDA.VS80AddIn { public class AndroMDALogoCommand : AddInCommandBase { private bool m_visible = true; public bool Visible { get { return m_visible; } set { m_visible = value; } } public override bool IsToolbarButtonVisible { get { return false; } } public AndroMDALogoCommand() { Init("AndroMDALogo", "AndroMDA", "AndroMDA", -1, AddInCommandBase.AddInCommandType.AlwaysDisabled); m_isStartOfGroup = true; } public override void Exec(vsCommandExecOption executeOption, ref object varIn, ref object varOut) { } public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { base.QueryStatus(commandName, neededText, ref status, ref commandText); if (!Visible) { status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; } } } } 1.1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/GenerateCodeCommand.cs Index: GenerateCodeCommand.cs =================================================================== // AndroMDA Visual Studio 2005 Add-In // (c)2006 Sapient Corporation #region Using statements using System; using System.Collections.Generic; using System.Text; using EnvDTE; #endregion namespace AndroMDA.VS80AddIn { public class RunMavenCommand : AddInCommandBase { public RunMavenCommand() { Init("GenerateCode", "Generate", "Generate Code From Model", 2138, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenNotRunning); } public override void Exec(vsCommandExecOption executeOption, ref object varIn, ref object varOut) { m_solutionManager.RunMaven(); } } } 1.2 +14 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Utils/VSSolutionUtils.cs Index: VSSolutionUtils.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Utils/VSSolutionUtils.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- VSSolutionUtils.cs 18 Apr 2006 16:14:47 -0000 1.1 +++ VSSolutionUtils.cs 2 May 2006 21:33:43 -0000 1.2 @@ -111,5 +111,19 @@ return null; } + public static Project FindProjectByDirectory(string projectPath, Solution currentSolution) + { + //string path = FileUtils.GetPathFromFilename(projectPath); + if (!currentSolution.IsOpen || projectPath == string.Empty) return null; + foreach (Project p in currentSolution.Projects) + { + if (FileUtils.GetPathFromFilename(p.FileName) == projectPath) + { + return p; + } + } + return null; + } + } } |
From: Martin W. <ama...@us...> - 2006-05-02 20:03:23
|
User: amartinwest Date: 06/05/02 13:03:17 Modified: . mvn-cc-build.xml Log: refactor and add copy to web Revision Changes Path 1.3 +18 -3 plugins/mvn-cc-build.xml Index: mvn-cc-build.xml =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/mvn-cc-build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- mvn-cc-build.xml 2 May 2006 19:40:27 -0000 1.2 +++ mvn-cc-build.xml 2 May 2006 20:03:17 -0000 1.3 @@ -1,7 +1,13 @@ <project name="maven2-build" default="default"> - <target name="default"> + <target name="default" depends="cvs,build,copy2web" > + </target> + + <target name="cvs"> <cvs command="update -P -d"/> + </target> + + <target name="build"> <tstamp> <format property="ant.mvn.log.date" pattern="yyyyMMdd-HHmmss"/> </tstamp> @@ -14,4 +20,13 @@ </exec> </target> + <target name="copy2web" > + <property name="artifact" value="maven2/org.andromda.plugins"/> + <mkdir dir="/var/www/andromda/${artifact}"/> + <mkdir dir="/andromda/${artifact}"/> + <copy todir="/var/www/andromda/${artifact}"> + <fileset dir="/andromda/${artifact}"/> + </copy> + </target> + </project> |
From: Martin W. <ama...@us...> - 2006-05-02 19:40:35
|
User: amartinwest Date: 06/05/02 12:40:27 Modified: . mvn-cc-build.xml Log: Add cvs update Revision Changes Path 1.2 +1 -0 plugins/mvn-cc-build.xml Index: mvn-cc-build.xml =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/mvn-cc-build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- mvn-cc-build.xml 2 May 2006 18:46:50 -0000 1.1 +++ mvn-cc-build.xml 2 May 2006 19:40:27 -0000 1.2 @@ -1,6 +1,7 @@ <project name="maven2-build" default="default"> <target name="default"> + <cvs command="update -P -d"/> <tstamp> <format property="ant.mvn.log.date" pattern="yyyyMMdd-HHmmss"/> </tstamp> |
From: Martin W. <ama...@us...> - 2006-05-02 18:46:51
|
User: amartinwest Date: 06/05/02 11:46:50 Added: . mvn-cc-build.xml Log: Add mvn-ant build script from server Revision Changes Path 1.1 plugins/mvn-cc-build.xml Index: mvn-cc-build.xml =================================================================== <project name="maven2-build" default="default"> <target name="default"> <tstamp> <format property="ant.mvn.log.date" pattern="yyyyMMdd-HHmmss"/> </tstamp> <property name="ant.mvn.log" value="ant-mvn-${ant.mvn.log.date}.log"/> <exec dir="${basedir}" executable="mvn" > <arg value="clean"/> </exec> <exec dir="${basedir}" executable="mvn" > <arg value="install"/> </exec> </target> </project> |
From: Chris M. <cm...@us...> - 2006-05-02 04:47:12
|
User: cmicali Date: 06/05/01 21:47:10 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn AndroMDA VS2005 Add-In Readme.rtf etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn AddInSettings.cs AndroMDA.VS80AddIn.csproj MDASolutionManager.cs VS80AddIn.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands AboutCommand.cs AddInCommandBase.cs OpenModelCommand.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs GeneralOptionsPage.Designer.cs GeneralOptionsPage.cs MDASolutionWizard.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/mda project.properties Added: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn WizardSolutionProcessor.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands RunSchemaExportCommand.cs Removed: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn MDASolutionProcessor.cs Log: - Added schema export button - Made changes to button visibility occur immediatly (no restart of vs) - Renamed MDASolutionProcessor to WizardSolutionProcessor Revision Changes Path No revision No revision No revision No revision 1.3 +6 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AddInSettings.cs Index: AddInSettings.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AddInSettings.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- AddInSettings.cs 18 Apr 2006 17:18:50 -0000 1.2 +++ AddInSettings.cs 2 May 2006 04:47:10 -0000 1.3 @@ -201,6 +201,12 @@ set { m_settings.SetBool("ADMAShowOMdl", value); } } + public bool ShowSchemaExportButton + { + get { return m_settings.GetBool("ADMAShowSCEX", true); } + set { m_settings.SetBool("ADMAShowSCEX", value); } + } + /* private string GetCommandSetting(AddInCommandBase command, string setting) { 1.5 +2 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj Index: AndroMDA.VS80AddIn.csproj =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- AndroMDA.VS80AddIn.csproj 28 Apr 2006 04:40:37 -0000 1.4 +++ AndroMDA.VS80AddIn.csproj 2 May 2006 04:47:10 -0000 1.5 @@ -48,6 +48,7 @@ </Compile> <Compile Include="Commands\AboutCommand.cs" /> <Compile Include="Commands\AddInCommandBase.cs" /> + <Compile Include="Commands\RunSchemaExportCommand.cs" /> <Compile Include="Commands\ReloadMDAConfigCommand.cs" /> <Compile Include="Commands\OpenModelCommand.cs" /> <Compile Include="Commands\ResyncCommand.cs" /> @@ -102,7 +103,7 @@ <Compile Include="MavenProxy.cs" /> <Compile Include="MDAProject.cs" /> <Compile Include="MDASolutionManager.cs" /> - <Compile Include="MDASolutionProcessor.cs" /> + <Compile Include="WizardSolutionProcessor.cs" /> <Compile Include="AddInSettings.cs" /> <Compile Include="Resource1.Designer.cs"> <AutoGen>True</AutoGen> 1.3 +33 -47 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs Index: MDASolutionManager.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/MDASolutionManager.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- MDASolutionManager.cs 28 Apr 2006 04:40:37 -0000 1.2 +++ MDASolutionManager.cs 2 May 2006 04:47:10 -0000 1.3 @@ -279,6 +279,24 @@ { } + #region Run schema export methods + + public void RunSchemaExport() + { + if (m_projectProperties["maven.andromda.schemaexport.available"].ToLower().Trim() == "true") + { + string schemaExportProject = FileUtils.CleanDirectory(m_projectProperties["maven.andromda.schemaexport.available"]); + string schamaExportName = FileUtils.GetFilename(schemaExportProject); + string solutionName = VSSolutionUtils.GetSolutionName(m_applicationObject.Solution); + + //m_applicationObject.ActiveWindow.ite + m_applicationObject.ExecuteCommand("Debug.StartNewInstance", "WindowsApplication1.SchemaExport"); + + } + } + + #endregion + #region Run maven methods public void StopMaven() @@ -404,50 +422,9 @@ m_coreProject.GeneratedPathProjectItem, m_coreProject.GeneratedPath, m_coreProject.Name); - /* - foreach (Project p in m_applicationObject.Solution.Projects) - { - if (p.Name == m_coreProject.Name || p.Name == m_commonProject.Name) - { - foreach (ProjectItem item in p.ProjectItems) - { - if (p.Name == m_commonProject.Name && - item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFolder && - m_commonProject.GeneratedRelativePath == item.Name) - { - // This is the common/src folder - m_commonProject.FileListHashCodeSrc = ResyncFolder(m_commonProject.FileListHashCodeSrc, item, m_commonProject.ManualPath, p.Name); - } - - if (p.Name == m_commonProject.Name && - item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFolder && - m_commonProject.GeneratedRelativePath == item.Name) - { - // This is the common/target folder - m_commonProject.FileListHashCodeTarget = ResyncFolder(m_commonProject.FileListHashCodeTarget, item, m_commonProject.GeneratedPath, p.Name); - } - if (p.Name == m_coreProject.Name && - item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFolder && - m_coreProject.ManualRelativePath == item.Name) - { - // This is the core/src folder - m_coreProject.FileListHashCodeSrc = ResyncFolder(m_coreProject.FileListHashCodeSrc, item, m_coreProject.ManualPath, p.Name); - } - - if (p.Name == m_coreProject.Name && - item.Kind == EnvDTE.Constants.vsProjectItemKindPhysicalFolder && - m_coreProject.GeneratedRelativePath == item.Name) - { - // This is the core/target folder - m_coreProject.FileListHashCodeTarget = ResyncFolder(m_coreProject.FileListHashCodeTarget, item, m_coreProject.GeneratedPath, p.Name); - } - - } - } - } - */ m_applicationObject.StatusBar.Progress(false, "AndroMDA: Resync complete", 1, 1); + } private int ResyncFolder(int fileListHashCode, ProjectItem item, string folderPath, string projectName) @@ -456,6 +433,15 @@ { return -1; } + + /* + if (!System.IO.Directory.Exists(folderPath)) + { + item.Remove(); + return 0; + } + */ + UpdateResyncProgressBar(projectName + "/" + item.Name); // Get the UI nodes so we can collapse the projects UIHierarchy solutionExplorer = (UIHierarchy)m_applicationObject.Windows.Item(Constants.vsext_wk_SProjectWindow).Object; 1.4 +2 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/VS80AddIn.cs Index: VS80AddIn.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/VS80AddIn.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- VS80AddIn.cs 28 Apr 2006 16:07:24 -0000 1.3 +++ VS80AddIn.cs 2 May 2006 04:47:10 -0000 1.4 @@ -82,6 +82,7 @@ m_commands.Add(new RunMavenCommand()); m_commands.Add(new ResyncCommand()); m_commands.Add(new StopCommand()); + m_commands.Add(new RunSchemaExportCommand()); m_commands.Add(new OpenModelCommand()); m_commands.Add(new AboutCommand()); // Set the context for each command 1.1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/WizardSolutionProcessor.cs Index: WizardSolutionProcessor.cs =================================================================== // AndroMDA Visual Studio 2005 Add-In // (c)2006 Sapient Corporation #region Using statements using System; using System.IO; using System.Collections.Generic; using System.Text; using System.Threading; using EnvDTE; using EnvDTE80; using VSLangProj; using ICSharpCode.SharpZipLib.Checksums; using ICSharpCode.SharpZipLib.Zip; #endregion namespace AndroMDA.VS80AddIn { public class WizardSolutionProcessor { #region Member variables private DTE m_applicationObject = null; private System.Threading.Thread m_thread = null; public delegate void SolutionProcessingCompleteHandler(bool success, string errorMessage); public delegate void SolutionProcessingStatusHandler(string status); public event SolutionProcessingCompleteHandler OnSolutionProcessingComplete; public event SolutionProcessingStatusHandler OnSolutionProcessingStatus; private ConfigFile m_configuration = null; #endregion public WizardSolutionProcessor(ConfigFile config, DTE applicationObject) { m_configuration = config; m_applicationObject = applicationObject; } private void AddToStatus(string message) { if (OnSolutionProcessingStatus != null) { if (OnSolutionProcessingStatus.Target is System.Windows.Forms.Control) { System.Windows.Forms.Control target = OnSolutionProcessingStatus.Target as System.Windows.Forms.Control; target.BeginInvoke(OnSolutionProcessingStatus, new Object[] { message }); } else { OnSolutionProcessingStatus(message); } } System.Threading.Thread.Sleep(100); } public void EnableSolutionForMDA() { m_thread = new System.Threading.Thread(new ThreadStart(this.UpdateSolutionThread)); m_thread.Start(); } private void UpdateSolutionThread() { bool success = false; string errorMessage = string.Empty; try { UpdateSolution(); success = true; } catch (Exception e) { errorMessage = "An error occured while attempting to update the solution: " + e.ToString(); } finally { // Fire the processing complete event if (OnSolutionProcessingComplete != null) { if (OnSolutionProcessingComplete.Target is System.Windows.Forms.Control) { System.Windows.Forms.Control target = OnSolutionProcessingComplete.Target as System.Windows.Forms.Control; target.BeginInvoke(OnSolutionProcessingComplete, new Object[] { success, errorMessage }); } else { OnSolutionProcessingComplete(success, errorMessage); } } } } private void UpdateSolution() { string basePath = m_configuration["solution.path"]; AddToStatus("Adding AndroMDA support to solution..."); Project commonProject = null; Project coreProject = null; Project schemaExportProject = null; // Create/find the common project if (m_configuration["projects.common.create"] == "true") { AddToStatus("Creating common project " + m_configuration["projects.common.name"] + "..."); commonProject = VSSolutionUtils.AddClassLibraryProjectToSolution(m_configuration["projects.common.name"], (Solution2)m_applicationObject.Solution); } else { AddToStatus("Using existing common project " + m_configuration["projects.common.name"] + "..."); commonProject = VSSolutionUtils.FindProjectByName(m_configuration["projects.common.name"], m_applicationObject.Solution); } //CreateDirectory(basePath + "\\" + m_configuration["projects.common.dir"] + "\\src"); //CreateDirectory(basePath + "\\" + m_configuration["projects.common.dir"] + "\\target"); commonProject.ProjectItems.AddFolder("src", Constants.vsProjectItemKindPhysicalFolder); commonProject.ProjectItems.AddFolder("target", Constants.vsProjectItemKindPhysicalFolder); WriteFile(basePath + "\\" + m_configuration["projects.common.dir"] + "\\project.xml", ParseVariables(Resource1.common_project_xml)); // Create/find the common project if (m_configuration["projects.core.create"] == "true") { AddToStatus("Creating core project " + m_configuration["projects.core.name"] + "..."); coreProject = VSSolutionUtils.AddClassLibraryProjectToSolution(m_configuration["projects.core.name"], (Solution2)m_applicationObject.Solution); } else { AddToStatus("Using existing core project " + m_configuration["projects.core.name"] + "..."); coreProject = VSSolutionUtils.FindProjectByName(m_configuration["projects.core.name"], m_applicationObject.Solution); } //CreateDirectory(basePath + "\\" + m_configuration["projects.core.dir"] + "\\src"); //CreateDirectory(basePath + "\\" + m_configuration["projects.core.dir"] + "\\target"); coreProject.ProjectItems.AddFolder("src", Constants.vsProjectItemKindPhysicalFolder); coreProject.ProjectItems.AddFolder("target", Constants.vsProjectItemKindPhysicalFolder); WriteFile(basePath + "\\" + m_configuration["projects.core.dir"] + "\\project.xml", ParseVariables(Resource1.core_project_xml)); // Create the schema export project if (m_configuration["projects.schemaexport.create"] == "true") { AddToStatus("Creating schema export project " + m_configuration["projects.schemaexport.name"] + "..."); schemaExportProject = VSSolutionUtils.AddConsoleAppProjectToSolution(m_configuration["projects.schemaexport.name"], (Solution2)m_applicationObject.Solution); WriteFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\App.config", ParseVariables(Resource1.SchemaExport_App_config)); WriteFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\nhibernate.config", ParseVariables(Resource1.SchemaExport_nhibernate_config)); WriteFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\Program.cs", ParseVariables(Resource1.SchemaExport_Program_cs)); ProjectItem appConfig = schemaExportProject.ProjectItems.AddFromFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\App.config"); ProjectItem nhibernateConfig = schemaExportProject.ProjectItems.AddFromFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\nhibernate.config"); // Set the config files 'Copy to Output Directory' property to 'Copy if Newer' appConfig.Properties.Item("CopyToOutputDirectory").Value = 2; appConfig.Properties.Item("BuildAction").Value = VSLangProj.prjBuildAction.prjBuildActionContent; nhibernateConfig.Properties.Item("CopyToOutputDirectory").Value = 2; nhibernateConfig.Properties.Item("BuildAction").Value = VSLangProj.prjBuildAction.prjBuildActionContent; schemaExportProject.ProjectItems.AddFromFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\Program.cs"); } // Render /maven.xml WriteFile(basePath + "\\maven.xml", ParseVariables(Resource1.maven_xml)); // Render /project.properties WriteFile(basePath + "\\project.properties", ParseVariables(Resource1.project_properties)); // Render /project.xml WriteFile(basePath + "\\project.xml", ParseVariables(Resource1.project_xml)); // Create mda directory CreateDirectory(basePath + "\\mda"); // Render /mda/maven.xml WriteFile(basePath + "\\mda\\maven.xml", ParseVariables(Resource1.mda_maven_xml)); // Render /mda/project.properties WriteFile(basePath + "\\mda\\project.properties", ParseVariables(Resource1.mda_project_properties)); // Render /mda/project.xml WriteFile(basePath + "\\mda\\project.xml", ParseVariables(Resource1.mda_project_xml)); // Create mda/conf directory CreateDirectory(basePath + "\\mda\\conf"); // Render /mda/conf/andromda.xml WriteFile(basePath + "\\mda\\conf\\andromda.xml", ParseVariables(Resource1.mda_conf_andromda_xml)); // Create mda/src directory System.IO.Directory.CreateDirectory(basePath + "\\mda\\src"); // Create mda/uml directory System.IO.Directory.CreateDirectory(basePath + "\\mda\\src\\uml"); // Create the empty model file WriteCompressedFile(m_configuration["application.model.filename.unzipped"], basePath + "\\mda\\src\\uml\\" + m_configuration["application.model.filename"], Resource1.mda_src_uml_empty_model_xml); // Create the lib directory CreateDirectory(basePath + "\\Lib"); // Write the libraries out WriteFile(basePath + "\\Lib\\AndroMDA.NHibernateSupport.dll", Resource1.lib_AndroMDA_NHibernateSupport_dll); WriteFile(basePath + "\\Lib\\Bamboo.Prevalence.dll", Resource1.lib_Bamboo_Prevalence_dll); WriteFile(basePath + "\\Lib\\Castle.DynamicProxy.dll", Resource1.lib_Castle_DynamicProxy_dll); WriteFile(basePath + "\\Lib\\HashCodeProvider.dll", Resource1.lib_HashCodeProvider_dll); WriteFile(basePath + "\\Lib\\Iesi.Collections.dll", Resource1.lib_Iesi_Collections_dll); WriteFile(basePath + "\\Lib\\log4net.dll", Resource1.lib_log4net_dll); WriteFile(basePath + "\\Lib\\NHibernate.Caches.Prevalence.dll", Resource1.lib_NHibernate_Caches_Prevalence_dll); WriteFile(basePath + "\\Lib\\NHibernate.Caches.SysCache.dll", Resource1.lib_NHibernate_Caches_SysCache_dll); WriteFile(basePath + "\\Lib\\NHibernate.dll", Resource1.lib_NHibernate_dll); WriteFile(basePath + "\\Lib\\NHibernate.Nullables2.dll", Resource1.lib_NHibernate_Nullables2_dll); AddToStatus("Adding project references..."); // Add the references to all the DLLs we just put in /Lib AddBinaryReferences(commonProject, basePath); AddBinaryReferences(coreProject, basePath); // Add a reference from the core project to the common project AddProjectReference(coreProject, commonProject); // If we created the schema export project if (schemaExportProject != null) { // Add the references to the DLLs AddBinaryReferences(schemaExportProject, basePath); // Add references to the core and common projects AddProjectReference(schemaExportProject, commonProject); AddProjectReference(schemaExportProject, coreProject); } } private void AddProjectReference(Project destination, Project projectToReference) { VSProject proj = destination.Object as VSProject; proj.References.AddProject(projectToReference); } private void AddBinaryReferences(Project p, string basePath) { VSProject proj = p.Object as VSProject; proj.References.Add(basePath + "\\Lib\\AndroMDA.NHibernateSupport.dll"); proj.References.Add(basePath + "\\Lib\\Castle.DynamicProxy.dll"); proj.References.Add(basePath + "\\Lib\\HashCodeProvider.dll"); proj.References.Add(basePath + "\\Lib\\Iesi.Collections.dll"); proj.References.Add(basePath + "\\Lib\\log4net.dll"); proj.References.Add(basePath + "\\Lib\\NHibernate.Caches.SysCache.dll"); proj.References.Add(basePath + "\\Lib\\NHibernate.dll"); proj.References.Add(basePath + "\\Lib\\NHibernate.Nullables2.dll"); } private void CreateDirectory(string directoryName) { if (System.IO.Directory.Exists(directoryName)) { AddToStatus("Skipping " + directoryName + " (directory already exists)..."); } else { AddToStatus("Creating directory " + directoryName + "..."); } AddToStatus("Creating directory " + directoryName + "..."); try { System.IO.Directory.CreateDirectory(directoryName); } catch { } } private string ParseVariables(string content) { foreach (string key in m_configuration.Keys) { string variableKey = "${wizard." + key + "}"; if (content.Contains(variableKey)) { content = content.Replace(variableKey, m_configuration[key]); } } return content; } private void WriteFile(string filePath, string fileContent) { if (System.IO.File.Exists(filePath)) { AddToStatus("Skipping " + filePath + " (file already exists)..."); } else { AddToStatus("Creating " + filePath + "..."); } StreamWriter sw = new StreamWriter(filePath, false); sw.Write(ParseVariables(fileContent)); sw.Close(); } private void WriteCompressedFile(string fileNameInZip, string destinationFile, string fileContent) { if (System.IO.File.Exists(destinationFile)) { AddToStatus("Skipping " + fileNameInZip + " (file already exists)..."); } else { AddToStatus("Compressing " + fileNameInZip + "..."); } ZipOutputStream zip = new ZipOutputStream(File.Create(destinationFile)); zip.SetLevel(6); System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); byte[] modelData = encoding.GetBytes(Resource1.mda_src_uml_empty_model_xml); ZipEntry entry = new ZipEntry(fileNameInZip); entry.DateTime = DateTime.Now; entry.Size = modelData.Length; Crc32 crc = new Crc32(); crc.Reset(); crc.Update(modelData); entry.Crc = crc.Value; zip.PutNextEntry(entry); zip.Write(modelData, 0, modelData.Length); zip.Finish(); zip.Close(); } private void WriteFile(string filePath, Byte[] fileContent) { if (System.IO.File.Exists(filePath)) { AddToStatus("Skipping " + filePath + " (file already exists)..."); } else { AddToStatus("Creating " + filePath + "..."); } FileStream fs = new FileStream(filePath, FileMode.Create); fs.Write(fileContent, 0, fileContent.Length); fs.Close(); } } } 1.2 +9 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AboutCommand.cs Index: AboutCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AboutCommand.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- AboutCommand.cs 18 Apr 2006 16:14:44 -0000 1.1 +++ AboutCommand.cs 2 May 2006 04:47:10 -0000 1.2 @@ -29,6 +29,15 @@ a.ShowDialog(); } + public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) + { + base.QueryStatus(commandName, neededText, ref status, ref commandText); + if (!m_addInSettings.ShowAboutButton) + { + status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; + } + } + public override void AddToToolbar(CommandBar toolbar, int position) { if (m_addInSettings.ShowAboutButton) 1.3 +1 -1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AddInCommandBase.cs Index: AddInCommandBase.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AddInCommandBase.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- AddInCommandBase.cs 28 Apr 2006 04:40:37 -0000 1.2 +++ AddInCommandBase.cs 2 May 2006 04:47:10 -0000 1.3 @@ -139,7 +139,7 @@ /// <param name="neededText">The needed text.</param> /// <param name="status">The status.</param> /// <param name="commandText">The command text.</param> - public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) + public virtual void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { if (commandName == m_fullName && neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone) { 1.3 +10 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/OpenModelCommand.cs Index: OpenModelCommand.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/OpenModelCommand.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- OpenModelCommand.cs 18 Apr 2006 17:18:51 -0000 1.2 +++ OpenModelCommand.cs 2 May 2006 04:47:10 -0000 1.3 @@ -51,6 +51,16 @@ } } + + public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) + { + base.QueryStatus(commandName, neededText, ref status, ref commandText); + if (!m_addInSettings.ShowOpenModelButton) + { + status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; + } + } + public override void AddToToolbar(CommandBar toolbar, int position) { if (m_addInSettings.ShowOpenModelButton) 1.1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/RunSchemaExportCommand.cs Index: RunSchemaExportCommand.cs =================================================================== // AndroMDA Visual Studio 2005 Add-In // (c)2006 Sapient Corporation #region Using statements using System; using System.Collections.Generic; using System.Text; using EnvDTE; using Microsoft.VisualStudio.CommandBars; #endregion namespace AndroMDA.VS80AddIn { public class RunSchemaExportCommand : AddInCommandBase { public RunSchemaExportCommand() { Init("RunSchemaExport", "Export Schema", "Export Schema", 4005, AddInCommandBase.AddInCommandType.MDAEnabledWhileMavenNotRunning); m_isStartOfGroup = true; } public override void Exec(vsCommandExecOption executeOption, ref object varIn, ref object varOut) { m_solutionManager.RunSchemaExport(); } public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { base.QueryStatus(commandName, neededText, ref status, ref commandText); if (!m_addInSettings.ShowSchemaExportButton) { status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible; } } public override void AddToToolbar(CommandBar toolbar, int position) { if (m_addInSettings.ShowSchemaExportButton) { base.AddToToolbar(toolbar, position); } } } } 1.2 +94 -81 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/GeneralOptionsPage.Designer.cs Index: GeneralOptionsPage.Designer.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/GeneralOptionsPage.Designer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- GeneralOptionsPage.Designer.cs 18 Apr 2006 17:18:51 -0000 1.1 +++ GeneralOptionsPage.Designer.cs 2 May 2006 04:47:10 -0000 1.2 @@ -29,26 +29,58 @@ private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.cbShowSchemaExportButton = new System.Windows.Forms.CheckBox(); + this.cbShowOpenModelButton = new System.Windows.Forms.CheckBox(); + this.cbShowAboutButton = new System.Windows.Forms.CheckBox(); this.label2 = new System.Windows.Forms.Label(); this.txtResyncIgnoreList = new System.Windows.Forms.TextBox(); - this.cbShowAboutButton = new System.Windows.Forms.CheckBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.cbShowOpenModelButton = new System.Windows.Forms.CheckBox(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // + this.groupBox1.Controls.Add(this.cbShowSchemaExportButton); this.groupBox1.Controls.Add(this.cbShowOpenModelButton); this.groupBox1.Controls.Add(this.cbShowAboutButton); this.groupBox1.Location = new System.Drawing.Point(0, 72); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(395, 68); + this.groupBox1.Size = new System.Drawing.Size(395, 92); this.groupBox1.TabIndex = 2; this.groupBox1.TabStop = false; this.groupBox1.Text = "Appearance"; // + // cbShowSchemaExportButton + // + this.cbShowSchemaExportButton.AutoSize = true; + this.cbShowSchemaExportButton.Location = new System.Drawing.Point(12, 65); + this.cbShowSchemaExportButton.Name = "cbShowSchemaExportButton"; + this.cbShowSchemaExportButton.Size = new System.Drawing.Size(208, 17); + this.cbShowSchemaExportButton.TabIndex = 0; + this.cbShowSchemaExportButton.Text = "Show s&chema export button on toolbar"; + this.cbShowSchemaExportButton.UseVisualStyleBackColor = true; + // + // cbShowOpenModelButton + // + this.cbShowOpenModelButton.AutoSize = true; + this.cbShowOpenModelButton.Location = new System.Drawing.Point(11, 42); + this.cbShowOpenModelButton.Name = "cbShowOpenModelButton"; + this.cbShowOpenModelButton.Size = new System.Drawing.Size(194, 17); + this.cbShowOpenModelButton.TabIndex = 0; + this.cbShowOpenModelButton.Text = "Show &open model button on toolbar"; + this.cbShowOpenModelButton.UseVisualStyleBackColor = true; + // + // cbShowAboutButton + // + this.cbShowAboutButton.AutoSize = true; + this.cbShowAboutButton.Location = new System.Drawing.Point(11, 19); + this.cbShowAboutButton.Name = "cbShowAboutButton"; + this.cbShowAboutButton.Size = new System.Drawing.Size(166, 17); + this.cbShowAboutButton.TabIndex = 0; + this.cbShowAboutButton.Text = "&Show about button on toolbar"; + this.cbShowAboutButton.UseVisualStyleBackColor = true; + // // label2 // this.label2.AutoSize = true; @@ -65,16 +97,6 @@ this.txtResyncIgnoreList.Size = new System.Drawing.Size(359, 20); this.txtResyncIgnoreList.TabIndex = 1; // - // cbShowAboutButton - // - this.cbShowAboutButton.AutoSize = true; - this.cbShowAboutButton.Location = new System.Drawing.Point(11, 19); - this.cbShowAboutButton.Name = "cbShowAboutButton"; - this.cbShowAboutButton.Size = new System.Drawing.Size(166, 17); - this.cbShowAboutButton.TabIndex = 0; - this.cbShowAboutButton.Text = "&Show about button on toolbar"; - this.cbShowAboutButton.UseVisualStyleBackColor = true; - // // groupBox2 // this.groupBox2.Controls.Add(this.label2); @@ -86,16 +108,6 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "General"; // - // cbShowOpenModelButton - // - this.cbShowOpenModelButton.AutoSize = true; - this.cbShowOpenModelButton.Location = new System.Drawing.Point(11, 42); - this.cbShowOpenModelButton.Name = "cbShowOpenModelButton"; - this.cbShowOpenModelButton.Size = new System.Drawing.Size(194, 17); - this.cbShowOpenModelButton.TabIndex = 0; - this.cbShowOpenModelButton.Text = "Show &open model button on toolbar"; - this.cbShowOpenModelButton.UseVisualStyleBackColor = true; - // // GeneralOptionsPage // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -120,5 +132,6 @@ private System.Windows.Forms.CheckBox cbShowAboutButton; private System.Windows.Forms.CheckBox cbShowOpenModelButton; private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.CheckBox cbShowSchemaExportButton; } } 1.2 +5 -2 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/GeneralOptionsPage.cs Index: GeneralOptionsPage.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/GeneralOptionsPage.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- GeneralOptionsPage.cs 18 Apr 2006 17:18:51 -0000 1.1 +++ GeneralOptionsPage.cs 2 May 2006 04:47:10 -0000 1.2 @@ -41,6 +41,7 @@ m_settings = new AddInSettings(DTEObject); cbShowAboutButton.Checked = m_settings.ShowAboutButton; cbShowOpenModelButton.Checked = m_settings.ShowOpenModelButton; + cbShowSchemaExportButton.Checked = m_settings.ShowSchemaExportButton; txtResyncIgnoreList.Text = m_settings.ResyncIgnoreList; UpdateState(); } @@ -75,9 +76,11 @@ { m_settings.ShowAboutButton = cbShowAboutButton.Checked; m_settings.ShowOpenModelButton = cbShowOpenModelButton.Checked; + m_settings.ShowSchemaExportButton = cbShowSchemaExportButton.Checked; m_settings.ResyncIgnoreList = txtResyncIgnoreList.Text; } #endregion + } } 1.2 +3 -3 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDASolutionWizard.cs Index: MDASolutionWizard.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDASolutionWizard.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- MDASolutionWizard.cs 18 Apr 2006 16:14:44 -0000 1.1 +++ MDASolutionWizard.cs 2 May 2006 04:47:10 -0000 1.2 @@ -323,9 +323,9 @@ /// </summary> private void UpdateSolution() { - MDASolutionProcessor processor = new MDASolutionProcessor(CreateSolutionWizardConfiguration(), m_applicationObject); - processor.OnSolutionProcessingComplete += new MDASolutionProcessor.SolutionProcessingCompleteHandler(processor_OnSolutionProcessingComplete); - processor.OnSolutionProcessingStatus += new MDASolutionProcessor.SolutionProcessingStatusHandler(processor_OnSolutionProcessingStatus); + WizardSolutionProcessor processor = new WizardSolutionProcessor(CreateSolutionWizardConfiguration(), m_applicationObject); + processor.OnSolutionProcessingComplete += new WizardSolutionProcessor.SolutionProcessingCompleteHandler(processor_OnSolutionProcessingComplete); + processor.OnSolutionProcessingStatus += new WizardSolutionProcessor.SolutionProcessingStatusHandler(processor_OnSolutionProcessingStatus); processor.EnableSolutionForMDA(); } 1.2 +3 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/mda/project.properties Index: project.properties =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/mda/project.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- project.properties 18 Apr 2006 16:14:45 -0000 1.1 +++ project.properties 2 May 2006 04:47:10 -0000 1.2 @@ -24,6 +24,9 @@ maven.andromda.web.generated.dir=${maven.andromda.web.dir}/target maven.andromda.web.manual.java.dir=${maven.andromda.web.dir}/src +maven.andromda.schemaexport.dir=${maven.src.dir}/../../${wizard.projects.schemaexport.dir} +maven.andromda.schemaexport.available=${wizard.projects.schemaexport.create} + # The default strategy to use when using inhertiance hibernate.inheritance.strategy=subclass hibernate.db.showSql=true \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-05-02 02:27:10
|
User: vancek Date: 06/05/01 19:27:00 Added: andromda-ejb3/src/site/xdoc howto19.xml Log: initial revision DAO Revision Changes Path 1.1 cartridges/andromda-ejb3/src/site/xdoc/howto19.xml Index: howto19.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="va...@us...">Vance Karimi</author> <title>AndroMDA - EJB3 - HowTo DAO</title> </properties> <body> <section name="Data Access Objects (DAO)"> <p> The Data Access Layer provides an API for accessing and manipulating data in the persistence tier and abstracts or hides much of this complexity from the session bean business logic tier. To find out more about the different tiers on an enterprise application and where DAO object typically fit in the stack, you can read the <a href="http://galaxy.andromda.org/docs/getting-started/java/index.html">getting started guide</a>. </p> <p> For every entity class, modelled with the <![CDATA[<<Entity>>]]> stereotype, 3 DAO related objects are created. This provdes the typical CRUD API and finder method accessability for a specific entity. </p> <p> DAO's are just stateless session beans with a local interface. The presentation layer wouldn't use the DAO local interface directly. Instead, your session beans in the business layer would utilise the DAO interface for all persistence related tasks. </p> <p> By modelling dependencies from the service to the entities the cartridge will inject the local interface of the DAO of the target entities in to the session bean. You are then free to use this DAO instance variable when CRUD features available in the API are required. </p> <p> The following example, illustrates a typical entity POJO and its generated DAO components. </p> <p> <img src="images/org/andromda/test/19/a/uml.gif"/> </p> <p> <ul> <li class="gen">Auto-generated source that does not need manual editing</li> <li class="impl">Auto-generated source that should be edited manually</li> <li class="changed">File that is affected by the modifications applied in this section</li> </ul> </p> <p> <ul> <li class="gen"><a class="changed" href="src/org/andromda/test/howto19/a/Person.java"><code>Person.java</code></a></li> <li class="gen"><a class="changed" href="src/org/andromda/test/howto19/a/PersonDao.java"><code>PersonDao.java</code></a></li> <li class="gen"><a class="changed" href="src/org/andromda/test/howto19/a/PersonDaoBase.java"><code>PersonDaoBase.java</code></a></li> <li class="impl"><a class="changed" href="src/org/andromda/test/howto19/a/PersonDaoImpl.java"><code>PersonDaoImpl.java</code></a></li> <li class="gen"><a class="changed" href="src/org/andromda/test/howto19/a/PersonDaoException.java"><code>PersonDaoException.java</code></a></li> </ul> </p> <p> Since the <code>Person</code> entity contains finder methods, the <code>PersonDaoImpl</code> is generated once only to <code>core/src/main/java</code>. You can override or add any method implementation to this file. </p> <p> The <code>PersonDaoBase.java</code> injects the <code>javax.ejb.SessionContext</code> by default and makes this available for use in the subclass via the <code>context</code> protected property. This base DAO class contains the bulk of the CRUD API implementation. It injects the default <code>PersistenceContext</code> and provides the finder method implementations modelled on the entity. </p> <a name="Queries"/> <subsection name="Queries"> <p> The <code>Person</code> entity contains the <code>@NamedQueries</code> annotation with the array of <code>@NamedQuery</code> annotations defining the query logic. The corresponding <code>findBy</code> methods in the <code>PersonDaoBase</code> provide the ability to either specify a query string or use the named query defined in the application at deploy-time. </p> </subsection> <a name="View_Interface"/> <subsection name="View Interface"> <p> The DAO stateless session bean is accessed via the local interface. This means that you cannot access DAO from a remote container, but this isn't a concern since your session facade exposes the remote interface and contains your business logic. </p> </subsection> <a name="Transactions"/> <subsection name="Transactions"> <p> All DAO base abstract classes define the <code>@TransactionAttribute</code> annotation, setting the transaction type to <code>REQUIRED</code>. Typically, you would start your transactions in your business logic within your session facades. </p> </subsection> <a name="Security"/> <subsection name="Security"> <p> The EJB3 cartridge provides the ability to set basic security constraints to allow role based security when accessing and invoking CRUD operations in the DAO session beans. To find out how to enable JAAS security, click on <a href="howto8.html">Security</a>. </p> <p> If you enable security and do not model actor dependencies on the entities to limit roles permitted to access to your DAO, the EJB3 cartridge will add the <code>@javax.annotation.security.PermitAll</code> annotation at the class level of your base DAO class. This implies that all methods of the DAO are not checked for security constraints. </p> </subsection> </section> <section name="Next"> <p> In the next section we'll learn about entity relationships, click <a href="howto2.html">here</a> to continue. </p> </section> </body> </document> |