Merge "Bug 457241 : build properties adjusted"
diff --git a/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java b/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java
index e0003e5..fd58789 100644
--- a/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java
+++ b/plugins/org.eclipse.gendoc.bundle.acceleo.commons/src/org/eclipse/gendoc/bundle/acceleo/commons/files/CommonService.java
@@ -46,6 +46,7 @@
 import org.eclipse.gendoc.services.IGendocDiagnostician;
 import org.eclipse.gendoc.services.IRegistryService;
 import org.eclipse.gendoc.tags.ITagExtensionService;
+import org.eclipse.gendoc.tags.handlers.IConfigurationService;
 import org.eclipse.gendoc.tags.handlers.IEMFModelLoaderService;
 import org.osgi.framework.Bundle;
 
@@ -158,7 +159,16 @@
 		IRegistryService registry = GendocServices.getDefault().getService(
 				IRegistryService.class);
 		if (registry != null) {
-			return registry.get(key);
+			Object result = registry.get(key);
+			if (result == null && key instanceof String){
+				// fix problems using deferred values
+				IConfigurationService conf = GendocServices.getDefault().getService(IConfigurationService.class);
+				String tmp = conf.getParameter((String) key);
+				if (tmp instanceof String) {
+					result = (String)tmp;
+				}
+			}
+			return result;
 		}
 		return null;
 	}
diff --git a/plugins/org.eclipse.gendoc.tags.handlers/src/org/eclipse/gendoc/tags/handlers/DefaultParameterValue.java b/plugins/org.eclipse.gendoc.tags.handlers/src/org/eclipse/gendoc/tags/handlers/DefaultParameterValue.java
index 4d7f732..fc98991 100644
--- a/plugins/org.eclipse.gendoc.tags.handlers/src/org/eclipse/gendoc/tags/handlers/DefaultParameterValue.java
+++ b/plugins/org.eclipse.gendoc.tags.handlers/src/org/eclipse/gendoc/tags/handlers/DefaultParameterValue.java
@@ -34,7 +34,8 @@
 {
     private static final String KEY_INPUT = "input";
     private static final String KEY_INPUT_EXT = "input_ext";
-
+    private static final String KEY_INPUT_DIRECTORY = "input_directory";
+    
     private static final String KEY_DATE = "date";
 
     public Map<String, String> getValue()
@@ -52,44 +53,39 @@
     public Map<String, IDeferredValue> getDeferredValues()
     {
         // these values are deferred to be sure that the document service is
-        // already loaded
+        // already loaded    	
         Map<String, IDeferredValue> result = new HashMap<String, IDeferredValue>();
         IDeferredValue documentDeferred = new IDeferredValue()
         {
-            String documentName = null;
-
             public String get()
             {
-                if (documentName == null)
-                {
-                	String  document = getDocument();
-                    return document.substring(0, document.lastIndexOf("."));
-                }
-                return documentName;
+            	String  document = getDocument();
+                return document.substring(0, document.lastIndexOf("."));
             }
-
-
         };
         // fill document name
         result.put(KEY_INPUT, documentDeferred);
         IDeferredValue documentDeferred2 = new IDeferredValue()
         {
-            String documentName = null;
-
             public String get()
             {
-                if (documentName == null)
-                {
-                	String  document = getDocument();
-                    return document;
-                }
-                return documentName;
+            	String  document = getDocument();
+                return document;
             }
-
-
         };
         // fill document name with extension
         result.put(KEY_INPUT_EXT, documentDeferred2);
+        IDeferredValue documentDeferred3 = new IDeferredValue()
+        {
+            public String get()
+            {
+        		IDocumentService docService = GendocServices.getDefault().getService(IDocumentService.class);
+            	String pathFile = docService.getDocument().getPath().substring(0, docService.getDocument().getPath().lastIndexOf('/'));
+                return pathFile;
+            }
+        };
+        // fill document name with extension
+        result.put(KEY_INPUT_DIRECTORY, documentDeferred3);                
         return result;
     }
     
@@ -99,7 +95,7 @@
     		IDocumentService docService = GendocServices.getDefault().getService(IDocumentService.class);
     		if (docService != null)
     		{
-    			String name = docService.getDocument().getPath().substring(docService.getDocument().getPath().lastIndexOf('/') + 1, docService.getDocument().getPath().length());
+    			String name = docService.getDocument().getPath().substring(docService.getDocument().getPath().lastIndexOf('/') + 1);
     			return name;
     		}
     	}
diff --git a/plugins/org.eclipse.gendoc.ui/.classpath b/plugins/org.eclipse.gendoc.ui/.classpath
index 64c5e31..ad32c83 100644
--- a/plugins/org.eclipse.gendoc.ui/.classpath
+++ b/plugins/org.eclipse.gendoc.ui/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/pom.xml b/pom.xml
index a80491f..8868d5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,15 +38,14 @@
   </modules>
   
   <properties>
-  
   	<tycho.version>0.19.0</tycho.version>
-    <mars-repo.url>http://download.eclipse.org/releases/mars</mars-repo.url>
+    <neon-repo.url>http://download.eclipse.org/releases/neon</neon-repo.url>
   </properties>
 
   <repositories>
     <repository>
-      <id>mars</id>
-      <url>${mars-repo.url}</url>
+      <id>neon</id>
+      <url>${neon-repo.url}</url>
       <layout>p2</layout>
     </repository>
       <repository>
@@ -56,7 +55,7 @@
     </repository>
      <repository>
       <id>sirius</id>
-      <url>http://download.eclipse.org/sirius/updates/releases/3.0.0/mars</url>
+      <url>http://download.eclipse.org/sirius/updates/releases/4.0.0/neon</url>
       <layout>p2</layout>
     </repository>
   </repositories>