Author: scabanovich
Date: 2008-11-12 10:13:07 -0500 (Wed, 12 Nov 2008)
New Revision: 11709
Added:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-lists.properties
Modified:
trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-attrs.properties
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java
Log:
JBIDE-2969
Modified: trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2008-11-12 15:10:59 UTC
(rev 11708)
+++ trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2008-11-12 15:13:07 UTC
(rev 11709)
@@ -50,6 +50,7 @@
<keys path="help/keys-model.properties"/>
<keys path="help/keys-model-attrs.properties"/>
<keys path="help/keys-model-menu.properties"/>
+ <keys path="help/keys-model-lists.properties"/>
</extension>
<extension id="modelnature"
point="org.eclipse.core.resources.natures">
<runtime>
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-attrs.properties
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-attrs.properties 2008-11-12
15:10:59 UTC (rev 11708)
+++
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-attrs.properties 2008-11-12
15:13:07 UTC (rev 11709)
@@ -81,3 +81,4 @@
Model.text_to_find=Text to Find
Model.ignore_case=Ignore Case
Model.equality=Equality
+Model.encoding=Encoding
Added:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-lists.properties
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-lists.properties
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-lists.properties 2008-11-12
15:13:07 UTC (rev 11709)
@@ -0,0 +1,53 @@
+#Global values
+lists.true=tru1e
+lists.false=fals1e
+lists.yes=yes
+lists.no=no
+lists.default_true_=default(true)
+lists.default_false_=default(false)
+lists.Default_true_=Default(true)
+lists.Default_false_=Default(false)
+
+#Tabs of VPE
+Model.lists.Visual_Source=Visual/Source
+Model.lists.Source=Source
+Model.lists.Preview=Preview
+
+#
+Model.lists.general=general
+Model.lists.project=project
+
+#File extensions
+Model.lists.html=html
+Model.lists.htm=htm
+Model.lists.java=java
+Model.lists.jsp=jsp
+Model.lists.xhtml=xhtml
+Model.lists.xml=xml
+Model.lists.HTML=HTML
+Model.lists.JAVA=JAVA
+Model.lists.XSL=XSL
+
+#types
+Model.lists.Monospaced=Monospaced
+Model.lists.Serif=Serif
+Model.lists.SansSerif=SansSerif
+Model.lists.Dialog=Dialog
+Model.lists.DialogInput=DialogInput
+Model.lists.SmallSystem=SmallSystem
+Model.lists.System=System
+
+#defaults for some integer attributes
+Model.lists.default_20_=default(20)
+Model.lists.default_185_=default(185)
+
+#miscellaneous
+Model.lists.Top=Top
+Model.lists.Center=Center
+Model.lists.Application=Application
+Model.lists.never=never
+Model.lists.once_a_week=once a week
+Model.lists.once_a_month=once a month
+Model.lists.coincides=coincides
+Model.lists.contains=contains
+Model.lists.is_contained=is contained
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java 2008-11-12
15:10:59 UTC (rev 11708)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java 2008-11-12
15:13:07 UTC (rev 11709)
@@ -162,4 +162,30 @@
return item.getDisplayName();
}
+ public static String getVisualListValue(XAttribute attr, String value) {
+ if(attr == null || value == null || value.length() == 0) return value;
+ String keyPart = toKey(value);
+ String module = attr.getModelEntity().getModule();
+ String key1 = module + "." + "lists." + keyPart;
+ String result = WizardKeys.getString(key1);
+ if(result != null) return result;
+ String key2 = "lists." + keyPart;
+ result = WizardKeys.getString(key2);
+ if(result != null) return result;
+ return value;
+ }
+
+ public static String toKey(String s) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < s.length(); i++) {
+ char c = s.charAt(i);
+ if(c == '.' || Character.isJavaIdentifierPart(c)) {
+ sb.append(c);
+ } else {
+ sb.append('_');
+ }
+ }
+ return sb.toString();
+ }
+
}
Show replies by date