Author: DartPeng
Date: 2009-05-12 03:02:01 -0400 (Tue, 12 May 2009)
New Revision: 15218
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
Log:
JBIDE-4298
change some label text
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-05-12 00:52:12
UTC (rev 15217)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-05-12 07:02:01
UTC (rev 15218)
@@ -85,13 +85,13 @@
_UI_FeaturesType_type = Features
_UI_HandlersType_type = Handlers
_UI_HandlerType_type = Handler
-_UI_ImportType_type = Import
-_UI_ParamsType_type = Params
+_UI_ImportType_type = Import Smooks Configuration
+_UI_ParamsType_type = Global Parameters
_UI_ParamType_type = Param
_UI_ProfilesType_type = Profiles
_UI_ProfileType_type = Profile
_UI_ReaderType_type = Custome Reader
-_UI_ResourceConfigType_type = Resource Config
+_UI_ResourceConfigType_type = Custom Resource Configuration
_UI_ResourceType_type = Resource
_UI_SetOffType_type = Set Off
_UI_SetOnType_type = Set On
@@ -125,14 +125,14 @@
_UI_DocumentRoot_features_feature = Features
_UI_DocumentRoot_handler_feature = Handler
_UI_DocumentRoot_handlers_feature = Handlers
-_UI_DocumentRoot_import_feature = Import
+_UI_DocumentRoot_import_feature = Import Smooks Configuration
_UI_DocumentRoot_param_feature = Param
-_UI_DocumentRoot_params_feature = Params
+_UI_DocumentRoot_params_feature = Global Parameters
_UI_DocumentRoot_profile_feature = Profile
_UI_DocumentRoot_profiles_feature = Profiles
_UI_DocumentRoot_reader_feature = Reader
_UI_DocumentRoot_resource_feature = Resource
-_UI_DocumentRoot_resourceConfig_feature = Resource Config
+_UI_DocumentRoot_resourceConfig_feature = Custom Resource Configuration
_UI_DocumentRoot_setOff_feature = Set Off
_UI_DocumentRoot_setOn_feature = Set On
_UI_DocumentRoot_smooksResourceList_feature = Smooks Resource List
@@ -153,7 +153,7 @@
_UI_ProfileType_subProfiles_feature = Sub Profiles
_UI_ReaderType_handlers_feature = Handlers
_UI_ReaderType_features_feature = Features
-_UI_ReaderType_params_feature = Params
+_UI_ReaderType_params_feature = Global Parameters
_UI_ReaderType_class_feature = Class
_UI_ResourceConfigType_resource_feature = Resource
_UI_ResourceConfigType_condition_feature = Condition
@@ -165,7 +165,7 @@
_UI_ResourceType_type_feature = Type
_UI_SetOffType_feature_feature = Feature
_UI_SetOnType_feature_feature = Feature
-_UI_SmooksResourceListType_params_feature = Params
+_UI_SmooksResourceListType_params_feature = Global Parameters
_UI_SmooksResourceListType_conditions_feature = Conditions
_UI_SmooksResourceListType_profiles_feature = Profiles
_UI_SmooksResourceListType_abstractReaderGroup_feature = Abstract Reader Group
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-05-12
00:52:12 UTC (rev 15217)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-05-12
07:02:01 UTC (rev 15218)
@@ -55,6 +55,7 @@
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.actions.AddSmooksResourceAction;
import org.jboss.tools.smooks.configuration.actions.ValidateSmooksAction;
+import org.jboss.tools.smooks.model.calc.Counter;
import org.jboss.tools.smooks.model.datasource.DataSourceJndi;
import org.jboss.tools.smooks.model.datasource.Direct;
import org.jboss.tools.smooks.model.dbrouting.Executor;
@@ -647,59 +648,66 @@
}
protected void groupActions(MenuManager manager, Collection<?> createChildActions)
{
- MenuManager readers = new MenuManager("Reader");
- manager.add(readers);
+ MenuManager readerMenu = new MenuManager("Reader");
+ manager.add(readerMenu);
- MenuManager templating = new MenuManager("Templating");
- manager.add(templating);
+ MenuManager templatingMenu = new MenuManager("Templating");
+ manager.add(templatingMenu);
- MenuManager jbinding = new MenuManager("Java Binding");
- manager.add(jbinding);
+ MenuManager jbindingMenu = new MenuManager("Java Binding");
+ manager.add(jbindingMenu);
- MenuManager datasources = new MenuManager("Datasources");
- manager.add(datasources);
+ MenuManager datasourcesMenu = new MenuManager("Datasources");
+ manager.add(datasourcesMenu);
- MenuManager scripting = new MenuManager("Scripting");
- manager.add(scripting);
+ MenuManager scriptingMenu = new MenuManager("Scripting");
+ manager.add(scriptingMenu);
- MenuManager fragmentRouting = new MenuManager("Fragment Routing");
- manager.add(fragmentRouting);
+ MenuManager fragmentRoutingMenu = new MenuManager("Fragment Routing");
+ manager.add(fragmentRoutingMenu);
- MenuManager database = new MenuManager("Database");
- manager.add(database);
+ MenuManager databaseMenu = new MenuManager("Database");
+ manager.add(databaseMenu);
+
+ MenuManager calcMenu = new MenuManager("Calc");
+ manager.add(calcMenu);
for (Iterator<?> iterator = createChildActions.iterator(); iterator.hasNext();)
{
boolean added = false;
AddSmooksResourceAction action = (AddSmooksResourceAction) iterator.next();
Object descriptor = action.getDescriptor();
-
- if (isReader(descriptor)) {
- readers.add(action);
+ if (isCalcDescriptor(descriptor)) {
+ calcMenu.add(action);
added = true;
}
- if (isTemplate(descriptor)) {
- templating.add(action);
+
+ if (isReaderDescriptor(descriptor)) {
+ readerMenu.add(action);
added = true;
}
- if (isJavaBinding(descriptor)) {
- jbinding.add(action);
+ if (isTemplateDescriptor(descriptor)) {
+ templatingMenu.add(action);
added = true;
}
- if (isDatasources(descriptor)) {
- datasources.add(action);
+ if (isJavaBindingDescriptor(descriptor)) {
+ jbindingMenu.add(action);
added = true;
}
+ if (isDatasourcesDescriptor(descriptor)) {
+ datasourcesMenu.add(action);
+ added = true;
+ }
if(isDatabaseDescriptor(descriptor)){
- database.add(action);
+ databaseMenu.add(action);
added = true;
}
- if (isScripting(descriptor)) {
- scripting.add(action);
+ if (isScriptingDescriptor(descriptor)) {
+ scriptingMenu.add(action);
added = true;
}
- if (isFragmentRouting(descriptor)) {
- fragmentRouting.add(action);
+ if (isFragmentRoutingDescriptor(descriptor)) {
+ fragmentRoutingMenu.add(action);
added = true;
}
if (!added) {
@@ -707,15 +715,21 @@
}
}
- orderReaderAction(readers);
- orderTemplateAction(templating);
- orderJBindingAction(jbinding);
- orderDatasourceAction(datasources);
- orderScriptAction(scripting);
- orderFragmentAction(fragmentRouting);
- orderDatabaseAction(database);
+ orderReaderAction(readerMenu);
+ orderTemplateAction(templatingMenu);
+ orderJBindingAction(jbindingMenu);
+ orderDatasourceAction(datasourcesMenu);
+ orderScriptAction(scriptingMenu);
+ orderFragmentAction(fragmentRoutingMenu);
+ orderDatabaseAction(databaseMenu);
+ orderCalcAction(calcMenu);
}
+ protected void orderCalcAction(MenuManager database) {
+ // TODO Auto-generated method stub
+
+ }
+
protected void orderDatabaseAction(MenuManager database) {
// TODO Auto-generated method stub
@@ -771,6 +785,18 @@
}
}
}
+
+ protected boolean isCalcDescriptor(Object descriptor) {
+ if (descriptor instanceof CommandParameter) {
+ CommandParameter parameter = (CommandParameter) descriptor;
+ if (parameter.getValue() != null) {
+ if (AdapterFactoryEditingDomain.unwrap(parameter.getValue()) instanceof Counter) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
private boolean isDatabaseDescriptor(Object descriptor) {
if (descriptor instanceof CommandParameter) {
@@ -784,7 +810,7 @@
return false;
}
- private boolean isFragmentRouting(Object descriptor) {
+ private boolean isFragmentRoutingDescriptor(Object descriptor) {
if (descriptor instanceof CommandParameter) {
CommandParameter parameter = (CommandParameter) descriptor;
if (parameter.getValue() != null) {
@@ -802,7 +828,7 @@
return false;
}
- private boolean isScripting(Object descriptor) {
+ private boolean isScriptingDescriptor(Object descriptor) {
if (descriptor instanceof CommandParameter) {
CommandParameter parameter = (CommandParameter) descriptor;
if (parameter.getValue() != null) {
@@ -814,7 +840,7 @@
return false;
}
- private boolean isDatasources(Object descriptor) {
+ private boolean isDatasourcesDescriptor(Object descriptor) {
if (descriptor instanceof CommandParameter) {
CommandParameter parameter = (CommandParameter) descriptor;
if (parameter.getValue() != null) {
@@ -829,7 +855,7 @@
return false;
}
- private boolean isJavaBinding(Object descriptor) {
+ private boolean isJavaBindingDescriptor(Object descriptor) {
if (descriptor instanceof CommandParameter) {
CommandParameter parameter = (CommandParameter) descriptor;
if (parameter.getValue() != null) {
@@ -841,7 +867,7 @@
return false;
}
- private boolean isTemplate(Object descriptor) {
+ private boolean isTemplateDescriptor(Object descriptor) {
if (descriptor instanceof CommandParameter) {
CommandParameter parameter = (CommandParameter) descriptor;
if (parameter.getValue() != null) {
@@ -856,7 +882,7 @@
return false;
}
- private boolean isReader(Object descriptor) {
+ private boolean isReaderDescriptor(Object descriptor) {
if (descriptor instanceof CommandParameter) {
CommandParameter parameter = (CommandParameter) descriptor;
if (parameter.getValue() != null) {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-05-12
00:52:12 UTC (rev 15217)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-05-12
07:02:01 UTC (rev 15218)
@@ -24,6 +24,7 @@
import org.eclipse.emf.ecore.EEnumLiteral;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor.PropertyValueWrapper;
@@ -90,7 +91,7 @@
public void createContents(Composite parent) {
parent.setLayout(new FillLayout());
- section = formToolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
+ section = formToolkit.createSection(parent, Section.TITLE_BAR);
Composite client = formToolkit.createComposite(section);
section.setLayout(new FillLayout());
@@ -187,7 +188,7 @@
if (marker.getMarkerType() != IFieldMarker.TYPE_ERROR)
marker.setMarkerType(IFieldMarker.TYPE_ERROR);
}
-
+
if (diagnostic.getSeverity() == Diagnostic.WARNING) {
if (marker.getMarkerType() != IFieldMarker.TYPE_WARINING)
marker.setMarkerType(IFieldMarker.TYPE_WARINING);
@@ -436,7 +437,12 @@
protected void refreshWhenSelectionChanged() {
Object model = getModel();
if (model instanceof EObject) {
- String text = ((EObject) model).eClass().getName();
+ IItemLabelProvider labelProvider = (IItemLabelProvider)
this.editingDomain.getAdapterFactory().adapt(model,
+ IItemLabelProvider.class);
+ String text = labelProvider.getText(model);
+ if (text == null || text.length() == 0) {
+ text = ((EObject) model).eClass().getName();
+ }
section.setText(text);
section.setDescription("Details of " + text + ". Required fields are
denoted by \"*\".");
section.layout();
Show replies by date