[jbosstools-commits] JBoss Tools SVN: r6765 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Mar 7 07:54:14 EST 2008


Author: scabanovich
Date: 2008-03-07 07:54:14 -0500 (Fri, 07 Mar 2008)
New Revision: 6765

Modified:
   trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
Log:
JBIDE-1692

Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java	2008-03-07 12:54:06 UTC (rev 6764)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java	2008-03-07 12:54:14 UTC (rev 6765)
@@ -14,6 +14,7 @@
 
 import org.jboss.tools.common.model.*;
 import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.common.meta.XMapping;
 import org.jboss.tools.common.meta.action.*;
 import org.jboss.tools.common.meta.action.impl.handlers.*;
 import org.jboss.tools.common.meta.help.HelpUtil;
@@ -332,6 +333,23 @@
 		}
 		return best == null ? null : best.getAttribute().getName();
 	}
+	
+	public String getHelpContextId() {
+		if(action == null) return null;
+		String s = action.getProperty("helpId");
+		if(s != null && s.length() == 0) return null;
+		int i = s.indexOf('%');
+		if(i < 0) return s;
+		int j = s.indexOf('%', i + 1);
+		if(j < 0) return s;
+		String vr = s.substring(i + 1, j);
+		String tail = s.substring(j + 1);
+		XMapping map = action.getMetaModel().getMapping("HelpPlugins");
+		if(map == null) return s;
+		String varValue = map.getValue(vr);
+		if(varValue == null) return s;
+		return varValue + tail;
+	}
 
 }
 




More information about the jbosstools-commits mailing list