[jbosstools-commits] JBoss Tools SVN: r22834 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor/bundle and 5 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Jun 16 09:23:17 EDT 2010
Author: dmaliarevich
Date: 2010-06-16 09:23:16 -0400 (Wed, 16 Jun 2010)
New Revision: 22834
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ExternalizeStringsContributionItem.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ExternalizeStringsAction.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6287 , Menu item was added to the Souece cotext menu, selection was updated.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-06-16 12:32:25 UTC (rev 22833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-06-16 13:23:16 UTC (rev 22834)
@@ -99,6 +99,13 @@
id="org.jboss.tools.vpe.editor.menu.SetupTemplateContributionItem">
</dynamic>
</menuContribution>
+ <menuContribution
+ locationURI="popup:org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor.source.EditorContext?after=org.jboss.tools.vpe.editor.menu.SetupTemplateContributionItem">
+ <dynamic
+ class="org.jboss.tools.vpe.editor.menu.ExternalizeStringsContributionItem"
+ id="org.jboss.tools.vpe.editor.menu.ExternalizeStringsContributionItem">
+ </dynamic>
+ </menuContribution>
</extension>
<extension
point="org.eclipse.ui.menus">
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2010-06-16 12:32:25 UTC (rev 22833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2010-06-16 13:23:16 UTC (rev 22834)
@@ -59,7 +59,10 @@
public class BundleMap {
public static final String TITLE_ATTRIBUTE_NAME = "title"; //$NON-NLS-1$
-
+ private static final String[] JSF_PROJECT_NATURES = {
+ WebProject.JSF_NATURE_ID
+ };
+
private BundleMapListener[] bundleMapListeners = new BundleMapListener[0];
private StructuredTextEditor editor;
@@ -92,48 +95,47 @@
}
public void refreshRegisteredBundles() {
- if (!hasJsfProjectNatureType()
- || !(editor.getEditorInput() instanceof IFileEditorInput)) {
- return;
+ if (hasJsfProjectNatureType()
+ && (editor.getEditorInput() instanceof IFileEditorInput)) {
+ IProject project = ((IFileEditorInput) editor.getEditorInput())
+ .getFile().getProject();
+ IModelNature modelNature = EclipseResourceUtil
+ .getModelNature(project);
+ if (modelNature != null) {
+ XModel model = modelNature.getModel();
+ List<Object> l = WebPromptingProvider.getInstance().getList(
+ model, WebPromptingProvider.JSF_REGISTERED_BUNDLES,
+ null, null);
+ if (l != null && l.size() > 1 && (l.get(1) instanceof Map)) {
+ Map<?, ?> map = (Map<?, ?>) l.get(1);
+ /*
+ * Fix for https://jira.jboss.org/jira/browse/JBIDE-5218
+ * When updating f:view's locale attribute right after
+ * template creation - map of registered bundles is empty
+ * and couldn't be updated. To change bundle's locale they
+ * should be accessed through <code>bundles</code> variable.
+ */
+ if (map.keySet().size() > 0) {
+ Iterator<?> it = map.keySet().iterator();
+ while (it.hasNext()) {
+ String uri = it.next().toString();
+ String prefix = map.get(uri).toString();
+ int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
+ removeBundle(hash);
+ addBundle(hash, prefix, uri, true);
+ }
+ } else if (bundles.length > 0) {
+ for (int i = 0; i < bundles.length; i++) {
+ String uri = bundles[i].uri;
+ String prefix = bundles[i].prefix;
+ int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
+ removeBundle(hash);
+ addBundle(hash, prefix, uri, true);
+ }
+ }
+ }
+ }
}
- IProject project = ((IFileEditorInput) editor.getEditorInput())
- .getFile().getProject();
- IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
- if (modelNature == null) {
- return;
- }
- XModel model = modelNature.getModel();
- List<Object> l = WebPromptingProvider.getInstance().getList(model,
- WebPromptingProvider.JSF_REGISTERED_BUNDLES, null, null);
- if (l == null || l.size() < 2 || !(l.get(1) instanceof Map)) {
- return;
- }
- Map<?, ?> map = (Map<?, ?>) l.get(1);
- /*
- * Fix for https://jira.jboss.org/jira/browse/JBIDE-5218
- * When updating f:view's locale attribute right after template creation -
- * map of registered bundles is empty and couldn't be updated.
- * To change bundle's locale they should be accessed through
- * <code>bundles</code> variable.
- */
- if (map.keySet().size() > 0) {
- Iterator<?> it = map.keySet().iterator();
- while (it.hasNext()) {
- String uri = it.next().toString();
- String prefix = map.get(uri).toString();
- int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
- removeBundle(hash);
- addBundle(hash, prefix, uri, true);
- }
- } else if (bundles.length > 0) {
- for (int i = 0; i < bundles.length; i++) {
- String uri = bundles[i].uri;
- String prefix = bundles[i].prefix;
- int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
- removeBundle(hash);
- addBundle(hash, prefix, uri, true);
- }
- }
}
public void clearAll() {
@@ -149,25 +151,24 @@
return showBundleUsageAsEL;
}
- private static final String[] JSF_PROJECT_NATURES = {
- WebProject.JSF_NATURE_ID
- };
-
private boolean hasJsfProjectNatureType() {
+ boolean hasJsfProjectNatureType = false;
try {
IEditorInput ei = editor.getEditorInput();
- if(!(ei instanceof IFileEditorInput)) return false;
- IProject project = ((IFileEditorInput)ei).getFile().getProject();
- if (!project.exists() || !project.isOpen()) return false;
-
- for (int i = 0; i < JSF_PROJECT_NATURES.length; i++) {
- if (project.hasNature(JSF_PROJECT_NATURES[i]))
- return true;
+ if(ei instanceof IFileEditorInput) {
+ IProject project = ((IFileEditorInput)ei).getFile().getProject();
+ if (project.exists() && project.isOpen()) {
+ for (int i = 0; i < JSF_PROJECT_NATURES.length; i++) {
+ if (project.hasNature(JSF_PROJECT_NATURES[i]))
+ hasJsfProjectNatureType = true;
+ break;
+ }
+ }
}
} catch (CoreException e) {
VpePlugin.getPluginLog().logError(e);
}
- return false;
+ return hasJsfProjectNatureType;
}
public boolean openBundle(String expression, String locale){
@@ -307,7 +308,7 @@
removeBundle(hashCode, true);
}
- private void addBundle(int hashCode, String prefix, String uri,boolean refresh) {
+ public void addBundle(int hashCode, String prefix, String uri,boolean refresh) {
ResourceBundle bundle = getBundleByUrl(uri, locale);
BundleEntry entry = new BundleEntry(bundle, uri, prefix, hashCode);
if (bundle != null) {
@@ -619,5 +620,5 @@
public BundleEntry[] getBundles() {
return bundles;
}
-
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java 2010-06-16 12:32:25 UTC (rev 22833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java 2010-06-16 13:23:16 UTC (rev 22834)
@@ -11,6 +11,7 @@
package org.jboss.tools.vpe.editor.dialog;
import java.io.ByteArrayInputStream;
+import java.io.IOException;
import java.io.InputStream;
import org.eclipse.core.resources.IFile;
@@ -18,36 +19,38 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.common.model.ui.ModelUIImages;
-import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.messages.VpeUIMessages;
public class ExternalizeStringsWizard extends Wizard {
- public String ExternalizeStringsWizardPageName = "ExternalizeStringsWizardPage";
- public String NewFileCreationPageName = "NewFileCreationPage";
+ public String ExternalizeStringsWizardPageName = "ExternalizeStringsWizardPage"; //$NON-NLS-1$
+ public String NewFileCreationPageName = "NewFileCreationPage"; //$NON-NLS-1$
- VpeController vpeController = null;
+ StructuredTextEditor editor = null;
+ BundleMap bm = null;
ExternalizeStringsWizardPage page1 = null;
WizardNewFileCreationPage page2 = null;
- public ExternalizeStringsWizard(VpeController vpeController) {
+ public ExternalizeStringsWizard(StructuredTextEditor editor, BundleMap bm) {
super();
setHelpAvailable(false);
- setWindowTitle(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE);
- this.vpeController = vpeController;
+ setWindowTitle(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_TITLE);
+ this.editor = editor;
+ this.bm = bm;
}
@Override
public void addPages() {
super.addPages();
page1 = new ExternalizeStringsWizardPage(
- ExternalizeStringsWizardPageName, vpeController);
+ ExternalizeStringsWizardPageName, editor, bm);
page2 = new WizardNewFileCreationPage(NewFileCreationPageName,
- (IStructuredSelection) vpeController
- .getSourceEditor().getSelectionProvider().getSelection());
- page2.setTitle(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE);
- page2.setDescription(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION);
+ (IStructuredSelection) editor.getSelectionProvider().getSelection());
+ page2.setTitle(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_TITLE);
+ page2.setDescription(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION);
page2.setImageDescriptor(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT));
addPage(page1);
addPage(page2);
@@ -80,8 +83,12 @@
InputStream is = new ByteArrayInputStream(page1.getKeyValuePair().getBytes());
try {
bundleFile.appendContents(is, false, true, null);
+ is.close();
+ is = null;
} catch (CoreException e) {
e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
}
}
/*
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java 2010-06-16 12:32:25 UTC (rev 22833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java 2010-06-16 13:23:16 UTC (rev 22834)
@@ -14,9 +14,13 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -29,6 +33,7 @@
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -47,22 +52,37 @@
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
+import org.eclipse.wst.xml.core.internal.document.AttrImpl;
+import org.eclipse.wst.xml.core.internal.document.NodeImpl;
+import org.eclipse.wst.xml.core.internal.document.TextImpl;
+import org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditingTextTools;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.ui.ModelUIImages;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
import org.jboss.tools.vpe.VpePlugin;
-import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.bundle.BundleMap.BundleEntry;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class ExternalizeStringsWizardPage extends WizardPage {
private final int DIALOG_WIDTH = 450;
private final int DIALOG_HEIGHT = 650;
- private VpeController vpeController;
+ private StructuredTextEditor editor;
private Text propsKey;
private Text propsValue;
private Button newFile;
@@ -78,17 +98,25 @@
private Table tagsTable;
- public ExternalizeStringsWizardPage(String pageName, VpeController vpeController) {
+ public ExternalizeStringsWizardPage(String pageName, StructuredTextEditor editor, BundleMap bm) {
/*
* Setting dialog Title, Description, Image.
*/
super(pageName,
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE,
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_TITLE,
ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT));
- setDescription(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION);
+ setDescription(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION);
setPageComplete(false);
- this.vpeController = vpeController;
- this.bm = vpeController.getPageContext().getBundle();
+ this.editor = editor;
+ if (bm != null) {
+ this.bm = bm;
+ } else {
+ /*
+ * When BundleMap is null create it manually
+ * with all necessary initialization
+ */
+ this.bm = createBundleMap(editor);
+ }
propsKeyStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
propsValueStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
rbComboStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
@@ -114,34 +142,20 @@
Group propsStringGroup = new Group(composite, SWT.SHADOW_ETCHED_IN);
propsStringGroup.setLayout(new GridLayout(3, false));
propsStringGroup.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1));
- propsStringGroup.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP);
-
-// /*
-// * Create Text String label
-// */
-// Label textStringLabel = new Label(propsStringGroup, SWT.NONE);
-// textStringLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
-// textStringLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TEXT_STRING);
-// /*
-// * Create Text String value
-// */
-// textStringValue = new Text(propsStringGroup, SWT.BORDER);
-// textStringValue.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
-// textStringValue.setText(Constants.EMPTY);
-// textStringValue.setEditable(false);
+ propsStringGroup.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP);
/*
* Create Properties Key label
*/
Label propsKeyLabel = new Label(propsStringGroup, SWT.NONE);
propsKeyLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
- propsKeyLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_KEY);
+ propsKeyLabel.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_KEY);
/*
* Create Properties Key value
*/
propsKey = new Text(propsStringGroup, SWT.BORDER);
propsKey.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
- propsKey.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DEFAULT_KEY);
+ propsKey.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_DEFAULT_KEY);
propsKey.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
updateStatus();
@@ -152,7 +166,7 @@
*/
Label propsValueLabel = new Label(propsStringGroup, SWT.NONE);
propsValueLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
- propsValueLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE);
+ propsValueLabel.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE);
/*
* Create Properties Value value
*/
@@ -171,7 +185,7 @@
*/
newFile = new Button(composite, SWT.CHECK);
newFile.setLayoutData(new GridData(SWT.LEFT, SWT.NONE, false, false, 1, 1));
- newFile.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_NEW_FILE);
+ newFile.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_NEW_FILE);
/*
* Create properties string group
@@ -181,7 +195,7 @@
gd = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
gd.heightHint = 300;
propsFilesGroup.setLayoutData(gd);
- propsFilesGroup.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP);
+ propsFilesGroup.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP);
/*
* Add selection listener to New File button
@@ -204,7 +218,7 @@
*/
rbListLabel = new Label(propsFilesGroup, SWT.NONE);
rbListLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
- rbListLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST);
+ rbListLabel.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST);
/*
* Create Resource Bundles combobox
*/
@@ -235,7 +249,7 @@
*/
propsFileLabel = new Label(propsFilesGroup, SWT.NONE);
propsFileLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false,false, 1, 1));
- propsFileLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_FILE);
+ propsFileLabel.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_FILE);
/*
* Create Properties File path field
*/
@@ -255,11 +269,11 @@
ColumnLayoutData columnLayoutData;
TableColumn propNameColumn = new TableColumn(tagsTable, SWT.NONE);
- propNameColumn.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTY_NAME);
+ propNameColumn.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_PROPERTY_NAME);
columnLayoutData = new ColumnWeightData(200, true);
layout.addColumnData(columnLayoutData);
TableColumn propValueColumn = new TableColumn(tagsTable, SWT.NONE);
- propValueColumn.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTY_VALUE);
+ propValueColumn.setText(VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_PROPERTY_VALUE);
columnLayoutData = new ColumnWeightData(200, true);
layout.addColumnData(columnLayoutData);
@@ -275,54 +289,47 @@
}
private void initializeTextFields() {
- if ((vpeController == null) || (bm == null)){
+ if (bm == null){
VpePlugin.getDefault().logWarning(
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR);
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR);
} else {
- ISelection sel = vpeController.getSourceEditor().getSelectionProvider().getSelection();
+ ISelection sel = editor.getSelectionProvider().getSelection();
if ((propsValue != null) && (propsKey != null)
&& isSelectionCorrect(sel)) {
- /*
- * TODO: One must add functionality
- * for convenient text replacement
- */
+ String text = Constants.EMPTY;
String stringToUpdate = Constants.EMPTY;
TextSelection textSelection = null;
- String text = null;
IStructuredSelection structuredSelection = (IStructuredSelection) sel;
textSelection = (TextSelection) sel;
text = textSelection.getText();
- /*
- * Update text string field
- */
- propsValue.setText(text);
- /*
- * Update status message.
- */
- updateStatus();
-
Object selectedElement = structuredSelection.getFirstElement();
/*
- * Parse selected element and find a string to replace
+ * When selected text in empty
+ * parse selected element and find a string to replace.
*/
- if (selectedElement instanceof org.w3c.dom.Text) {
- org.w3c.dom.Text textNode = (org.w3c.dom.Text) selectedElement;
- if ((textNode.getNodeValue().trim().length() > 0)
- && (text.trim().length() > 0)) {
- stringToUpdate = textNode.getNodeValue();
+ if ((text.trim().length() == 0)) {
+ if (selectedElement instanceof org.w3c.dom.Text) {
+ org.w3c.dom.Text textNode = (org.w3c.dom.Text) selectedElement;
+ if (textNode.getNodeValue().trim().length() > 0) {
+ stringToUpdate = textNode.getNodeValue();
+ editor.getSelectionProvider().setSelection(new StructuredSelection(stringToUpdate));
+ }
+ } else if (selectedElement instanceof Attr) {
+ Attr attrNode = (Attr) selectedElement;
+ if (attrNode.getNodeValue().trim().length() > 0) {
+ stringToUpdate = attrNode.getNodeValue();
+ editor.getSelectionProvider().setSelection(new StructuredSelection(stringToUpdate));
+ }
}
- } else if (selectedElement instanceof Attr) {
- Attr attrNode = (Attr) selectedElement;
- if ((attrNode.getNodeValue().trim().length() > 0)
- && (text.trim().length() > 0)) {
- stringToUpdate = attrNode.getNodeValue();
+ if ((stringToUpdate.trim().length() > 0)) {
+ text = stringToUpdate;
}
- } else {
- VpePlugin.getDefault().logWarning(
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR);
}
-
/*
+ * Update text string field
+ */
+ propsValue.setText(text.trim());
+ /*
* Initialize bundle messages field
*/
BundleEntry[] bundles = bm.getBundles();
@@ -333,9 +340,13 @@
rbCombo.add(bundleEntry.uri);
}
}
+ /*
+ * Update status message.
+ */
+ updateStatus();
} else {
VpePlugin.getDefault().logWarning(
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR);
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR);
}
}
}
@@ -429,7 +440,6 @@
}
public boolean replaceText() {
- StructuredTextEditor editor = vpeController.getSourceEditor();
IDocumentProvider prov = editor.getDocumentProvider();
IDocument doc = prov.getDocument(editor.getEditorInput());
ISelection sel = editor.getSelectionProvider().getSelection();
@@ -438,7 +448,26 @@
/*
* Get source text and new text
*/
- final TextSelection textSel = (TextSelection) sel;
+ TextSelection textSel = (TextSelection) sel;
+ IStructuredSelection structuredSelection = (IStructuredSelection) sel;
+ Object firstElement = structuredSelection.getFirstElement();
+ int offset = 0;
+ int length = 0;
+ if ((textSel.getLength() != 0)) {
+ offset = textSel.getOffset();
+ length = textSel.getLength();
+ } else if (firstElement instanceof TextImpl) {
+ TextImpl ti = (TextImpl) firstElement;
+ offset = ti.getStartOffset();
+ length = ti.getLength();
+ } else if (firstElement instanceof AttrImpl) {
+ AttrImpl ai = (AttrImpl) firstElement;
+ /*
+ * Get offset and length without quotes ".."
+ */
+ offset = ai.getValueRegionStartOffset() + 1;
+ length = ai.getValueRegionText().length() - 2;
+ }
/*
* Replace text in the editor with "key.value"
*/
@@ -451,7 +480,7 @@
}
}
String newText = "#{" + bundlePrefix + Constants.DOT + propsKey.getText() + "}"; //$NON-NLS-1$ //$NON-NLS-2$
- doc.replace(textSel.getOffset(), textSel.getLength(), newText);
+ doc.replace(offset, length, newText);
} catch (BadLocationException ex) {
ex.printStackTrace();
}
@@ -464,7 +493,7 @@
rbComboStatus = new Status(
IStatus.ERROR,
VpePlugin.PLUGIN_ID,
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_KEY_ALREADY_EXISTS);
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_KEY_ALREADY_EXISTS);
} else {
rbComboStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
}
@@ -479,7 +508,7 @@
propsValueStatus = new Status(
IStatus.ERROR,
VpePlugin.PLUGIN_ID,
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT);
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT);
} else {
propsValueStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
}
@@ -491,7 +520,7 @@
propsKeyStatus = new Status(
IStatus.ERROR,
VpePlugin.PLUGIN_ID,
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET);
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET);
} else {
propsKeyStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
}
@@ -570,5 +599,77 @@
&& (newFile.getSelection() == true);
}
+ private BundleMap createBundleMap(StructuredTextEditor editor) {
+ String uri = null;
+ String prefix = null;
+ int hash;
+ Map<?, ?> map = null;
+ BundleMap bm = new BundleMap();
+ bm.init(editor);
+
+ /*
+ * Check JSF Nature
+ */
+ boolean hasJsfProjectNatureType = false;
+ try {
+ IEditorInput ei = editor.getEditorInput();
+ if(ei instanceof IFileEditorInput) {
+ IProject project = ((IFileEditorInput)ei).getFile().getProject();
+ if (project.exists() && project.isOpen()) {
+ if (project.hasNature(WebProject.JSF_NATURE_ID)) {
+ hasJsfProjectNatureType = true;
+ }
+ }
+ }
+ } catch (CoreException e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
+
+ /*
+ * Get Bundles from faces-config.xml
+ */
+ if (hasJsfProjectNatureType
+ && (editor.getEditorInput() instanceof IFileEditorInput)) {
+ IProject project = ((IFileEditorInput) editor.getEditorInput())
+ .getFile().getProject();
+ IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
+ if (modelNature != null) {
+ XModel model = modelNature.getModel();
+ List<Object> l = WebPromptingProvider.getInstance().getList(model,
+ WebPromptingProvider.JSF_REGISTERED_BUNDLES, null, null);
+ if (l != null && l.size() > 1 && (l.get(1) instanceof Map)) {
+ map = (Map<?, ?>) l.get(1);
+ if ((null != map) && (map.keySet().size() > 0)) {
+ Iterator<?> it = map.keySet().iterator();
+ while (it.hasNext()) {
+ uri = it.next().toString();
+ prefix = map.get(uri).toString();
+ hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
+ bm.addBundle(hash, prefix, uri, false);
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Add bundles from <f:loadBundle> tags
+ */
+ ISourceEditingTextTools sourceEditingTextTools =
+ (ISourceEditingTextTools) editor
+ .getAdapter(ISourceEditingTextTools.class);
+ IDOMSourceEditingTextTools domSourceEditingTextTools =
+ (IDOMSourceEditingTextTools) sourceEditingTextTools;
+ Document doc = domSourceEditingTextTools.getDOMDocument();
+ NodeList list = doc.getElementsByTagName("f:loadBundle"); //$NON-NLS-1$
+ for (int i = 0; i < list.getLength(); i++) {
+ Element node = (Element) list.item(i);
+ uri = node.getAttribute("basename"); //$NON-NLS-1$
+ prefix = node.getAttribute("var"); //$NON-NLS-1$
+ hash = node.hashCode();
+ bm.addBundle(hash, prefix, uri, false);
+ }
+ return bm;
+ }
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ExternalizeStringsContributionItem.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ExternalizeStringsContributionItem.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ExternalizeStringsContributionItem.java 2010-06-16 13:23:16 UTC (rev 22834)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.menu;
+
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.swt.widgets.Menu;
+import org.jboss.tools.vpe.editor.menu.action.ExternalizeStringsAction;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public class ExternalizeStringsContributionItem extends ActionContributionItem {
+
+ public ExternalizeStringsContributionItem() {
+ super(new ExternalizeStringsAction());
+ }
+
+ @Override
+ public void fill(Menu parent, int index) {
+ getAction().setText(VpeUIMessages.EXTERNALIZE_STRINGS);
+ super.fill(parent, index);
+ }
+
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ExternalizeStringsAction.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ExternalizeStringsAction.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ExternalizeStringsAction.java 2010-06-16 13:23:16 UTC (rev 22834)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.menu.action;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.dialog.ExternalizeStringsDialog;
+import org.jboss.tools.vpe.editor.dialog.ExternalizeStringsWizard;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public class ExternalizeStringsAction extends Action {
+
+ private JSPMultiPageEditor editor;
+
+ public ExternalizeStringsAction() {
+ super();
+ editor = (JSPMultiPageEditor) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ }
+
+ @Override
+ public void run() {
+ ISelection sel = editor.getSelectionProvider().getSelection();
+
+ if ((sel instanceof TextSelection)
+ && (sel instanceof IStructuredSelection)
+ && (((IStructuredSelection) sel).size() == 1)) {
+ ExternalizeStringsDialog dlg = new ExternalizeStringsDialog(
+ PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+ new ExternalizeStringsWizard(editor.getSourceEditor(), null));
+ dlg.open();
+ } else {
+ MessageDialog.openWarning(
+ PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_TITLE,
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_WRONG_SELECTION);
+ }
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-16 12:32:25 UTC (rev 22833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-16 13:23:16 UTC (rev 22834)
@@ -25,6 +25,8 @@
import java.util.Map;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -34,6 +36,7 @@
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -63,6 +66,7 @@
import org.eclipse.ui.editors.text.ILocationProvider;
import org.eclipse.ui.internal.part.StatusPart;
import org.eclipse.ui.part.EditorPart;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
import org.jboss.tools.vpe.VpePlugin;
@@ -469,7 +473,7 @@
/*
* Create EXTERNALIZE STRINGS tool bar item
*/
- externalizeStringsAction = new Action(VpeUIMessages.EXTENALIZE_STRINGS,
+ externalizeStringsAction = new Action(VpeUIMessages.EXTERNALIZE_STRINGS,
IAction.AS_PUSH_BUTTON) {
@Override
public void run() {
@@ -479,27 +483,29 @@
* When selection is correct show the dialog
* otherwise show warning message.
*/
- ISelection sel = controller.getSourceEditor().getSelectionProvider().getSelection();
+ StructuredTextEditor editor = controller.getSourceEditor();
+ ISelection sel = editor.getSelectionProvider().getSelection();
if ((sel instanceof TextSelection)
&& (sel instanceof IStructuredSelection)
&& (((IStructuredSelection) sel).size() == 1)) {
ExternalizeStringsDialog dlg = new ExternalizeStringsDialog(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- new ExternalizeStringsWizard(controller));
+ new ExternalizeStringsWizard(
+ editor, controller.getPageContext().getBundle()));
dlg.open();
} else {
MessageDialog.openWarning(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE,
- VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTION);
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_TITLE,
+ VpeUIMessages.EXTERNALIZE_STRINGS_DIALOG_WRONG_SELECTION);
}
}
};
externalizeStringsAction.setImageDescriptor(ImageDescriptor.createFromFile(MozillaEditor.class,
ICON_EXTERNALIZE_STRINGS));
- externalizeStringsAction.setToolTipText(VpeUIMessages.EXTENALIZE_STRINGS);
+ externalizeStringsAction.setToolTipText(VpeUIMessages.EXTERNALIZE_STRINGS);
toolBarManager.add(externalizeStringsAction);
updateToolbarItemsAccordingToPreferences();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-06-16 12:32:25 UTC (rev 22833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-06-16 13:23:16 UTC (rev 22834)
@@ -127,7 +127,7 @@
public static String SHOW_RESOURCE_BUNDLES_USAGE_AS_EL;
public static String SHOW_BUNDLES_AS_EL;
public static String SHOW_BUNDLES_AS_MESSAGES;
- public static String EXTENALIZE_STRINGS;
+ public static String EXTERNALIZE_STRINGS;
public static String ASK_TAG_ATTRIBUTES_ON_TAG_INSERT;
public static String ASK_CONFIRMATION_ON_CLOSING_SELECTION_BAR;
public static String INFORM_WHEN_PROJECT_MIGHT_NOT_BE_CONFIGURED_PROPERLY_FOR_VPE;
@@ -158,28 +158,28 @@
public static String COULD_NOT_SET_TABLE_SELECTION;
public static String CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT;
public static String LIST_IS_EMPTY;
- public static String EXTRNALIZE_STRINGS_DIALOG_TITLE;
- public static String EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION;
- public static String EXTRNALIZE_STRINGS_DIALOG_TEXT_STRING;
- public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_KEY;
- public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE;
- public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_FILE;
- public static String EXTRNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST;
- public static String EXTRNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP;
- public static String EXTRNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP;
- public static String EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR;
- public static String EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTION;
- public static String EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT;
- public static String EXTRNALIZE_STRINGS_DIALOG_PLEASE_SELECT_BUNDLE;
- public static String EXTRNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY;
- public static String EXTRNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET;
- public static String EXTRNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET;
- public static String EXTRNALIZE_STRINGS_DIALOG_NEW_FILE;
- public static String EXTRNALIZE_STRINGS_DIALOG_DEFAULT_KEY;
- public static String EXTRNALIZE_STRINGS_DIALOG_DEFAULT_VALUE;
- public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTY_NAME;
- public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTY_VALUE;
- public static String EXTRNALIZE_STRINGS_DIALOG_KEY_ALREADY_EXISTS;
+ public static String EXTERNALIZE_STRINGS_DIALOG_TITLE;
+ public static String EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION;
+ public static String EXTERNALIZE_STRINGS_DIALOG_TEXT_STRING;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_KEY;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_FILE;
+ public static String EXTERNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP;
+ public static String EXTERNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR;
+ public static String EXTERNALIZE_STRINGS_DIALOG_WRONG_SELECTION;
+ public static String EXTERNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PLEASE_SELECT_BUNDLE;
+ public static String EXTERNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY;
+ public static String EXTERNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET;
+ public static String EXTERNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET;
+ public static String EXTERNALIZE_STRINGS_DIALOG_NEW_FILE;
+ public static String EXTERNALIZE_STRINGS_DIALOG_DEFAULT_KEY;
+ public static String EXTERNALIZE_STRINGS_DIALOG_DEFAULT_VALUE;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PROPERTY_NAME;
+ public static String EXTERNALIZE_STRINGS_DIALOG_PROPERTY_VALUE;
+ public static String EXTERNALIZE_STRINGS_DIALOG_KEY_ALREADY_EXISTS;
public static String COULD_NOT_OPEN_VPE_RESOURCES_DIALOG;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-06-16 12:32:25 UTC (rev 22833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-06-16 13:23:16 UTC (rev 22834)
@@ -109,7 +109,7 @@
HIDE_TEXT_FORMATTING = Hide text formatting bar
SHOW_RESOURCE_BUNDLES_USAGE_AS_EL=Show resource bundles usage as EL expressions
SHOW_BUNDLES_AS_EL=Show bundle's messages as EL expressions
-EXTENALIZE_STRINGS=Externalize strings
+EXTERNALIZE_STRINGS=Externalize strings
SHOW_BUNDLES_AS_MESSAGES=Show bundle's messages explicitly
ASK_TAG_ATTRIBUTES_ON_TAG_INSERT=Ask for tag attributes during tag insert
ASK_CONFIRMATION_ON_CLOSING_SELECTION_BAR=Ask for confirmation when closing Selection Bar
@@ -146,28 +146,28 @@
LIST_IS_EMPTY=List is empty
# Externalize Strings Dialog
-EXTRNALIZE_STRINGS_DIALOG_TITLE=Externalize Strings Dialog
-EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION=Externalize your strings via properties file
-EXTRNALIZE_STRINGS_DIALOG_TEXT_STRING=Text string:
-EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_KEY=Properties key:
-EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE=Properties value:
-EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_FILE=Properties file:
-EXTRNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST=Select resource bundle:
-EXTRNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP=Externalize strings
-EXTRNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP=Handle properties file
-EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR=Could not initialize externalization dialog!
-EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTION=Wrong selection! Please select correct string.
-EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT=Wrong selected text. Please select correct string.
-EXTRNALIZE_STRINGS_DIALOG_PLEASE_SELECT_BUNDLE=- Please select bundle -
-EXTRNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY=Selected text is empty
-EXTRNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET=Key must be set
-EXTRNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET=Value must be set
-EXTRNALIZE_STRINGS_DIALOG_NEW_FILE=Create a new properties file (See details on the next page)
-EXTRNALIZE_STRINGS_DIALOG_DEFAULT_KEY=key
-EXTRNALIZE_STRINGS_DIALOG_DEFAULT_VALUE=value
-EXTRNALIZE_STRINGS_DIALOG_PROPERTY_NAME=Property name
-EXTRNALIZE_STRINGS_DIALOG_PROPERTY_VALUE=Property value
-EXTRNALIZE_STRINGS_DIALOG_KEY_ALREADY_EXISTS=Such a key already exists
+EXTERNALIZE_STRINGS_DIALOG_TITLE=Externalize Strings Dialog
+EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION=Externalize your strings via properties file
+EXTERNALIZE_STRINGS_DIALOG_TEXT_STRING=Text string:
+EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_KEY=Properties key:
+EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE=Properties value:
+EXTERNALIZE_STRINGS_DIALOG_PROPERTIES_FILE=Properties file:
+EXTERNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST=Select resource bundle:
+EXTERNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP=Externalize strings
+EXTERNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP=Handle properties file
+EXTERNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR=Could not initialize externalization dialog!
+EXTERNALIZE_STRINGS_DIALOG_WRONG_SELECTION=Wrong selection! Please select correct string.
+EXTERNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT=Wrong selected text. Please select correct string.
+EXTERNALIZE_STRINGS_DIALOG_PLEASE_SELECT_BUNDLE=- Please select bundle -
+EXTERNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY=Selected text is empty
+EXTERNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET=Key must be set
+EXTERNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET=Value must be set
+EXTERNALIZE_STRINGS_DIALOG_NEW_FILE=Create a new properties file (See details on the next page)
+EXTERNALIZE_STRINGS_DIALOG_DEFAULT_KEY=key
+EXTERNALIZE_STRINGS_DIALOG_DEFAULT_VALUE=value
+EXTERNALIZE_STRINGS_DIALOG_PROPERTY_NAME=Property name
+EXTERNALIZE_STRINGS_DIALOG_PROPERTY_VALUE=Property value
+EXTERNALIZE_STRINGS_DIALOG_KEY_ALREADY_EXISTS=Such a key already exists
# Other messages
CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT=Cannot load taglibs from PageContext!
More information about the jbosstools-commits
mailing list