Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1961 - development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: peter AT neubauer.se
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1961 - development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic
  • Date: Sun, 06 Mar 2005 18:08:02 -0500

Author: peter AT neubauer.se
Date: Sun Mar 6 04:02:26 2005
New Revision: 1961

Modified:

development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeIndex.java

development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeProjectDefinition.java
Log:
Made Definition a delegate, thereby fixing incorrect serving of project
basdir when dealing with index files that inculde others


Modified:
development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeIndex.java
==============================================================================
---
development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeIndex.java
(original)
+++
development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeIndex.java
Sun Mar 6 04:02:26 2005
@@ -105,11 +105,7 @@
if ( projectDefs.containsKey(def.getInfo().getName()) ) {
throw new BuildException("Duplicate project definition: " +
def.getInfo().getName());
}
- IdeProjectDefinition prj = new
IdeProjectDefinition(file.getParent(),
-
def.getBasePath(),
-
def.getInfo().getGroup(),
-
def.getInfo().getName(),
-
def.getInfo().getVersion());
+ IdeProjectDefinition prj = new
IdeProjectDefinition(file.getParent(), def);
ResourceRef[] parts = def.getPartRefs();
for ( int j = 0; j < parts.length; j++ ) {
ResourceRef part = parts[j];

Modified:
development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeProjectDefinition.java
==============================================================================
---
development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeProjectDefinition.java
(original)
+++
development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic/IdeProjectDefinition.java
Sun Mar 6 04:02:26 2005
@@ -17,9 +17,12 @@

import java.io.File;

+import net.dpml.magic.model.Definition;
+

/**
* A simplified representation of a project definition for IDE integrations.
+ * It simply wraps a project definition as a delegate.
*
* @author <a href="mailto:herzog AT raffael.ch>Raffael Herzog</a>
*/
@@ -27,20 +30,21 @@

private final String indexPath;
private final String basePath;
+ private File baseDir;
+ private Definition definition;

/**
* Create a new project definition.
*
* @param indexPath The path of the index file containing this project
definition.
- * @param basePath The base path relative to the index file.
- * @param group The group.
- * @param name The name.
- * @param version The version.
+ * @param definition the project definition
*/
- public IdeProjectDefinition(String indexPath, String basePath, String
group, String name, String version) {
- super(group, name, version);
+ public IdeProjectDefinition(String indexPath, Definition definition) {
+ super(definition.getInfo().getGroup(),
definition.getInfo().getName(), definition.getInfo().getVersion());
this.indexPath = indexPath;
- this.basePath = basePath;
+ this.basePath = definition.getBasePath();
+ this.baseDir = definition.getBaseDir();
+ this.definition = definition;
}

public boolean isProjectDefinition() {
@@ -62,7 +66,7 @@
* @return The base path.
*/
public String getBasePath() {
- return basePath;
+ return definition.getBasePath();
}

/**
@@ -71,11 +75,11 @@
* @return The full base path of the project.
*/
public String getFullBasePath() {
- return indexPath+File.separator+basePath;
+ return definition.getBaseDir().getAbsolutePath();
}

- public File getFullBaseFile() {
- return new File(indexPath, basePath);
+ public File getFullBaseDir() {
+ return definition.getBaseDir();
}

}



  • svn commit: r1961 - development/laboratory/ide/common/magic/src/main/net/dpml/ide/common/magic, peter, 03/06/2005

Archive powered by MHonArc 2.6.24.

Top of Page