JBoss Tools SVN: r16528 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe: editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-07-10 08:44:54 -0400 (Fri, 10 Jul 2009)
New Revision: 16528
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/editor/
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/editor/menu/
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/editor/menu/VpePopupMenuTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3793, JUnit for VPE popup menu was added.
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/editor/menu/VpePopupMenuTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/editor/menu/VpePopupMenuTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/editor/menu/VpePopupMenuTest.java 2009-07-10 12:44:54 UTC (rev 16528)
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.menu;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.events.MenuListener;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.util.SelectionUtil;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.jboss.tools.vpe.ui.test.VpeUiTests;
+import org.w3c.dom.Node;
+
+public class VpePopupMenuTest extends VpeTest {
+
+ private final String INITIALIZATION_FAILED = "Initialization failed!"; //$NON-NLS-1$
+ private final String FILE_NAME = "hello.jsp"; //$NON-NLS-1$
+
+ public VpePopupMenuTest(String name) {
+ super(name);
+ }
+
+ public void testPopupMenu() throws Throwable {
+ IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME,
+ VpeUiTests.IMPORT_PROJECT_NAME);
+
+ assertNotNull("Specified file does not exist: file name = " + FILE_NAME //$NON-NLS-1$
+ + "; project name = " + VpeUiTests.IMPORT_PROJECT_NAME, file); //$NON-NLS-1$
+
+ /*
+ * Open file in the VPE
+ */
+ IEditorInput input = new FileEditorInput(file);
+ assertNotNull(INITIALIZATION_FAILED, input);
+
+ JSPMultiPageEditor part = openEditor(input);
+ assertNotNull(INITIALIZATION_FAILED, part);
+
+ VpeEditorPart vep = (VpeEditorPart) part.getVisualEditor();
+ assertNotNull(INITIALIZATION_FAILED, vep);
+
+ VpeController vc = TestUtil.getVpeController(part);
+ MozillaEditor visualEditor = vep.getVisualEditor();
+ StructuredTextEditor sourceEditor = vc. getSourceEditor();
+
+ /*
+ * Selecting h:outputText tag for popup menu.
+ */
+ int position = TestUtil.getLinePositionOffcet(sourceEditor.getTextViewer(), 14, 25);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(sourceEditor, position);
+ /*
+ * Creating popup menu.
+ */
+ MenuManager menuManager = new MenuManager("#popup"); //$NON-NLS-1$
+ final Menu contextMenu = menuManager.createContextMenu(visualEditor.getControl());
+ contextMenu.addMenuListener(new MenuListener() {
+ Menu menu = contextMenu;
+ public void menuHidden(MenuEvent e) {
+ Display.getCurrent().asyncExec(new Runnable() {
+ public void run() {
+ menu.dispose();
+ }
+ });
+ }
+ public void menuShown(MenuEvent e) {
+ /*
+ * Close popup menu after it is displayed.
+ */
+ menu.setVisible(false);
+ }
+ });
+ VpeMenuCreator menuCreator = new VpeMenuCreator(menuManager, sourceNode);
+ assertNotNull(INITIALIZATION_FAILED, menuCreator);
+ assertEquals("Menu Manger should have no items before initialization.", //$NON-NLS-1$
+ 0, menuManager.getSize());
+ menuCreator.createMenu();
+ assertEquals(
+ "After menu creation the Menu Manger should have 10 items in it.", //$NON-NLS-1$
+ 10, menuManager.getSize());
+ /*
+ * Searching InsertContributionItem among menu manger items.
+ */
+ IContributionItem[] menuItems = menuManager.getItems();
+ InsertContributionItem insertItem = null;
+ for (IContributionItem item : menuItems) {
+ if (item instanceof InsertContributionItem) {
+ insertItem = (InsertContributionItem) item;
+ }
+ }
+ assertNotNull(
+ "InsertContributionItem should exist in the list of menu items but it is not.", //$NON-NLS-1$
+ insertItem);
+ /*
+ * Show context menu on the display.
+ * Menu will be filled in with items and drew on the screen.
+ * If there are any exceptions - they'll be thrown.
+ * After displaying the menu will be automatically hidden.
+ */
+ contextMenu.setVisible(true);
+
+ /*
+ * It is possible to send synthetic mouse and key events in XULRunner 1.9.
+ * So the current test could be updated with sending nsIDOMEvent.
+ */
+// VpeController vc = openInVpe(VpeUiTests.IMPORT_PROJECT_NAME, FILE_NAME);
+// assertNotNull(INITIALIZATION_FAILED, vc);
+// XulRunnerEditor xulRunnerEditor = vc.getXulRunnerEditor();
+// assertNotNull(INITIALIZATION_FAILED, xulRunnerEditor);
+// nsIInterfaceRequestor req = (nsIInterfaceRequestor) xulRunnerEditor
+// .getWebBrowser().getContentDOMWindow().queryInterface(
+// nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID);
+// assertNotNull(INITIALIZATION_FAILED, req);
+// nsIDOMWindowUtils utils = (nsIDOMWindowUtils) req
+// .getInterface(nsIDOMWindowUtils.NS_IDOMWINDOWUTILS_IID);
+// assertNotNull(INITIALIZATION_FAILED, utils);
+// utils.sendMouseEvent("mousedown", 10, 10, 0, 1, 0);
+ }
+
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/editor/menu/VpePopupMenuTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2009-07-10 10:17:50 UTC (rev 16527)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2009-07-10 12:44:54 UTC (rev 16528)
@@ -14,6 +14,7 @@
import java.util.List;
import org.jboss.tools.tests.ImportBean;
+import org.jboss.tools.vpe.editor.menu.VpePopupMenuTest;
import org.jboss.tools.vpe.ui.test.dialog.VpeResourcesDialogTest;
import org.jboss.tools.vpe.ui.test.editor.CustomSashFormTest;
import org.jboss.tools.vpe.ui.test.preferences.VpeEditorPreferencesPageTest;
@@ -32,6 +33,7 @@
suite.addTestSuite(VpeResourcesDialogTest.class);
suite.addTestSuite(VpeEditorPreferencesPageTest.class);
suite.addTestSuite(CustomSashFormTest.class);
+ suite.addTestSuite(VpePopupMenuTest.class);
/*
* Add projects that will be used in junit tests.
16 years, 9 months
JBoss Tools SVN: r16527 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-07-10 06:17:50 -0400 (Fri, 10 Jul 2009)
New Revision: 16527
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenSourceAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4285 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-07-10 09:25:53 UTC (rev 16526)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-07-10 10:17:50 UTC (rev 16527)
@@ -97,18 +97,19 @@
return run(consoleConfig, propertySel, parentProp);
}
}
- return run(consoleConfig, path.getLastSegment());
+ return run(consoleConfig, path.getLastSegment(), null);
}
/**
* @param consoleConfig
* @param selection
+ * @param selectionParent
* @throws JavaModelException
* @throws PartInitException
* @throws PresistanceClassNotFoundException
* @throws FileNotFoundException
*/
- public static IEditorPart run(ConsoleConfiguration consoleConfig, Object selection) throws PartInitException, JavaModelException, FileNotFoundException {
+ public static IEditorPart run(ConsoleConfiguration consoleConfig, Object selection, Object selectionParent) throws PartInitException, JavaModelException, FileNotFoundException {
IEditorPart editorPart = null;
IFile file = null;
if (selection instanceof Property) {
@@ -116,16 +117,22 @@
if (p.getPersistentClass() != null) {
//use PersistentClass to open editor
file = OpenMappingUtils.searchFileToOpen(consoleConfig, p.getPersistentClass());
- //editorPart = openMapping(p.getPersistentClass(), consoleConfig);
}
}
else {
- file = OpenMappingUtils.searchFileToOpen(consoleConfig, selection);
- //editorPart = openMapping(selection, consoleConfig);
+ if (selectionParent != null) {
+ file = OpenMappingUtils.searchFileToOpen(consoleConfig, selectionParent);
+ } else {
+ file = OpenMappingUtils.searchFileToOpen(consoleConfig, selection);
+ }
}
if (file != null) {
editorPart = OpenMappingUtils.openFileInEditor(file);
- updateEditorSelection(editorPart, selection);
+ boolean updateRes = updateEditorSelection(editorPart, selection);
+ if (!updateRes && selectionParent != null) {
+ // if it is not possible to select object, try to select it's child
+ updateRes = updateEditorSelection(editorPart, selectionParent);
+ }
}
if (editorPart == null) {
//try to find hibernate-annotations
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2009-07-10 09:25:53 UTC (rev 16526)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2009-07-10 10:17:50 UTC (rev 16527)
@@ -38,6 +38,7 @@
* @author Dmitry Geraskov
*/
+@SuppressWarnings("restriction")
public class OpenSourceAction extends SelectionListenerAction {
private String imageFilePath = "icons/images/java.gif"; //$NON-NLS-1$
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2009-07-10 09:25:53 UTC (rev 16526)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2009-07-10 10:17:50 UTC (rev 16527)
@@ -50,6 +50,7 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.mapping.Collection;
+import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
import org.hibernate.mapping.ManyToOne;
import org.hibernate.mapping.Map;
@@ -89,10 +90,16 @@
public static final String HIBERNATE_TAG_RESOURCE = "resource"; //$NON-NLS-1$
public static final String HIBERNATE_TAG_CATALOG = "catalog"; //$NON-NLS-1$
public static final String HIBERNATE_TAG_SCHEMA = "schema"; //$NON-NLS-1$
+ public static final String HIBERNATE_TAG_KEY = "key"; //$NON-NLS-1$
+ public static final String HIBERNATE_TAG_MANY2ONE = "many-to-one"; //$NON-NLS-1$
+ public static final String HIBERNATE_TAG_PROPERTY = "property"; //$NON-NLS-1$
public static final String EJB_TAG_ENTITY = "entity"; //$NON-NLS-1$
public static final String EJB_TAG_CLASS = "class"; //$NON-NLS-1$
public static final String EJB_TAG_MAPPED_SUPERCLASS = "mapped-superclass"; //$NON-NLS-1$
-
+ public static final String EJB_TAG_COLUMN = "column"; //$NON-NLS-1$
+ public static final String EJB_TAG_ID = "id"; //$NON-NLS-1$
+ public static final String EJB_TAG_BASIC = "basic"; //$NON-NLS-1$
+
//prohibit constructor call
private OpenMappingUtils() {}
@@ -234,6 +241,7 @@
* @param table
* @return
*/
+ @SuppressWarnings("unchecked")
public static boolean tableInFile(ConsoleConfiguration consoleConfig, IFile file, Table table) {
EntityResolver entityResolver = consoleConfig.getConfiguration().getEntityResolver();
Document doc = getDocument(file.getLocation().toFile(), entityResolver);
@@ -274,6 +282,34 @@
if (!res && getElements(doc, HIBERNATE_TAG_TABLE, table.getName()).hasNext()) {
res = true;
}
+ if (!res) {
+ classes = getElements(doc, EJB_TAG_ENTITY);
+ while (classes.hasNext() && !res) {
+ Element element = classes.next();
+ Iterator<Element> itTables = element.elements(HIBERNATE_TAG_TABLE).iterator();
+ while (itTables.hasNext()) {
+ element = itTables.next();
+ Attribute tableAttr = element.attribute(HIBERNATE_TAG_NAME);
+ if (tableAttr != null) {
+ Attribute catalogAttr = element.attribute(HIBERNATE_TAG_CATALOG);
+ if (catalogAttr == null) {
+ catalogAttr = doc.getRootElement().attribute(HIBERNATE_TAG_CATALOG);
+ }
+ Attribute schemaAttr = element.attribute(HIBERNATE_TAG_SCHEMA);
+ if (schemaAttr == null) {
+ schemaAttr = doc.getRootElement().attribute(HIBERNATE_TAG_SCHEMA);
+ }
+ String catalog = catalogAttr != null ? catalogAttr.getValue() : null;
+ String schema = schemaAttr != null ? schemaAttr.getValue() : null;
+ String name = tableAttr.getValue();
+ if (getTableName(catalog, schema, name).equals(getTableName(table))) {
+ res = true;
+ break;
+ }
+ }
+ }
+ }
+ }
return res;
}
@@ -632,6 +668,10 @@
selectRegion = findSelectRegion(proj, findAdapter, (PersistentClass)selection);
} else if (selection instanceof Property){
selectRegion = findSelectRegion(proj, findAdapter, (Property)selection);
+ } else if (selection instanceof Table) {
+ selectRegion = findSelectRegion(proj, findAdapter, (Table)selection);
+ } else if (selection instanceof Column) {
+ selectRegion = findSelectRegion(proj, findAdapter, (Column)selection);
}
return selectRegion;
}
@@ -753,6 +793,58 @@
}
return res;
}
+
+ /**
+ * Finds a document region, which corresponds of given persistent class.
+ * @param proj
+ * @param findAdapter
+ * @param table
+ * @return a proper document region
+ */
+ public static IRegion findSelectRegion(IJavaProject proj, FindReplaceDocumentAdapter findAdapter, Table table) {
+ IRegion res = null;
+ String[] tablePatterns = generateTablePatterns(table.getName());
+ IRegion tableRegion = null;
+ try {
+ for (int i = 0; (tableRegion == null) && (i < tablePatterns.length); i++){
+ tableRegion = findAdapter.find(0, tablePatterns[i], true, true, false, true);
+ }
+ } catch (BadLocationException e) {
+ //ignore
+ }
+ if (tableRegion != null) {
+ int length = table.getName().length();
+ int offset = tableRegion.getOffset() + tableRegion.getLength() - length - 1;
+ res = new Region(offset, length);
+ }
+ return res;
+ }
+
+ /**
+ * Finds a document region, which corresponds of given persistent class.
+ * @param proj
+ * @param findAdapter
+ * @param table
+ * @return a proper document region
+ */
+ public static IRegion findSelectRegion(IJavaProject proj, FindReplaceDocumentAdapter findAdapter, Column column) {
+ IRegion res = null;
+ String[] columnPatterns = generateColumnPatterns(column.getName());
+ IRegion columnRegion = null;
+ try {
+ for (int i = 0; (columnRegion == null) && (i < columnPatterns.length); i++){
+ columnRegion = findAdapter.find(0, columnPatterns[i], true, true, false, true);
+ }
+ } catch (BadLocationException e) {
+ //ignore
+ }
+ if (columnRegion != null) {
+ int length = column.getName().length();
+ int offset = columnRegion.getOffset() + columnRegion.getLength() - length - 1;
+ res = new Region(offset, length);
+ }
+ return res;
+ }
/**
* Creates a xml tag search pattern with given tag name which should contains
@@ -782,6 +874,25 @@
{ EJB_TAG_MAPPED_SUPERCLASS, HIBERNATE_TAG_NAME, },
{ EJB_TAG_MAPPED_SUPERCLASS, EJB_TAG_CLASS, },
};
+
+ private static String[][] tablePairs = {
+ { HIBERNATE_TAG_TABLE, HIBERNATE_TAG_NAME, },
+ { HIBERNATE_TAG_CLASS, HIBERNATE_TAG_NAME, },
+ { HIBERNATE_TAG_CLASS, HIBERNATE_TAG_ENTITY_NAME, },
+ { EJB_TAG_ENTITY, HIBERNATE_TAG_NAME, },
+ { EJB_TAG_ENTITY, EJB_TAG_CLASS, },
+ };
+
+ private static String[][] columnPairs = {
+ { EJB_TAG_COLUMN, HIBERNATE_TAG_NAME, },
+ { EJB_TAG_ID, EJB_TAG_COLUMN, },
+ { HIBERNATE_TAG_MANY2ONE, EJB_TAG_COLUMN, },
+ { HIBERNATE_TAG_KEY, EJB_TAG_COLUMN, },
+ { EJB_TAG_ID, HIBERNATE_TAG_NAME, },
+ { HIBERNATE_TAG_MANY2ONE, HIBERNATE_TAG_NAME, },
+ { EJB_TAG_BASIC, HIBERNATE_TAG_NAME, },
+ { HIBERNATE_TAG_PROPERTY, HIBERNATE_TAG_NAME, },
+ };
/**
* Extract short name of the class from fullClassName.
@@ -837,6 +948,34 @@
}
/**
+ * Generates a table xml tag search patterns.
+ *
+ * @param tableName
+ * @return an arrays of search patterns
+ */
+ public static String[] generateTablePatterns(String tableName) {
+ List<String> patterns = new ArrayList<String>();
+ for (int i = 0; i < tablePairs.length; i++) {
+ patterns.add(createPattern(tablePairs[i][0], tablePairs[i][1], tableName));
+ }
+ return patterns.toArray(new String[0]);
+ }
+
+ /**
+ * Generates a column xml tag search patterns.
+ *
+ * @param columnName
+ * @return an arrays of search patterns
+ */
+ public static String[] generateColumnPatterns(String columnName) {
+ List<String> patterns = new ArrayList<String>();
+ for (int i = 0; i < columnPairs.length; i++) {
+ patterns.add(createPattern(columnPairs[i][0], columnPairs[i][1], columnName));
+ }
+ return patterns.toArray(new String[0]);
+ }
+
+ /**
* Generates a property xml tag search pattern, which corresponds hibernate hbm syntax.
*
* @param property
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-07-10 09:25:53 UTC (rev 16526)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-07-10 10:17:50 UTC (rev 16527)
@@ -171,39 +171,20 @@
return super.getAdapter(type);
}
- public Set<Object> getSelectedElements() {
- Set<Object> ret = new HashSet<Object>();
+ public Set<Shape> getSelectedElements() {
+ Set<Shape> ret = new HashSet<Shape>();
List<?> selectedEditParts = getGraphicalViewer().getSelectedEditParts();
Iterator<?> iterator = selectedEditParts.iterator();
while (iterator.hasNext()) {
Object elem = iterator.next();
if (elem instanceof OrmEditPart) {
Shape shape = (Shape)((OrmEditPart)elem).getModel();
- Object ormElement = shape.getOrmElement();
- if (ormElement instanceof Column){
- shape = (Shape) shape.getParent();
- }
- ret.add(shape.getOrmElement());
+ ret.add(shape);
}
}
return ret;
}
- public Set<Object> getSelectedElements2() {
- Set<Object> ret = new HashSet<Object>();
- List<?> selectedEditParts = getGraphicalViewer().getSelectedEditParts();
- Iterator<?> iterator = selectedEditParts.iterator();
- while (iterator.hasNext()) {
- Object elem = iterator.next();
- if (elem instanceof OrmEditPart) {
- Shape shape = (Shape)((OrmEditPart)elem).getModel();
- Object ormElement = shape.getOrmElement();
- ret.add(ormElement);
- }
- }
- return ret;
- }
-
public OrmDiagram getViewerContents() {
return ormDiagram;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenMappingAction.java 2009-07-10 09:25:53 UTC (rev 16526)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenMappingAction.java 2009-07-10 10:17:50 UTC (rev 16527)
@@ -16,14 +16,17 @@
import org.eclipse.gef.ui.actions.SelectionAction;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.mapping.Column;
import org.hibernate.mapping.Property;
import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
import org.jboss.tools.hibernate.ui.diagram.UiPlugin;
import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.model.Shape;
import org.jboss.tools.hibernate.ui.diagram.editors.model.SpecialRootClass;
import org.jboss.tools.hibernate.ui.view.ObjectEditorInput;
@@ -46,18 +49,20 @@
ConsoleConfiguration consoleConfig = objectEditorInput.getConfiguration();
DiagramViewer part = (DiagramViewer)getWorkbenchPart();
- //Set selectedElements = part.getSelectedElements();
- Set<Object> selectedElements = part.getSelectedElements2();
+ Set<Shape> selectedElements = part.getSelectedElements();
- Iterator<Object> iterator = selectedElements.iterator();
- while (iterator.hasNext()) {
- Object selection = iterator.next();
+ IEditorPart editorPart = null;
+ Iterator<Shape> iterator = selectedElements.iterator();
+ // open only first editor - no sense to open all of them
+ while (iterator.hasNext() && editorPart == null) {
+ Shape shape = iterator.next();
+ Object selection = shape.getOrmElement();
if (selection instanceof Property
&& ((Property)selection).getPersistentClass() instanceof SpecialRootClass){
Property compositSel = ((Property)selection);
- Property parentProperty = ((SpecialRootClass)((Property)selection).getPersistentClass()).getProperty();
+ Property parentProperty = ((SpecialRootClass)compositSel.getPersistentClass()).getProperty();
try {
- org.hibernate.eclipse.console.actions.OpenMappingAction.run(consoleConfig, compositSel, parentProperty);
+ editorPart = org.hibernate.eclipse.console.actions.OpenMappingAction.run(consoleConfig, compositSel, parentProperty);
} catch (PartInitException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(DiagramViewerMessages.OpenMappingAction_canot_find_or_open_mapping_file, e);
} catch (JavaModelException e) {
@@ -70,8 +75,14 @@
if (selection instanceof SpecialRootClass) {
selection = ((SpecialRootClass)selection).getProperty();
}
+ Shape shapeParent = null;
+ Object selectionParent = null;
+ if (selection instanceof Column){
+ shapeParent = (Shape)shape.getParent();
+ selectionParent = shapeParent.getOrmElement();
+ }
try {
- org.hibernate.eclipse.console.actions.OpenMappingAction.run(consoleConfig, selection);
+ editorPart = org.hibernate.eclipse.console.actions.OpenMappingAction.run(consoleConfig, selection, selectionParent);
} catch (PartInitException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(DiagramViewerMessages.OpenMappingAction_open_mapping_file, e);
} catch (JavaModelException e) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenSourceAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenSourceAction.java 2009-07-10 09:25:53 UTC (rev 16526)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/OpenSourceAction.java 2009-07-10 10:17:50 UTC (rev 16527)
@@ -4,18 +4,22 @@
import java.util.Iterator;
import java.util.Set;
-import org.eclipse.core.resources.IResource;
import org.eclipse.gef.ui.actions.SelectionAction;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.mapping.Column;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
+import org.hibernate.mapping.Table;
import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
import org.jboss.tools.hibernate.ui.diagram.UiPlugin;
import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.model.Connection;
+import org.jboss.tools.hibernate.ui.diagram.editors.model.Shape;
import org.jboss.tools.hibernate.ui.view.ObjectEditorInput;
/**
@@ -37,12 +41,30 @@
ConsoleConfiguration consoleConfig = objectEditorInput.getConfiguration();
DiagramViewer part = (DiagramViewer)getWorkbenchPart();
- Set selectedElements = part.getSelectedElements();
+ Set<Shape> selectedElements = part.getSelectedElements();
- Iterator iterator = selectedElements.iterator();
- while (iterator.hasNext()) {
- //PersistentClass rootClass = (PersistentClass) iterator.next();
- Object selection = iterator.next();
+ IEditorPart editorPart = null;
+ Iterator<Shape> iterator = selectedElements.iterator();
+ // open only first editor - no sense to open all of them
+ while (iterator.hasNext() && editorPart == null) {
+ Shape shape = iterator.next();
+ Object selection = shape.getOrmElement();
+ if (selection instanceof Column || selection instanceof Table) {
+ Iterator<Connection> targetConnections = shape.getTargetConnections().iterator();
+ while (targetConnections.hasNext()) {
+ Connection connection = targetConnections.next();
+ Shape sh1 = connection.getSource();
+ Shape sh2 = connection.getTarget();
+ if (shape == sh1 && sh2 != null) {
+ shape = sh2;
+ break;
+ } else if (shape == sh2 && sh1 != null) {
+ shape = sh1;
+ break;
+ }
+ }
+ selection = shape.getOrmElement();
+ }
PersistentClass rootClass = null;
if (selection instanceof PersistentClass) {
rootClass = (PersistentClass) selection;
@@ -52,13 +74,12 @@
continue;
}
- IResource resource = null;
String fullyQualifiedName = rootClass.getClassName();//HibernateUtils.getPersistentClassName(rootClass);
/*if (fullyQualifiedName.indexOf("$") > 0) {
fullyQualifiedName = fullyQualifiedName.substring(0, fullyQualifiedName.indexOf("$"));
}*/
try {
- new org.hibernate.eclipse.console.actions.OpenSourceAction().run(consoleConfig, selection, fullyQualifiedName);
+ editorPart = org.hibernate.eclipse.console.actions.OpenSourceAction.run(consoleConfig, selection, fullyQualifiedName);
} catch (PartInitException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(DiagramViewerMessages.OpenSourceAction_canot_open_source_file, e);
} catch (JavaModelException e) {
@@ -72,16 +93,5 @@
protected boolean calculateEnabled() {
DiagramViewer part = (DiagramViewer)getWorkbenchPart();
return part.getSelectedElements().size() > 0;
- /** /
- DiagramViewer part = (DiagramViewer)getWorkbenchPart();
- Set selectedElements = part.getSelectedElements();
- Iterator iterator = selectedElements.iterator();
- while (iterator.hasNext()) {
- Object elem = iterator.next();
- if (elem instanceof PersistentClass
- || elem instanceof Property) return true;
- }
- return false;
- /**/
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2009-07-10 09:25:53 UTC (rev 16526)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2009-07-10 10:17:50 UTC (rev 16527)
@@ -861,7 +861,7 @@
}
}
- public void setState(Properties properties,Shape shape, boolean value) {
+ public void setState(Properties properties, Shape shape, boolean value) {
setState(properties, getKey(shape) + ".state", value); //$NON-NLS-1$
}
16 years, 9 months
JBoss Tools SVN: r16525 - in trunk/jst/plugins: org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui and 15 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-07-10 03:56:03 -0400 (Fri, 10 Jul 2009)
New Revision: 16525
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
public class CssPlugin extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.jst.css";
+ public static final String PLUGIN_ID = "org.jboss.tools.jst.css"; //$NON-NLS-1$
// The shared instance
private static CssPlugin plugin;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -4,8 +4,34 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.ui.messages"; //$NON-NLS-1$
+ public static String AddADFSupportHelper_AddADFSupport;
+ public static String AddADFSupportHelper_LibraryIsEmpty;
+ public static String AddADFSupportHelper_ProjectDoesNotHaveLibFolder;
+ public static String AddOrm2NatureActionHandler_Add;
+ public static String AddOrm2NatureActionHandler_Remove;
+ public static String AppRegisterComponent_NewServerRuntime;
public static String HiddenLinksWizardView_HideAll;
public static String HiddenLinksWizardView_ShowAll;
+ public static String NewProjectRegisterPage_Register;
+ public static String RunPageActionDelegate_PleaseEnterURL;
+ public static String RunPageActionDelegate_RunMenuItem;
+ public static String RunPageActionDelegate_RunTitle;
+ public static String RunPageActionDelegate_RunURL;
+ public static String ServerXmlActionDelegate_PrefixServerSuffix;
+ public static String TLDFormLayoutData_DefinedTags;
+ public static String TLDFormLayoutData_Functions;
+ public static String TLDFormLayoutData_InitParams;
+ public static String TLDFormLayoutData_Listeners;
+ public static String TLDFormLayoutData_TagAttributes;
+ public static String TLDFormLayoutData_TagDescription;
+ public static String TLDFormLayoutData_TagLibraryDescription;
+ public static String TLDFormLayoutData_TagVariables;
+ public static String TLDFormLayoutData_Validator;
+ public static String WebAppFileFormLayoutData_ContextParams;
+ public static String WebAppFileFormLayoutData_WebDesc23;
+ public static String WebAppFileFormLayoutData_WebDesc24;
+ public static String WebAppFileFormLayoutData_WebDesc25;
+ public static String WebCompoundEditor_WebXMLEditor;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
*/
public class WebDevelopmentPerspectiveFactory implements IPerspectiveFactory {
- public static final String PERSPECTIVE_ID = "org.jboss.tools.jst.web.ui.WebDevelopmentPerspective";
+ public static final String PERSPECTIVE_ID = "org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"; //$NON-NLS-1$
/* (non-Javadoc)
* @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
@@ -31,12 +31,12 @@
IFolderLayout leftTop = layout.createFolder("leftTop", IPageLayout.LEFT, (float)0.2, editorArea); //$NON-NLS-1$
leftTop.addView(JavaUI.ID_PACKAGES);
- leftTop.addView("org.jboss.tools.jst.web.ui.navigator.WebProjectsView");
- leftTop.addView("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
+ leftTop.addView("org.jboss.tools.jst.web.ui.navigator.WebProjectsView"); //$NON-NLS-1$
+ leftTop.addView("org.jboss.tools.seam.ui.views.SeamComponentsNavigator"); //$NON-NLS-1$
leftTop.addPlaceholder(IPageLayout.ID_RES_NAV);
- IFolderLayout leftBottom = layout.createFolder("leftBottom", IPageLayout.BOTTOM, 0.64f, "leftTop");
+ IFolderLayout leftBottom = layout.createFolder("leftBottom", IPageLayout.BOTTOM, 0.64f, "leftTop"); //$NON-NLS-1$ //$NON-NLS-2$
//leftBottom.addView(IPageLayout.ID_OUTLINE);
leftBottom.addView(IPageLayout.ID_PROP_SHEET);
@@ -44,11 +44,11 @@
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.78, editorArea); //$NON-NLS-1$
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addView(IPageLayout.ID_TASK_LIST);
- bottom.addView("org.jboss.ide.eclipse.as.ui.views.JBossServerView");
+ bottom.addView("org.jboss.ide.eclipse.as.ui.views.JBossServerView"); //$NON-NLS-1$
IFolderLayout rightTop = layout.createFolder("right", IPageLayout.RIGHT, (float)0.8, editorArea); //$NON-NLS-1$
- rightTop.addView("org.jboss.tools.common.model.ui.views.palette.PaletteView");
- IFolderLayout rightBottom = layout.createFolder("rightBottom", IPageLayout.BOTTOM, (float)0.64, "right"); //$NON-NLS-1$
+ rightTop.addView("org.jboss.tools.common.model.ui.views.palette.PaletteView"); //$NON-NLS-1$
+ IFolderLayout rightBottom = layout.createFolder("rightBottom", IPageLayout.BOTTOM, (float)0.64, "right"); //$NON-NLS-1$ //$NON-NLS-2$
rightBottom.addView(IPageLayout.ID_OUTLINE);
layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
@@ -57,7 +57,7 @@
layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
// views - seam
- layout.addShowViewShortcut("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
+ layout.addShowViewShortcut("org.jboss.tools.seam.ui.views.SeamComponentsNavigator"); //$NON-NLS-1$
// views - java
layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -17,7 +17,7 @@
import org.osgi.framework.BundleContext;
public class WebUiPlugin extends BaseUIPlugin {
- public static final String PLUGIN_ID = "org.jboss.tools.jst.web.ui";
+ public static final String PLUGIN_ID = "org.jboss.tools.jst.web.ui"; //$NON-NLS-1$
static WebUiPlugin INSTANCE;
public WebUiPlugin() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -21,20 +21,21 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.ui.Messages;
public class AddOrm2NatureActionHandler extends AbstractHandler {
- static final String PLUGIN_ID = "TODO" ;
- static final String ORM2NATURE_ID = "TODO";
+ static final String PLUGIN_ID = "TODO" ; //$NON-NLS-1$
+ static final String ORM2NATURE_ID = "TODO"; //$NON-NLS-1$
- static final String ADD_CLASS_NAME = "TODO.view.AddOrmNatureActionDelegate";
- static final String REMOVE_CLASS_NAME = "TODO.view.RemoveOrmNatureActionDelegate";
+ static final String ADD_CLASS_NAME = "TODO.view.AddOrmNatureActionDelegate"; //$NON-NLS-1$
+ static final String REMOVE_CLASS_NAME = "TODO.view.RemoveOrmNatureActionDelegate"; //$NON-NLS-1$
public AddOrm2NatureActionHandler() {}
public boolean isEnabled(XModelObject object) {
if(object == null || EclipseResourceUtil.getProject(object) == null || Platform.getBundle(PLUGIN_ID) == null) return false;
boolean hasNature = EclipseResourceUtil.hasNature(object.getModel(), ORM2NATURE_ID);
- String displayName = hasNature ? "Remove Hibernate Capabilities" : "Add Hibernate Capabilities...";
+ String displayName = hasNature ? Messages.AddOrm2NatureActionHandler_Remove : Messages.AddOrm2NatureActionHandler_Add;
((XActionImpl)action).setDisplayName(displayName);
return true;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -18,7 +18,7 @@
public class RegisterInServerXmlActionDelegate extends ServerXmlActionDelegate {
protected String getActionPath() {
- return "Registration.RegisterInServerXML";
+ return "Registration.RegisterInServerXML"; //$NON-NLS-1$
}
protected boolean isRelevantProject(IProject project) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.jst.web.ui.action;
+import java.text.MessageFormat;
import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
@@ -51,6 +52,7 @@
import org.jboss.tools.jst.web.browser.wtp.RunOnServerContext;
import org.jboss.tools.jst.web.server.ServerManager;
import org.jboss.tools.jst.web.server.ServerManagerListener;
+import org.jboss.tools.jst.web.ui.Messages;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
public class RunPageActionDelegate extends AbstractModelActionDelegate implements IWorkbenchWindowPulldownDelegate {
@@ -72,7 +74,7 @@
public void init(IWorkbenchWindow window) {
super.init(window);
- new Thread(new R(), "Update Run Page Action").start();
+ new Thread(new R(), "Update Run Page Action").start(); //$NON-NLS-1$
}
protected void safeSelectionChanged(IAction action, ISelection selection) {
@@ -84,7 +86,7 @@
adapter = EclipseResourceUtil.createObjectForResource(p);
} else {
if(context.lastRunObject != null) {
- p = (IProject)context.lastRunObject.getModel().getProperties().get("project");
+ p = (IProject)context.lastRunObject.getModel().getProperties().get("project"); //$NON-NLS-1$
if(p == null || !p.isOpen() || !p.exists()) {
context.setLastRunObject(null);
update();
@@ -134,8 +136,8 @@
String tip = defaultToolTip;
if(object != null) {
String lastRunURL = context.getLastRunURL();
- if(lastRunURL != null && !lastRunURL.startsWith("%server%")) {
- tip = "Run " + lastRunURL;
+ if(lastRunURL != null && !lastRunURL.startsWith("%server%")) { //$NON-NLS-1$
+ tip = MessageFormat.format(Messages.RunPageActionDelegate_RunURL, lastRunURL);
}
}
action.setToolTipText(tip);
@@ -167,7 +169,7 @@
} else if(object != null && DnDUtil.getEnabledAction(object, null, getModelActionPath()) != null) {
if(!saveAllEditors()) return;
Properties p = new Properties();
- p.put("shell", window.getShell());
+ p.put("shell", window.getShell()); //$NON-NLS-1$
XActionInvoker.invoke(getModelActionPath(), object, p);
} else {
getMenu(window.getShell()).setVisible(true);
@@ -214,7 +216,7 @@
class XModelTreeListenerImpl implements XModelTreeListener {
public void nodeChanged(XModelTreeEvent event) {
- if("FileSystems".equals(event.getModelObject().getPath())) {
+ if("FileSystems".equals(event.getModelObject().getPath())) { //$NON-NLS-1$
context.setLastRunObject(context.lastRunObject);
}
}
@@ -227,7 +229,7 @@
String lastRunURL = context.getLastRunURL();
if(lastRunURL == null) {
//do nothing
- } else if(!lastRunURL.startsWith("%server%")) {
+ } else if(!lastRunURL.startsWith("%server%")) { //$NON-NLS-1$
item = new MenuItem(menu, SWT.PUSH);
item.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
@@ -238,11 +240,11 @@
widgetSelected(e);
}
});
- item.setText("" + context.getLastRunURL());
+ item.setText("" + context.getLastRunURL()); //$NON-NLS-1$
} else {
item = new MenuItem(menu, SWT.PUSH);
- String message = lastRunURL.substring("%server%".length());
- int i = message.indexOf("/");
+ String message = lastRunURL.substring("%server%".length()); //$NON-NLS-1$
+ int i = message.indexOf("/"); //$NON-NLS-1$
if(i >= 0) message = message.substring(0, i);
item.setText(message);
}
@@ -271,7 +273,7 @@
item = new MenuItem(menu, SWT.SEPARATOR);
}
item = new MenuItem(menu, SWT.PUSH);
- item.setText("Run...");
+ item.setText(Messages.RunPageActionDelegate_RunMenuItem);
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
runSelector();
@@ -285,11 +287,11 @@
private void runSelector() {
if(!saveAllEditors()) return;
- XEntityData data = XEntityDataImpl.create(new String[][]{{"RunPageHelper"}, {"url", "yes"}});
- XModelObject dummy = PreferenceModelUtilities.getPreferenceModel().createModelObject("RunPageHelper", null);
+ XEntityData data = XEntityDataImpl.create(new String[][]{{"RunPageHelper"}, {"url", "yes"}}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ XModelObject dummy = PreferenceModelUtilities.getPreferenceModel().createModelObject("RunPageHelper", null); //$NON-NLS-1$
int i = RunSelectorSupport.run(dummy, data, null);
if(i != 0) return;
- String url = data.getValue("url");
+ String url = data.getValue("url"); //$NON-NLS-1$
context.activateJustUrl(url);
update();
run(action);
@@ -321,27 +323,27 @@
IModelNature mn = EclipseResourceUtil.getModelNature(ps[i]);
if(mn == null) continue;
String url = RunPageActionDelegate.context.computeURL(mn.getModel().getRoot());
- if(url != null && !url.startsWith("%server%")) {
+ if(url != null && !url.startsWith("%server%")) { //$NON-NLS-1$
set.add(url);
}
}
String lastRunUrl = RunPageActionDelegate.context.getLastRunURL();
- if(lastRunUrl != null && !lastRunUrl.startsWith("%server%")) {
+ if(lastRunUrl != null && !lastRunUrl.startsWith("%server%")) { //$NON-NLS-1$
set.add(lastRunUrl);
}
String[] urls = RunPageActionDelegate.context.getHistory();
for (int i = 0; i < urls.length; i++) set.add(urls[i]);
urls = (String[])set.toArray(new String[0]);
- setValueList(0, "url", urls);
- setAttributeValue(0, "url", "");
+ setValueList(0, "url", urls); //$NON-NLS-1$
+ setAttributeValue(0, "url", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
public String getTitle() {
- return "Run";
+ return Messages.RunPageActionDelegate_RunTitle;
}
public String getMessage(int stepId) {
- return "Please enter URL.";
+ return Messages.RunPageActionDelegate_PleaseEnterURL;
}
public String[] getActionNames(int stepId) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -25,7 +25,7 @@
}
protected void doRun() {
- XActionInvoker.invoke("WebWorkspace", "SaveAsTemplate", object, null);
+ XActionInvoker.invoke("WebWorkspace", "SaveAsTemplate", object, null); //$NON-NLS-1$ //$NON-NLS-2$
}
protected void safeSelectionChanged(IAction action, ISelection selection) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -10,9 +10,11 @@
******************************************************************************/
package org.jboss.tools.jst.web.ui.action;
+import java.text.MessageFormat;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.jboss.tools.common.model.ui.action.file.ProjectRootActionDelegate;
+import org.jboss.tools.jst.web.ui.Messages;
public class ServerXmlActionDelegate extends ProjectRootActionDelegate {
protected String textTemplate = null;
@@ -24,9 +26,11 @@
}
if(textTemplate == null) return;
String t = textTemplate;
- int i = t.indexOf("server.xml");
+ int i = t.indexOf("server.xml"); //$NON-NLS-1$
if(i >= 0) {
- t = t.substring(0, i) + "Server" + t.substring(i + "server.xml".length());
+ String prefix = t.substring(0, i);
+ String suffix = t.substring(i + "server.xml".length()); //$NON-NLS-1$
+ t = MessageFormat.format(Messages.ServerXmlActionDelegate_PrefixServerSuffix, prefix, suffix);
action.setText(t);
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -17,7 +17,7 @@
public class UnregisterFromServerXmlActionDelegate extends ServerXmlActionDelegate {
protected String getActionPath() {
- return "Registration.UnregisterInServerXML";
+ return "Registration.UnregisterInServerXML"; //$NON-NLS-1$
}
protected boolean isRelevantProject(IProject project) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -12,6 +12,7 @@
import java.io.File;
import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
import java.util.Properties;
import org.eclipse.core.resources.IProject;
@@ -29,16 +30,17 @@
import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.jst.web.project.helpers.*;
+import org.jboss.tools.jst.web.ui.Messages;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
public class AddADFSupportHelper {
- static String ORACLE_ADF_LIB_FOLDER_NAME = "OracleADF";
+ static String ORACLE_ADF_LIB_FOLDER_NAME = "OracleADF"; //$NON-NLS-1$
String adfLibPath;
XModelObject object;
public AddADFSupportHelper() {
try {
- adfLibPath = LibrarySets.getInstance().getLibrarySetsPath() + "/" + ORACLE_ADF_LIB_FOLDER_NAME;
+ adfLibPath = LibrarySets.getInstance().getLibrarySetsPath() + "/" + ORACLE_ADF_LIB_FOLDER_NAME; //$NON-NLS-1$
} catch (Exception e) {
WebModelPlugin.getPluginLog().logError(e);
}
@@ -59,8 +61,8 @@
if(fs == null || fs.length == 0) return false;
for (int i = 0; i < fs.length; i++) {
String n = fs[i].getName();
- if(!n.endsWith(".jar")) continue;
- if(fss.getChildByPath("lib-" + n) == null) return true;
+ if(!n.endsWith(".jar")) continue; //$NON-NLS-1$
+ if(fss.getChildByPath("lib-" + n) == null) return true; //$NON-NLS-1$
}
return false;
}
@@ -72,7 +74,7 @@
class RunImpl implements IRunnableWithProgress {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask("Add ADF Support", 100);
+ monitor.beginTask(Messages.AddADFSupportHelper_AddADFSupport, 100);
XModel model = object.getModel();
XModelObject fss = FileSystemsHelper.getFileSystems(model);
@@ -84,29 +86,29 @@
File[] fs = adfLibFile.listFiles();
if(fs == null || fs.length == 0) {
monitor.setCanceled(true);
- throw new InterruptedException("Library " + ORACLE_ADF_LIB_FOLDER_NAME + " is empty.");
+ throw new InterruptedException(MessageFormat.format(Messages.AddADFSupportHelper_LibraryIsEmpty, ORACLE_ADF_LIB_FOLDER_NAME));
}
String libLocation = NewWebProjectHelper.getLibLocation(model);
if(libLocation == null || libLocation.length() == 0) {
monitor.setCanceled(true);
- throw new InterruptedException("Project does not have lib folder.");
+ throw new InterruptedException(Messages.AddADFSupportHelper_ProjectDoesNotHaveLibFolder);
}
String libName = null;
XModelObject webinf = FileSystemsHelper.getWebInf(model);
File webInfDir = ((IResource)webinf.getAdapter(IResource.class)).getLocation().toFile();
libName = (new File(libLocation).getParentFile().equals(webInfDir))
- ? XModelConstants.WORKSPACE_REF + "/lib/" : libLocation.replace('\\', '/')+"/";
+ ? XModelConstants.WORKSPACE_REF + "/lib/" : libLocation.replace('\\', '/')+"/"; //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < fs.length; i++) {
String jarName = fs[i].getName();
- if(!jarName.endsWith(".jar")) continue;
- FileUtil.copyFile(fs[i], new File(libLocation + "/" + jarName), true, false);
- String fsName = "lib-" + jarName;
+ if(!jarName.endsWith(".jar")) continue; //$NON-NLS-1$
+ FileUtil.copyFile(fs[i], new File(libLocation + "/" + jarName), true, false); //$NON-NLS-1$
+ String fsName = "lib-" + jarName; //$NON-NLS-1$
if(fss.getChildByPath(fsName) == null) {
Properties fsProp = new Properties();
- fsProp.setProperty("name", fsName);
- fsProp.setProperty("location", libName + jarName);
- fsProp.setProperty("info", "hidden=yes");
- XModelObject fsJar = XModelObjectLoaderUtil.createValidObject(model, "FileSystemJar", fsProp);
+ fsProp.setProperty("name", fsName); //$NON-NLS-1$
+ fsProp.setProperty("location", libName + jarName); //$NON-NLS-1$
+ fsProp.setProperty("info", "hidden=yes"); //$NON-NLS-1$ //$NON-NLS-2$
+ XModelObject fsJar = XModelObjectLoaderUtil.createValidObject(model, "FileSystemJar", fsProp); //$NON-NLS-1$
if(fss.getChildByPath(fsJar.getPathPart()) == null) {
try {
DefaultCreateHandler.addCreatedObject(fss, fsJar, false, -1);
@@ -122,7 +124,7 @@
String webRoot = WebProject.getInstance(model).getWebRootLocation();
for (int i = 0; i < fs.length; i++) {
String n = fs[i].getName();
- if(!n.endsWith(".zip")) continue;
+ if(!n.endsWith(".zip")) continue; //$NON-NLS-1$
try {
FileUtil.unzip(new File(webRoot), fs[i].getAbsolutePath());
} catch (Exception e) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -29,7 +29,7 @@
if(webxml == null) return;
XModelObject[] os = WebAppHelper.getRoles(webxml);
tags = new String[os.length];
- for (int i = 0; i < tags.length; i++) tags[i] = os[i].getAttributeValue("role-name");
+ for (int i = 0; i < tags.length; i++) tags[i] = os[i].getAttributeValue("role-name"); //$NON-NLS-1$
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
*/
public class TLDEditorMessages {
- private static final String RESOURCE_BUNDLE= "org.jboss.tools.jst.web.ui.editors.TLDEditorMessages";
+ private static final String RESOURCE_BUNDLE= "org.jboss.tools.jst.web.ui.editors.TLDEditorMessages"; //$NON-NLS-1$
private static ResourceBundle resourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
@@ -32,7 +32,7 @@
return resourceBundle.getString(key);
} catch (MissingResourceException e) {
WebUiPlugin.getPluginLog().logError(e);
- return "%" + key + "%";
+ return "%" + key + "%"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -15,15 +15,16 @@
import org.jboss.tools.common.model.ui.editor.EditorDescriptor;
import org.jboss.tools.common.model.ui.editors.multipage.DefaultMultipageEditor;
import org.jboss.tools.jst.web.tld.model.EditorTreeConstraint;
+import org.jboss.tools.jst.web.ui.Messages;
public class WebCompoundEditor extends DefaultMultipageEditor {
protected void doCreatePages() {
if(isAppropriateNature()) {
treeFormPage = createTreeFormPage();
- String title = "Web XML Editor";
+ String title = Messages.WebCompoundEditor_WebXMLEditor;
if(object != null) {
- String key = object.getModelEntity().getName() + ".editorTitle";
+ String key = object.getModelEntity().getName() + ".editorTitle"; //$NON-NLS-1$
String s = WizardKeys.getString(key);
if(s != null) title = s;
}
@@ -34,13 +35,13 @@
}
createTextPage();
initEditors();
- if(treeFormPage != null) selectionProvider.addHost("treeEditor", treeFormPage.getSelectionProvider());
- if(textEditor != null) selectionProvider.addHost("textEditor", getTextSelectionProvider());
+ if(treeFormPage != null) selectionProvider.addHost("treeEditor", treeFormPage.getSelectionProvider()); //$NON-NLS-1$
+ if(textEditor != null) selectionProvider.addHost("textEditor", getTextSelectionProvider()); //$NON-NLS-1$
}
public Object getAdapter(Class adapter) {
if (adapter == EditorDescriptor.class)
- return new EditorDescriptor("web.xml");
+ return new EditorDescriptor("web.xml"); //$NON-NLS-1$
return super.getAdapter(adapter);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -27,6 +27,7 @@
import org.jboss.tools.common.model.ui.forms.IFormData;
import org.jboss.tools.common.model.ui.forms.IFormLayoutData;
import org.jboss.tools.common.model.ui.forms.InfoLayoutDataFactory;
+import org.jboss.tools.jst.web.ui.Messages;
/**
* @author Igels
@@ -36,11 +37,11 @@
*/
public class TLDFormLayoutData implements IFormLayoutData {
- private static final FormActionData REMOVE_ACTION = new FormActionData(TableStructuredEditor.REMOVE_ACTION, "DeleteActions.Delete");
- private static final FormActionData EDIT_ACTION = new FormActionData(TableStructuredEditor.EDIT_ACTION, "Properties.Properties");
- private static final FormActionData UP_ACTION = new FormActionData(TableStructuredEditor.UP_ACTION, "%internal%");
- private static final FormActionData DOWN_ACTION = new FormActionData(TableStructuredEditor.DOWN_ACTION, "%internal%");
- private static final FormActionData SELECT_ACTION = new FormActionData(TableStructuredEditor.EDIT_ACTION, "%SelectIt%");
+ private static final FormActionData REMOVE_ACTION = new FormActionData(TableStructuredEditor.REMOVE_ACTION, "DeleteActions.Delete"); //$NON-NLS-1$
+ private static final FormActionData EDIT_ACTION = new FormActionData(TableStructuredEditor.EDIT_ACTION, "Properties.Properties"); //$NON-NLS-1$
+ private static final FormActionData UP_ACTION = new FormActionData(TableStructuredEditor.UP_ACTION, "%internal%"); //$NON-NLS-1$
+ private static final FormActionData DOWN_ACTION = new FormActionData(TableStructuredEditor.DOWN_ACTION, "%internal%"); //$NON-NLS-1$
+ private static final FormActionData SELECT_ACTION = new FormActionData(TableStructuredEditor.EDIT_ACTION, "%SelectIt%"); //$NON-NLS-1$
/* private final static IFormActionData[] DEFAULT_TABLE_ACTION_TYPE = new IFormActionData[] {
new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateTag"),
@@ -50,17 +51,18 @@
new FormActionData(TableStructuredEditor.DOWN_ACTION, "%internal%")
};*/
- private final static String STBFE_CLASS_NAME = "org.jboss.tools.common.model.ui.attribute.editor.JavaHyperlinkLineFieldEditor";
+ private final static String STBFE_CLASS_NAME = "org.jboss.tools.common.model.ui.attribute.editor.JavaHyperlinkLineFieldEditor"; //$NON-NLS-1$
+ @SuppressWarnings("nls")
private static FormAttributeData[] getFileTagAttributes(String entityName) {
ArrayList<FormAttributeData> list = new ArrayList<FormAttributeData>();
XModelEntity entity = XModelMetaDataImpl.getInstance().getEntity(entityName);
if(entity != null) {
- String[] attributes = {"tlibversion", "jspversion", "shortname", "uri", "display-name", "small-icon", "large-icon"};
+ String[] attributes = {"tlibversion", "jspversion", "shortname", "uri", "display-name", "small-icon", "large-icon"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
for (int i = 0; i < attributes.length; i++) {
if(entity.getAttribute(attributes[i]) != null) list.add(new FormAttributeData(attributes[i]));
}
- list.add(new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance()));
+ list.add(new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance())); //$NON-NLS-1$
}
return list.toArray(new FormAttributeData[0]);
@@ -69,44 +71,44 @@
return new IFormData[] {
// Tiles Config Description Form
new FormData(
- "Tag Library Description",
- "", // "Description, description, description",
+ Messages.TLDFormLayoutData_TagLibraryDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
getFileTagAttributes(entity)
),
// Tiles PutLists Form
new FormData(
- "Defined Tags",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 50), new FormAttributeData("tagclass", 50)},
+ Messages.TLDFormLayoutData_DefinedTags,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 50), new FormAttributeData("tagclass", 50)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{tagEntity},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION }
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
)
};
}
static IFormData TAG_VARIABLE_LIST = new FormData(
- "Tag Variables",
- "",
- new FormAttributeData[]{new FormAttributeData("name-given", 25), new FormAttributeData("name-from-attribute", 25), new FormAttributeData("variable-class", 25), new FormAttributeData("scope", 25)},
- new String[]{"TLDVariable"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateVariable"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagVariables,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name-given", 25), new FormAttributeData("name-from-attribute", 25), new FormAttributeData("variable-class", 25), new FormAttributeData("scope", 25)}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ new String[]{"TLDVariable"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateVariable"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
);
static IFormData TAG_GENERAL = new FormData(
- "Tag Descriptio",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("name"), new FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new FormAttributeData("bodycontent"), new FormAttributeData("display-name"), new FormAttributeData("small-icon"), new FormAttributeData("large-icon"), new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance()), new FormAttributeData("example", InfoLayoutDataFactory.getInstance())}
+ Messages.TLDFormLayoutData_TagDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name"), new FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new FormAttributeData("bodycontent"), new FormAttributeData("display-name"), new FormAttributeData("small-icon"), new FormAttributeData("large-icon"), new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance()), new FormAttributeData("example", InfoLayoutDataFactory.getInstance())} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
);
static IFormData[] TAG_DEFINITIONS = new IFormData[] {
TAG_GENERAL,
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 25), new FormAttributeData("required", 25), new FormAttributeData("rtexprvalue", 25), new FormAttributeData("type", 25)},
- new String[]{"TLDAttribute12"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 25), new FormAttributeData("required", 25), new FormAttributeData("rtexprvalue", 25), new FormAttributeData("type", 25)}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ new String[]{"TLDAttribute12"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
),
TAG_VARIABLE_LIST
};
@@ -114,11 +116,11 @@
static IFormData[] TAG_DEFINITIONS_20 = new IFormData[] {
TAG_GENERAL,
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("required", 30)},
- new String[]{"TLDAttribute20", "TLDAttribute2F"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("required", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDAttribute20", "TLDAttribute2F"}, //$NON-NLS-1$ //$NON-NLS-2$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
),
TAG_VARIABLE_LIST
};
@@ -126,11 +128,11 @@
static IFormData[] TAG_DEFINITIONS_21 = new IFormData[] {
TAG_GENERAL,
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("required", 30)},
- new String[]{"TLDAttribute21", "TLDAttribute2F"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("required", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDAttribute21", "TLDAttribute2F"}, //$NON-NLS-1$ //$NON-NLS-2$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
),
TAG_VARIABLE_LIST
};
@@ -138,96 +140,96 @@
private final static IFormData[] FORM_LAYOUT_DEFINITIONS =
new IFormData[] {
new FormData(
- "FileTLD_PRO",
+ "FileTLD_PRO", //$NON-NLS-1$
new IFormData[] {
// Tiles Config Description Form
new FormData(
- "Tag Library Description",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("tlibversion"), new FormAttributeData("jspversion"), new FormAttributeData("shortname"), new FormAttributeData("uri"), new FormAttributeData("info", InfoLayoutDataFactory.getInstance())}
+ Messages.TLDFormLayoutData_TagLibraryDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("tlibversion"), new FormAttributeData("jspversion"), new FormAttributeData("shortname"), new FormAttributeData("uri"), new FormAttributeData("info", InfoLayoutDataFactory.getInstance())} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
),
// Tiles PutLists Form
new FormData(
- "Defined Tags",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 50), new FormAttributeData("tagclass", 50)},
- new String[]{"TLDTag"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_DefinedTags,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 50), new FormAttributeData("tagclass", 50)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDTag"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
)
}
),
new FormData(
- "TLDTag",
+ "TLDTag", //$NON-NLS-1$
new IFormData[] {
// Tiles Basic Definition Form
new FormData(
- "Tag Description",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("name"), new FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new FormAttributeData("bodycontent"), new FormAttributeData("info", InfoLayoutDataFactory.getInstance())}
+ Messages.TLDFormLayoutData_TagDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name"), new FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new FormAttributeData("bodycontent"), new FormAttributeData("info", InfoLayoutDataFactory.getInstance())} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
),
// Tiles Advanced Definition Form
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 33), new FormAttributeData("required", 33), new FormAttributeData("rtexprvalue", 33)},
- new String[]{"TLDAttribute"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 33), new FormAttributeData("required", 33), new FormAttributeData("rtexprvalue", 33)}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new String[]{"TLDAttribute"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
)
}
),
// Tiles Basic Put Form
new FormData(
- "Listeners",
- "", // "Description, description, description",
- "TLDListeners",
- new FormAttributeData[]{new FormAttributeData("listener-class", 100)},
- new String[]{"TLDListener"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateListener"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_Listeners,
+ "", // "Description, description, description", //$NON-NLS-1$
+ "TLDListeners", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("listener-class", 100)}, //$NON-NLS-1$
+ new String[]{"TLDListener"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateListener"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
),
new FormData(
- "Functions",
- "", // "Description, description, description",
- "TLDFunctions",
- new FormAttributeData[]{new FormAttributeData("name", 40), new FormAttributeData("function-class", 60)},
- new String[]{"TLDFunction"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateFunction"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_Functions,
+ "", // "Description, description, description", //$NON-NLS-1$
+ "TLDFunctions", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 40), new FormAttributeData("function-class", 60)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDFunction"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateFunction"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
),
new FormData(
- "TLDValidator",
+ "TLDValidator", //$NON-NLS-1$
new IFormData[] {
// Tiles Put List Attributes Form
new FormData(
- "Validator",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("validator-class", null, STBFE_CLASS_NAME), new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance())}
+ Messages.TLDFormLayoutData_Validator,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("validator-class", null, STBFE_CLASS_NAME), new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance())} //$NON-NLS-1$ //$NON-NLS-2$
),
// Tiles Put List Adds Form
new FormData(
- "Init Params",
- "",
- new FormAttributeData[]{new FormAttributeData("param-name", 50), new FormAttributeData("param-value", 50)},
- new String[]{"WebAppInitParam"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateInitParam"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION }
+ Messages.TLDFormLayoutData_InitParams,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("param-name", 50), new FormAttributeData("param-value", 50)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"WebAppInitParam"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION, "CreateActions.CreateInitParam"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION, DOWN_ACTION } //$NON-NLS-1$
)
}
),
new FormData(
- "FileTLD_1_2", createFileTagDefinitions("FileTLD_1_2", "TLDTag12")
+ "FileTLD_1_2", createFileTagDefinitions("FileTLD_1_2", "TLDTag12") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
),
new FormData(
- "FileTLD_2_0", createFileTagDefinitions("FileTLD_2_0", "TLDTag20")
+ "FileTLD_2_0", createFileTagDefinitions("FileTLD_2_0", "TLDTag20") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
),
new FormData(
- "FileTLD_2_1", createFileTagDefinitions("FileTLD_2_1", "TLDTag21")
+ "FileTLD_2_1", createFileTagDefinitions("FileTLD_2_1", "TLDTag21") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
),
new FormData(
- "TLDTag12", TAG_DEFINITIONS
+ "TLDTag12", TAG_DEFINITIONS //$NON-NLS-1$
),
new FormData(
- "TLDTag20", TAG_DEFINITIONS_20
+ "TLDTag20", TAG_DEFINITIONS_20 //$NON-NLS-1$
),
new FormData(
- "TLDTag21", TAG_DEFINITIONS_21
+ "TLDTag21", TAG_DEFINITIONS_21 //$NON-NLS-1$
)
};
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -13,14 +13,15 @@
import org.jboss.tools.common.model.ui.forms.*;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.ui.Messages;
public class WebAppFileFormLayoutData {
- static String FILE_23_ENTITY = "FileWebApp";
- static String FILE_24_ENTITY = "FileWebApp24";
- static String FILE_25_ENTITY = "FileWebApp25";
+ static String FILE_23_ENTITY = "FileWebApp"; //$NON-NLS-1$
+ static String FILE_24_ENTITY = "FileWebApp24"; //$NON-NLS-1$
+ static String FILE_25_ENTITY = "FileWebApp25"; //$NON-NLS-1$
static IFormData CONTEXT_PARAM_FOLDER_DEFINITION = new FormData(
- "Context Params",
+ Messages.WebAppFileFormLayoutData_ContextParams,
WebAppJspConfigFormLayoutData.EMPTY_DESCRIPTION,
"Context Params", //$NON-NLS-1$
new FormAttributeData[]{new FormAttributeData("param-name", 40), new FormAttributeData("param-value", 60)}, //$NON-NLS-1$ //$NON-NLS-2$
@@ -45,15 +46,15 @@
}
public static IFormData FILE_WEB_APP_23_DEFINITION = new FormData(
- FILE_23_ENTITY, new String[]{null}, createFileDefinitions("Web Descriptor 2.3", FILE_23_ENTITY)
+ FILE_23_ENTITY, new String[]{null}, createFileDefinitions(Messages.WebAppFileFormLayoutData_WebDesc23, FILE_23_ENTITY)
);
public static IFormData FILE_WEB_APP_24_DEFINITION = new FormData(
- FILE_24_ENTITY, new String[]{null}, createFileDefinitions("Web Descriptor 2.4", FILE_24_ENTITY)
+ FILE_24_ENTITY, new String[]{null}, createFileDefinitions(Messages.WebAppFileFormLayoutData_WebDesc24, FILE_24_ENTITY)
);
public static IFormData FILE_WEB_APP_25_DEFINITION = new FormData(
- FILE_25_ENTITY, new String[]{null}, createFileDefinitions("Web Descriptor 2.5", FILE_25_ENTITY)
+ FILE_25_ENTITY, new String[]{null}, createFileDefinitions(Messages.WebAppFileFormLayoutData_WebDesc25, FILE_25_ENTITY)
);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -236,7 +236,7 @@
"Services",
EMPTY_DESCRIPTION,
new FormAttributeData[]{new FormAttributeData("service-ref-name", 40), new FormAttributeData("service-interface", 60)}, //$NON-NLS-1$ //$NON-NLS-2$
- new String[]{"WebAppServiceRef"},
+ new String[]{"WebAppServiceRef"}, //$NON-NLS-1$
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateServiceRef") //$NON-NLS-1$
);
@@ -248,7 +248,7 @@
"Message Destination Ref List",
EMPTY_DESCRIPTION,
new FormAttributeData[]{new FormAttributeData("message-destination-ref-name", 100)}, //$NON-NLS-1$
- new String[]{"WebAppMessageDestinationRef"},
+ new String[]{"WebAppMessageDestinationRef"}, //$NON-NLS-1$
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateServiceMessageDestinationRef") //$NON-NLS-1$
);
@@ -256,7 +256,7 @@
"Message Destination List",
EMPTY_DESCRIPTION,
new FormAttributeData[]{new FormAttributeData("message-destination-name", 100)}, //$NON-NLS-1$
- new String[]{"WebAppMessageDestination"},
+ new String[]{"WebAppMessageDestination"}, //$NON-NLS-1$
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateServiceMessageDestination") //$NON-NLS-1$
);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -37,11 +37,11 @@
/**
* @deprecated use bundle via Messages.getString()
*/
- public static final String BUNDLE_NAME = "preferences";
+ public static final String BUNDLE_NAME = "preferences"; //$NON-NLS-1$
/**
* @deprecated use bundle via Messages.getString()
*/
- public static ResourceBundle BUNDLE = ResourceBundle.getBundle(AbstractPagesPreferencesPage.class.getPackage().getName() + "." + BUNDLE_NAME);
+ public static ResourceBundle BUNDLE = ResourceBundle.getBundle(AbstractPagesPreferencesPage.class.getPackage().getName() + "." + BUNDLE_NAME); //$NON-NLS-1$
protected AbstractWebProjectTemplate helper;
protected String[] pages;
protected String[] pageLabels;
@@ -83,7 +83,7 @@
String[] pageLabels = new String[pages == null ? 0 : pages.length];
for (int i = 0; pageLabels != null && i < pageLabels.length; i++) {
pageLabels[i] = pages[i];
- if (pages[i].equals(defaultPage)) pageLabels[i] += " " + Messages.AbstractPagesPreferencePage_3;
+ if (pages[i].equals(defaultPage)) pageLabels[i] += " " + Messages.AbstractPagesPreferencePage_3; //$NON-NLS-1$
}
return pageLabels;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2009-07-10 07:56:03 UTC (rev 16525)
@@ -1,2 +1,28 @@
+AddADFSupportHelper_AddADFSupport=Add ADF Support
+AddADFSupportHelper_LibraryIsEmpty=Library {0} is empty.
+AddADFSupportHelper_ProjectDoesNotHaveLibFolder=Project does not have lib folder.
+AddOrm2NatureActionHandler_Add=Add Hibernate Capabilities...
+AddOrm2NatureActionHandler_Remove=Remove Hibernate Capabilities
+AppRegisterComponent_NewServerRuntime=New Server Runtime
HiddenLinksWizardView_HideAll=Hide All
HiddenLinksWizardView_ShowAll=Show All
+NewProjectRegisterPage_Register=Register
+RunPageActionDelegate_PleaseEnterURL=Please enter URL.
+RunPageActionDelegate_RunMenuItem=Run...
+RunPageActionDelegate_RunTitle=Run
+RunPageActionDelegate_RunURL=Run {0}
+ServerXmlActionDelegate_PrefixServerSuffix={0}Server{1}
+TLDFormLayoutData_DefinedTags=Defined Tags
+TLDFormLayoutData_Functions=Functions
+TLDFormLayoutData_InitParams=Init Params
+TLDFormLayoutData_Listeners=Listeners
+TLDFormLayoutData_TagAttributes=Tag Attributes
+TLDFormLayoutData_TagDescription=Tag Description
+TLDFormLayoutData_TagLibraryDescription=Tag Library Description
+TLDFormLayoutData_TagVariables=Tag Variables
+TLDFormLayoutData_Validator=Validator
+WebAppFileFormLayoutData_ContextParams=Context Params
+WebAppFileFormLayoutData_WebDesc23=Web Descriptor 2.3
+WebAppFileFormLayoutData_WebDesc24=Web Descriptor 2.4
+WebAppFileFormLayoutData_WebDesc25=Web Descriptor 2.5
+WebCompoundEditor_WebXMLEditor=Web XML Editor
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -22,6 +22,7 @@
public WebProjectsLabelProvider() {
}
+ @SuppressWarnings("nls")
public String getText(Object element) {
if(!(element instanceof XModelObject)) return "";
XModelObject o = (XModelObject)element;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -5,6 +5,7 @@
public class TLDAttributeDecorator implements ICustomVariable {
+ @SuppressWarnings("nls")
public String getLabelPart(XModelObject object, String parameters) {
if(object == null) return "";
String required = object.getAttributeValue("required");
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -52,7 +52,7 @@
File preprocessing = new File(sourceDir, ProjectTemplate.PREPROCESSING);
if(!preprocessing.isFile()) return;
String content = FileUtil.readFile(preprocessing);
- StringTokenizer st = new StringTokenizer(content, "\r\n,;");
+ StringTokenizer st = new StringTokenizer(content, "\r\n,;"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String path = st.nextToken().trim();
if(path.length() > 0) process(path);
@@ -67,9 +67,9 @@
if(!sourceFile.exists()) return;
Properties properties = new Properties();
- properties.put("file.resource.loader.path", sourceDir.getCanonicalPath());
- String logFileName = Platform.getLocation().append(".metadata").append(".plugins").append(WebUiPlugin.PLUGIN_ID).append("velocity.log").toFile().getAbsolutePath();
- properties.put("runtime.log", logFileName);
+ properties.put("file.resource.loader.path", sourceDir.getCanonicalPath()); //$NON-NLS-1$
+ String logFileName = Platform.getLocation().append(".metadata").append(".plugins").append(WebUiPlugin.PLUGIN_ID).append("velocity.log").toFile().getAbsolutePath(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ properties.put("runtime.log", logFileName); //$NON-NLS-1$
Velocity.init(properties);
@@ -78,18 +78,18 @@
File file = targetFile;
if (file.exists()) {
if (!file.delete()) {
- throw new RuntimeException("Unable to delete file "+file.getAbsolutePath());
+ throw new RuntimeException("Unable to delete file "+file.getAbsolutePath()); //$NON-NLS-1$
}
}
File folder = file.getParentFile();
folder.mkdirs();
if (!folder.exists() || !folder.isDirectory()) {
- throw new RuntimeException("Unable to create folder "+folder.getAbsolutePath());
+ throw new RuntimeException("Unable to create folder "+folder.getAbsolutePath()); //$NON-NLS-1$
}
Writer writer = new BufferedWriter(new FileWriter(file));
Reader reader = new BufferedReader(new FileReader(sourceFile));
- Velocity.evaluate(context, writer, "", reader);
+ Velocity.evaluate(context, writer, "", reader); //$NON-NLS-1$
writer.flush();
writer.close();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -76,42 +76,42 @@
*/
public abstract class WebNatureOperation implements IRunnableWithProgress {
- public static final String DEFAULT_WEB_CONTENT = "WebContent";
- public static final String DEFAULT_WEB_INF = "WEB-INF";
- public static final String DEFAULT_JAVA_SOURCES = "JavaSource";
- public static final String DEFAULT_JAVA_CLASSES = "classes";
- public static final String DEFAULT_WEB_INF_LIBRARY = "lib";
+ public static final String DEFAULT_WEB_CONTENT = "WebContent"; //$NON-NLS-1$
+ public static final String DEFAULT_WEB_INF = "WEB-INF"; //$NON-NLS-1$
+ public static final String DEFAULT_JAVA_SOURCES = "JavaSource"; //$NON-NLS-1$
+ public static final String DEFAULT_JAVA_CLASSES = "classes"; //$NON-NLS-1$
+ public static final String DEFAULT_WEB_INF_LIBRARY = "lib"; //$NON-NLS-1$
- public static final String PROJECT_NAME_ID = "WebNatureOperation.PROJECT_NAME_ID";
- public static final String PROJECT_LOCATION_ID = "WebNatureOperation.PROJECT_LOCATION_ID";
- public static final String WEB_CONTENT_ID = "WebNatureOperation.WEB_CONTENT_ID";
- public static final String WEB_CONTENT_LOCATION_ID = "WebNatureOperation.WEB_CONTENT_LOCATION_ID";
- public static final String WEB_INF_ID = "WebNatureOperation.WEB_INF_ID";
- public static final String WEB_INF_LOCATION_ID = "WebNatureOperation.WEB_INF_LOCATION_ID";
- public static final String WEB_XML_ID = "WebNatureOperation.WEB_XML_ID";
- public static final String WEB_XML_LOCATION_ID = "WebNatureOperation.WEB_XML_ID";
- public static final String WEB_INF_LIBRARY_ID = "WebNatureOperation.WEB_INF_LIBRARY_ID";
- public static final String WEB_INF_LIBRARY_LOCATION_ID = "WebNatureOperation.WEB_INF_LIBRARY_LOCATION_ID";
- public static final String JAVA_SOURCES_ID = "WebNatureOperation.JAVA_SOURCES_ID";
- public static final String JAVA_SOURCES_LOCATION_ID = "WebNatureOperation.JAVA_SOURCES_LOCATION_ID";
- public static final String JAVA_CREATE_SOURCE_FOLDERS_ID = "WebNatureOperation.JAVA_CREATE_SOURCE_FOLDERS_ID";
- public static final String JAVA_CLASSES_ID = "WebNatureOperation.JAVA_CLASSES_ID";
- public static final String JAVA_CLASSES_LOCATION_ID = "WebNatureOperation.JAVA_CLASSES_LOCATION_ID";
- public static final String JAVA_CLASSPATH_ID = "WebNatureOperation.JAVA_CLASSPATH_ID";
- public static final String SERVLET_VERSION_ID = "WebNatureOperation.SERVLET_VERSION_ID";
- public static final String JSP_VERSION_ID = "WebNatureOperation.JSP_VERSION_ID";
- public static final String WEB_VERSION_ID = "WebNatureOperation.WEB_VERSION_ID";
- public static final String ANT_BUILD_XML_ID = "WebNatureOperation.ANT_BUILD_XML_ID";
- public static final String USE_DEFAULT_LOCATION_ID = "WebNatureOperation.USE_DEFAULT_LOCATION_ID";
- public static final String REGISTER_WEB_CONTEXT_ID = "WebNatureOperation.REGISTER_WEB_CONTEXT_ID";
- public static final String TEMPLATE_ID = "WebNatureOperation.TEMPLATE_ID";
- public static final String TEMPLATE_VERSION_ID = "WebNatureOperation.TEMPLATE_VERSION_ID";
- public static final String RUNTIME_NAME = "WebNatureOperation.RUNTIME_NAME";
+ public static final String PROJECT_NAME_ID = "WebNatureOperation.PROJECT_NAME_ID"; //$NON-NLS-1$
+ public static final String PROJECT_LOCATION_ID = "WebNatureOperation.PROJECT_LOCATION_ID"; //$NON-NLS-1$
+ public static final String WEB_CONTENT_ID = "WebNatureOperation.WEB_CONTENT_ID"; //$NON-NLS-1$
+ public static final String WEB_CONTENT_LOCATION_ID = "WebNatureOperation.WEB_CONTENT_LOCATION_ID"; //$NON-NLS-1$
+ public static final String WEB_INF_ID = "WebNatureOperation.WEB_INF_ID"; //$NON-NLS-1$
+ public static final String WEB_INF_LOCATION_ID = "WebNatureOperation.WEB_INF_LOCATION_ID"; //$NON-NLS-1$
+ public static final String WEB_XML_ID = "WebNatureOperation.WEB_XML_ID"; //$NON-NLS-1$
+ public static final String WEB_XML_LOCATION_ID = "WebNatureOperation.WEB_XML_ID"; //$NON-NLS-1$
+ public static final String WEB_INF_LIBRARY_ID = "WebNatureOperation.WEB_INF_LIBRARY_ID"; //$NON-NLS-1$
+ public static final String WEB_INF_LIBRARY_LOCATION_ID = "WebNatureOperation.WEB_INF_LIBRARY_LOCATION_ID"; //$NON-NLS-1$
+ public static final String JAVA_SOURCES_ID = "WebNatureOperation.JAVA_SOURCES_ID"; //$NON-NLS-1$
+ public static final String JAVA_SOURCES_LOCATION_ID = "WebNatureOperation.JAVA_SOURCES_LOCATION_ID"; //$NON-NLS-1$
+ public static final String JAVA_CREATE_SOURCE_FOLDERS_ID = "WebNatureOperation.JAVA_CREATE_SOURCE_FOLDERS_ID"; //$NON-NLS-1$
+ public static final String JAVA_CLASSES_ID = "WebNatureOperation.JAVA_CLASSES_ID"; //$NON-NLS-1$
+ public static final String JAVA_CLASSES_LOCATION_ID = "WebNatureOperation.JAVA_CLASSES_LOCATION_ID"; //$NON-NLS-1$
+ public static final String JAVA_CLASSPATH_ID = "WebNatureOperation.JAVA_CLASSPATH_ID"; //$NON-NLS-1$
+ public static final String SERVLET_VERSION_ID = "WebNatureOperation.SERVLET_VERSION_ID"; //$NON-NLS-1$
+ public static final String JSP_VERSION_ID = "WebNatureOperation.JSP_VERSION_ID"; //$NON-NLS-1$
+ public static final String WEB_VERSION_ID = "WebNatureOperation.WEB_VERSION_ID"; //$NON-NLS-1$
+ public static final String ANT_BUILD_XML_ID = "WebNatureOperation.ANT_BUILD_XML_ID"; //$NON-NLS-1$
+ public static final String USE_DEFAULT_LOCATION_ID = "WebNatureOperation.USE_DEFAULT_LOCATION_ID"; //$NON-NLS-1$
+ public static final String REGISTER_WEB_CONTEXT_ID = "WebNatureOperation.REGISTER_WEB_CONTEXT_ID"; //$NON-NLS-1$
+ public static final String TEMPLATE_ID = "WebNatureOperation.TEMPLATE_ID"; //$NON-NLS-1$
+ public static final String TEMPLATE_VERSION_ID = "WebNatureOperation.TEMPLATE_VERSION_ID"; //$NON-NLS-1$
+ public static final String RUNTIME_NAME = "WebNatureOperation.RUNTIME_NAME"; //$NON-NLS-1$
// for STRUTS
- public static final String TLDS_ID = "WebNatureOperation.TLDS_ID";
+ public static final String TLDS_ID = "WebNatureOperation.TLDS_ID"; //$NON-NLS-1$
- private static final String PROJECT_ID = "WebNatureOperation.PROJECT_ID";
+ private static final String PROJECT_ID = "WebNatureOperation.PROJECT_ID"; //$NON-NLS-1$
protected XModel model;
private HashMap propertyValue = new HashMap();
@@ -165,8 +165,8 @@
XModelObject object = (XModelObject)o;
XModelObject[] cs = object.getChildren();
for (int i = 0; i < cs.length; i++) {
- String n = cs[i].getAttributeValue("name");
- String v = cs[i].getAttributeValue("value");
+ String n = cs[i].getAttributeValue("name"); //$NON-NLS-1$
+ String v = cs[i].getAttributeValue("value"); //$NON-NLS-1$
if(n != null && v != null) {
wizardPropertiesForVelocity.put(n.replace(' ', '_'), v);
}
@@ -202,7 +202,7 @@
*/
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (monitor == null) monitor = new NullProgressMonitor();
- monitor.beginTask("", 25);
+ monitor.beginTask("", 25); //$NON-NLS-1$
try {
// clear all .-files
clearProjectRoot(monitor);
@@ -259,7 +259,7 @@
}
protected String[] dotFilesList = {
- ".classpath", ".project", IModelNature.PROJECT_FILE, ".runtime", ".wtpmodules", ".settings"
+ ".classpath", ".project", IModelNature.PROJECT_FILE, ".runtime", ".wtpmodules", ".settings" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
};
/*
@@ -301,7 +301,7 @@
private void registerServer2(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
XModelObject fs = FileSystemsHelper.getFileSystems(model);
try {
- model.changeObjectAttribute(fs, "application name", registry.getApplicationName());
+ model.changeObjectAttribute(fs, "application name", registry.getApplicationName()); //$NON-NLS-1$
} catch (XModelException e) {
throw new InvocationTargetException(e);
}
@@ -328,7 +328,7 @@
*/
private void createLockFile() {
try {
- getProject().setSessionProperty(WatcherLoader.LOCK, "true");
+ getProject().setSessionProperty(WatcherLoader.LOCK, "true"); //$NON-NLS-1$
} catch (CoreException e) {
WebUiPlugin.getPluginLog().logError(e);
}
@@ -339,7 +339,7 @@
*/
private void deleteLockFile() {
try {
- boolean lock = "true".equals(getProject().getSessionProperty(WatcherLoader.LOCK));
+ boolean lock = "true".equals(getProject().getSessionProperty(WatcherLoader.LOCK)); //$NON-NLS-1$
if(lock) {
getProject().setSessionProperty(WatcherLoader.LOCK, null);
if(model != null) {
@@ -357,10 +357,10 @@
private void updateJavaNature() throws CoreException {
// JavaCore.create(getProject());
EclipseResourceUtil.addNatureToProject(getProject(), JavaCore.NATURE_ID);
- SpecialWizard w = SpecialWizardFactory.createSpecialWizard("org.jboss.tools.common.model.project.ClassPathUpdateWizard");
+ SpecialWizard w = SpecialWizardFactory.createSpecialWizard("org.jboss.tools.common.model.project.ClassPathUpdateWizard"); //$NON-NLS-1$
Properties p = new Properties();
- p.put("model", model);
- p.put("classes", new Path(getProperty(JAVA_CLASSES_LOCATION_ID)));
+ p.put("model", model); //$NON-NLS-1$
+ p.put("classes", new Path(getProperty(JAVA_CLASSES_LOCATION_ID))); //$NON-NLS-1$
//webInfLocation.append("classes"));
w.setObject(p);
w.execute();
@@ -388,30 +388,30 @@
IDataModel dataModel = DataModelFactory.createDataModel(modelProvider);
FacetDataModelMap map = (FacetDataModelMap) dataModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel configDM = (IDataModel) map.get("jst.web");
+ IDataModel configDM = (IDataModel) map.get("jst.web"); //$NON-NLS-1$
if(exists) {
IFacetedProject fp0 = ProjectFacetsManager.create(getProject());
exists = fp0 != null;
}
- if(sv != null && (sv.indexOf("2.3") >= 0 || sv.indexOf("2.5") >= 0)) {
+ if(sv != null && (sv.indexOf("2.3") >= 0 || sv.indexOf("2.5") >= 0)) { //$NON-NLS-1$ //$NON-NLS-2$
configDM.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, sv);
}
if(webroot != null) {
- int i = webroot.lastIndexOf("/");
+ int i = webroot.lastIndexOf("/"); //$NON-NLS-1$
String webRootName = webroot.substring(i + 1);
- if(webroot.startsWith(projectLocation.replace('\\', '/') + "/")) {
+ if(webroot.startsWith(projectLocation.replace('\\', '/') + "/")) { //$NON-NLS-1$
webRootName = webroot.substring(projectLocation.length() + 1);
}
configDM.setProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER, webRootName);
}
if(javaRoot != null && javaRoot.length > 0 && javaRoot[0].length() > 0) {
String jr = javaRoot[0].replace('\\', '/');
- int i = jr.lastIndexOf("/");
+ int i = jr.lastIndexOf("/"); //$NON-NLS-1$
String javaRootName = javaRoot[0].substring(i + 1);
- if(jr.startsWith(projectLocation.replace('\\', '/') + "/")) {
+ if(jr.startsWith(projectLocation.replace('\\', '/') + "/")) { //$NON-NLS-1$
javaRootName = jr.substring(projectLocation.length() + 1);
}
configDM.setProperty(IWebFacetInstallDataModelProperties.SOURCE_FOLDER, javaRootName);
@@ -439,7 +439,7 @@
}
if(getProject().exists()) {
ModuleCoreNature.addModuleCoreNatureIfNecessary(getProject(), monitor);
- String emfNature = "org.eclipse.jem.workbench.JavaEMFNature";
+ String emfNature = "org.eclipse.jem.workbench.JavaEMFNature"; //$NON-NLS-1$
if(!getProject().hasNature(emfNature)) {
ProjectUtilities.addNatureToProject(getProject(), emfNature);
}
@@ -473,19 +473,19 @@
private boolean isDefaultLocation(String projectLocation) {
String root = ModelPlugin.getWorkspace().getRoot().getLocation().toString().replace('\\', '/');
- return (projectLocation.replace('\\','/') + "/").equals(root + "/" + getProject().getName() + "/");
+ return (projectLocation.replace('\\','/') + "/").equals(root + "/" + getProject().getName() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// return (projectLocation.replace('\\','/') + "/").startsWith(root + "/" + getProject().getName() + "/");
}
private String createLinks(String projectLocation) throws CoreException {
IProject project = getProject();
String root = ModelPlugin.getWorkspace().getRoot().getLocation().toString().replace('\\', '/');
- if((projectLocation.replace('\\','/') + "/").startsWith(root + "/" + project.getName() + "/")) return projectLocation;
+ if((projectLocation.replace('\\','/') + "/").startsWith(root + "/" + project.getName() + "/")) return projectLocation; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String webroot = getProperty(WEB_CONTENT_LOCATION_ID);
String[] javaRoot = (String[])getPropertyObject(JAVA_SOURCES_LOCATION_ID);
- String wsProjectLocation = root + "/" + project.getName();
+ String wsProjectLocation = root + "/" + project.getName(); //$NON-NLS-1$
if(!project.exists()) {
IProjectDescription pd = ModelPlugin.getWorkspace().newProjectDescription(project.getName());
project.create(pd, null);
@@ -493,22 +493,22 @@
JavaCore.create(getProject());
EclipseResourceUtil.addNatureToProject(getProject(), JavaCore.NATURE_ID);
IJavaProject jp = EclipseResourceUtil.getJavaProject(project);
- IClasspathEntry entry = new ClassPathUpdate().createNewClasspathEntry(project.getFullPath().append("src"), IClasspathEntry.CPE_SOURCE);
+ IClasspathEntry entry = new ClassPathUpdate().createNewClasspathEntry(project.getFullPath().append("src"), IClasspathEntry.CPE_SOURCE); //$NON-NLS-1$
try {
- jp.setRawClasspath(new IClasspathEntry[]{entry}, project.getFullPath().append("classes"), null);
+ jp.setRawClasspath(new IClasspathEntry[]{entry}, project.getFullPath().append("classes"), null); //$NON-NLS-1$
} catch (CoreException e) {
WebUiPlugin.getPluginLog().logError(e);
}
}
if(webroot != null) {
- IFolder f = project.getFolder("WEB-ROOT");
+ IFolder f = project.getFolder("WEB-ROOT"); //$NON-NLS-1$
if(!f.exists()) f.createLink(new Path(webroot), IFolder.FORCE, null);
- setProperty(WEB_CONTENT_LOCATION_ID, "/WEB-ROOT");
+ setProperty(WEB_CONTENT_LOCATION_ID, "/WEB-ROOT"); //$NON-NLS-1$
}
if(javaRoot != null && javaRoot.length > 0 && javaRoot[0].length() > 0) {
- IFolder f = project.getFolder("src");
+ IFolder f = project.getFolder("src"); //$NON-NLS-1$
if(!f.exists()) f.createLink(new Path(javaRoot[0]), IFolder.FORCE, null);
- javaRoot[0] = "/src";
+ javaRoot[0] = "/src"; //$NON-NLS-1$
}
return wsProjectLocation;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -95,7 +95,7 @@
protected void copyLibraries() {}
protected String getDefaultServletVersion() {
- return "";
+ return ""; //$NON-NLS-1$
}
protected abstract void execute() throws XModelException;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -125,7 +125,7 @@
FileUtil.copyFile(sf, new File(tf), true);
projectFile = new File(tf);
} else {
- throw new RuntimeException("Project template must have model configuration file");
+ throw new RuntimeException("Project template must have model configuration file"); //$NON-NLS-1$
}
}
@@ -148,7 +148,7 @@
try {
return new File(fileName).getCanonicalPath();
} catch (IOException e) {
- WebUiPlugin.getPluginLog().logError("Cannot find folder '" + fileName + "'", null);
+ WebUiPlugin.getPluginLog().logError("Cannot find folder '" + fileName + "'", null); //$NON-NLS-1$ //$NON-NLS-2$
return fileName;
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -44,15 +44,16 @@
import org.jboss.tools.common.model.util.XModelObjectUtil;
import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.server.*;
+import org.jboss.tools.jst.web.ui.Messages;
public class AppRegisterComponent {
- static String ENTITY = "WebPrjRegisterApplication";
- static String ATTR_REGISTER = "register";
- static String ATTR_LOCATION = "location";
- static String ATTR_APP_NAME = "application name";
- static String ATTR_RUNTIME = "runtime";
- static String ATTR_TARGET_SERVER = "target server";
- static String ATTR_SEPARATOR = "separator";
+ static String ENTITY = "WebPrjRegisterApplication"; //$NON-NLS-1$
+ static String ATTR_REGISTER = "register"; //$NON-NLS-1$
+ static String ATTR_LOCATION = "location"; //$NON-NLS-1$
+ static String ATTR_APP_NAME = "application name"; //$NON-NLS-1$
+ static String ATTR_RUNTIME = "runtime"; //$NON-NLS-1$
+ static String ATTR_TARGET_SERVER = "target server"; //$NON-NLS-1$
+ static String ATTR_SEPARATOR = "separator"; //$NON-NLS-1$
RegisterServerContext context;
boolean isEnabling = true;
@@ -93,7 +94,7 @@
XModelObject dummy = PreferenceModelUtilities.getPreferenceModel().getRoot();
String[][] attInfo = null;
attInfo = new String[][] {
- {ENTITY, ""}, {ATTR_APP_NAME, "yes"}, {ATTR_RUNTIME, "yes"}, {ATTR_SEPARATOR, "no"}, {ATTR_TARGET_SERVER, "no"}
+ {ENTITY, ""}, {ATTR_APP_NAME, "yes"}, {ATTR_RUNTIME, "yes"}, {ATTR_SEPARATOR, "no"}, {ATTR_TARGET_SERVER, "no"} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
};
XEntityData entityData = XEntityDataImpl.create(attInfo);
support = new XAttributeSupport() {
@@ -102,7 +103,7 @@
}
};
support.init(dummy, entityData);
- entityData = XEntityDataImpl.create(new String[][] {{ENTITY, ""}, {ATTR_REGISTER, "no"}});
+ entityData = XEntityDataImpl.create(new String[][] {{ENTITY, ""}, {ATTR_REGISTER, "no"}}); //$NON-NLS-1$ //$NON-NLS-2$
if(isEnabling()) {
enableSupport = new XAttributeSupport();
enableSupport.init(dummy, entityData);
@@ -121,7 +122,7 @@
}
public void loadApplicationName() {
- String n = context.getApplicationName() == null ? "" : context.getApplicationName();
+ String n = context.getApplicationName() == null ? "" : context.getApplicationName(); //$NON-NLS-1$
support.getPropertyEditorAdapterByName(ATTR_APP_NAME).setValue(n);
}
@@ -140,7 +141,7 @@
c.setLayout(layout);
enableSupport.setLayout(getEnablingLayout());
enableSupport.createControl(c);
- setLableText(enableSupport, "register");
+ setLableText(enableSupport, "register"); //$NON-NLS-1$
Group group = new Group(c, SWT.SHADOW_ETCHED_IN);
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
group.setLayout(new GridLayout());
@@ -153,14 +154,14 @@
ExtendedFieldEditor f = (ExtendedFieldEditor)s.getFieldEditorByName(field);
if(f == null) return;
String t = f.getLabelText();
- int i = (t.indexOf("%1"));
+ int i = (t.indexOf("%1")); //$NON-NLS-1$
if(i < 0) return;
- String insert = "";
+ String insert = ""; //$NON-NLS-1$
IServer server = ServerManager.getInstance().getSelectedServer();
if(server != null) {
insert = server.getServerType().getName();
} else {
- insert = "server";
+ insert = "server"; //$NON-NLS-1$
}
t = t.substring(0, i) + insert + t.substring(i + 2);
f.setLabelText(t);
@@ -175,7 +176,7 @@
private Control createSupportControl(Composite parent) {
if(supportLayout != null) support.setLayout(supportLayout);
Control sc = support.createControl(parent);
- setLableText(support, "location");
+ setLableText(support, "location"); //$NON-NLS-1$
supportControl = (Composite)sc;
GridData g2 = new GridData(GridData.FILL_HORIZONTAL);
g2.horizontalIndent = 0;
@@ -198,10 +199,10 @@
private void initValues() {
if(isEnabling()) {
- enableSupport.getEntityData().setValue(ATTR_REGISTER, context.isEnabled() ? "yes" : "no");
+ enableSupport.getEntityData().setValue(ATTR_REGISTER, context.isEnabled() ? "yes" : "no"); //$NON-NLS-1$ //$NON-NLS-2$
enableSupport.load();
}
- String n = context.getApplicationName() == null ? "" : context.getApplicationName();
+ String n = context.getApplicationName() == null ? "" : context.getApplicationName(); //$NON-NLS-1$
support.getEntityData().setValue(ATTR_APP_NAME, n);
initRuntimeValue();
@@ -220,7 +221,7 @@
if(rs[i] == selectedRuntime || selectedRuntime1 == null) selectedRuntime1 = rs[i];
}
HUtil.hackAttributeConstraintList(new XEntityData[]{support.getEntityData()}, 0, ATTR_RUNTIME, ns);
- String runtimeName = (selectedRuntime1 != null) ? selectedRuntime1.getName() : "";
+ String runtimeName = (selectedRuntime1 != null) ? selectedRuntime1.getName() : ""; //$NON-NLS-1$
context.setRuntimeName(runtimeName);
support.getEntityData().setValue(ATTR_RUNTIME, runtimeName);
}
@@ -250,7 +251,7 @@
support.getEntityData().setValue(ATTR_TARGET_SERVER, selected.getName());
} else {
context.setTargetServers(new IServer[]{});
- support.getEntityData().setValue(ATTR_TARGET_SERVER, "");
+ support.getEntityData().setValue(ATTR_TARGET_SERVER, ""); //$NON-NLS-1$
}
}
@@ -268,7 +269,7 @@
}
boolean isRegisterEnabled() {
- return !isEnabling() || ("yes".equals(enableAdapter.getValue()));
+ return !isEnabling() || ("yes".equals(enableAdapter.getValue())); //$NON-NLS-1$
}
public String getErrorMessage() {
@@ -300,12 +301,12 @@
}
void onRuntimeChange(String value) {
- value = (value == null) ? "" : value.trim();
+ value = (value == null) ? "" : value.trim(); //$NON-NLS-1$
if(value.equals(context.getRuntimeName())) return;
context.setRuntimeName(value);
initTargetServerValue();
MutableMultipleChoiceFieldEditor ed = (MutableMultipleChoiceFieldEditor)support.getFieldEditorByName(ATTR_TARGET_SERVER);
- ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT, "old", "new"));
+ ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT, "old", "new")); //$NON-NLS-1$ //$NON-NLS-2$
}
class ServerInputChangeListener implements java.beans.PropertyChangeListener {
@@ -338,7 +339,7 @@
}
public int execute() {
- Shell shell = (Shell)p.get("shell");
+ Shell shell = (Shell)p.get("shell"); //$NON-NLS-1$
IServer server = newServer(shell);
if(server == null) return -1;
@@ -348,10 +349,10 @@
ed1.setNewValue(server.getRuntime().getName());
}
- p.setProperty("value", server.getName());
+ p.setProperty("value", server.getName()); //$NON-NLS-1$
initTargetServerValue();
MutableMultipleChoiceFieldEditor ed = (MutableMultipleChoiceFieldEditor)support.getFieldEditorByName(ATTR_TARGET_SERVER);
- ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT, "old", "new"));
+ ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT, "old", "new")); //$NON-NLS-1$ //$NON-NLS-2$
return 0;
}
@@ -378,12 +379,12 @@
}
public int execute() {
- Shell shell = (Shell)p.get("shell");
+ Shell shell = (Shell)p.get("shell"); //$NON-NLS-1$
IRuntime runtime = newRuntime(shell);
if(runtime == null) return -1;
- p.setProperty("value", runtime.getName());
+ p.setProperty("value", runtime.getName()); //$NON-NLS-1$
initRuntimeValue();
- context.setRuntimeName(""); //prepare for change
+ context.setRuntimeName(""); //prepare for change //$NON-NLS-1$
return 0;
}
@@ -391,7 +392,7 @@
private IRuntime newRuntime(Shell shell) {
WizardFragment fragment = null;
- String title = "New Server Runtime"; // ServerUIPlugin.getResource2("wizNewRuntimeWizardTitle");
+ String title = Messages.AppRegisterComponent_NewServerRuntime; // ServerUIPlugin.getResource2("wizNewRuntimeWizardTitle");
fragment = new WizardFragment() {
protected void createChildFragments(List list) {
list.add(new NewRuntimeWizardFragment());
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -78,7 +78,7 @@
}
private void register(IProgressMonitor monitor) throws Exception {
- if(monitor != null) monitor.beginTask("", 100);
+ if(monitor != null) monitor.beginTask("", 100); //$NON-NLS-1$
if(monitor != null) monitor.worked(5);
IServer[] servers = registry.getTargetServers();
@@ -100,12 +100,12 @@
RegistrationHelper.register(p, servers[i]);
if(monitor != null) monitor.worked(step);
}
- object.getModel().changeObjectAttribute(object, "application name", registry.getApplicationName());
+ object.getModel().changeObjectAttribute(object, "application name", registry.getApplicationName()); //$NON-NLS-1$
if(monitor != null) monitor.worked(20);
}
public String getWebRootLocation() {
- XModelObject fs = object.getModel().getByPath("FileSystems/WEB-ROOT");
+ XModelObject fs = object.getModel().getByPath("FileSystems/WEB-ROOT"); //$NON-NLS-1$
///if(fs == null) fs = getRootFileSystemForModule(model, "");
if(!(fs instanceof FileSystemImpl)) return null;
return ((FileSystemImpl)fs).getAbsoluteLocation();
@@ -114,16 +114,16 @@
public void setObject(Object object) {
p = (Properties)object;
registry = new RegisterServerContext(RegisterServerContext.PROJECT_MODE_EXISTING);
- this.object = (XModelObject)p.get("object");
+ this.object = (XModelObject)p.get("object"); //$NON-NLS-1$
registry.setProjectHandle(EclipseResourceUtil.getProject(this.object));
registry.init();
- registry.setNatureIndex(p.getProperty("natureIndex"));
- XModelObject web = this.object.getModel().getByPath("Web");
- String servletVersion = web == null ? null : web.getAttributeValue("servlet version");
+ registry.setNatureIndex(p.getProperty("natureIndex")); //$NON-NLS-1$
+ XModelObject web = this.object.getModel().getByPath("Web"); //$NON-NLS-1$
+ String servletVersion = web == null ? null : web.getAttributeValue("servlet version"); //$NON-NLS-1$
registry.setServletVersion(servletVersion);
- registry.setApplicationName(this.object.getAttributeValue("application name"));
+ registry.setApplicationName(this.object.getAttributeValue("application name")); //$NON-NLS-1$
page = new AppRegisterWizardPage(registry);
- String n = p.getProperty("natureIndex");
+ String n = p.getProperty("natureIndex"); //$NON-NLS-1$
if(n == null) n = "project"; else n += " Project";
page.setTitle(WizardKeys.toDisplayName(n));
addPage(page);
@@ -133,7 +133,7 @@
Shell shell = ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
WizardDialog dialog = new WizardDialog(shell, this);
dialog.create();
- dialog.getShell().setText("" + p.getProperty("title"));
+ dialog.getShell().setText("" + p.getProperty("title")); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setTitleImage(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT).createImage(null));
return dialog.open();
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -25,6 +25,7 @@
import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
import org.jboss.tools.common.model.options.Preference;
import org.jboss.tools.jst.web.project.helpers.NewWebProjectContext;
+import org.jboss.tools.jst.web.ui.Messages;
public class NewProjectRegisterPage extends WizardPage {
private NewWebProjectContext context;
@@ -34,7 +35,7 @@
Preference servletPreference;
public NewProjectRegisterPage(NewWebProjectContext context, Preference servletPreference) {
- super("Register");
+ super(Messages.NewProjectRegisterPage_Register);
this.context = context;
this.servletPreference = servletPreference;
initServletSupport();
@@ -64,8 +65,8 @@
String defaultServletVersion = servletPreference.getValue();
XEntityData entityData = XEntityDataImpl.create(
- new String[][]{{"WebPrjCreateStepDirs", ""}, {"servletVersion", ""}});
- entityData.setValue("servletVersion", defaultServletVersion);
+ new String[][]{{"WebPrjCreateStepDirs", ""}, {"servletVersion", ""}}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ entityData.setValue("servletVersion", defaultServletVersion); //$NON-NLS-1$
context.setServletVersion(defaultServletVersion);
support = new XAttributeSupport(ModelUtilities.getPreferenceModel().getRoot(), entityData);
support.setLayout(getLayoutForSupport());
@@ -105,12 +106,12 @@
}
public void loadServletVersion() {
- String currentServletVersion = support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true);
+ String currentServletVersion = support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true); //$NON-NLS-1$
String vs = context.getServletVersion();
if(vs != null && vs.length() > 0 && !vs.equals(currentServletVersion)) {
context.setServletVersion(vs);
- support.getPropertyEditorAdapterByName("servletVersion").setValue(vs);
+ support.getPropertyEditorAdapterByName("servletVersion").setValue(vs); //$NON-NLS-1$
}
if(context != null && context.getProjectTemplate() != null) {
@@ -119,7 +120,7 @@
int i = context.compareServletVersions(prefServletVersion, currentServletVersion);
if(i > 0) {
context.setServletVersion(prefServletVersion);
- support.getPropertyEditorAdapterByName("servletVersion").setValue(prefServletVersion);
+ support.getPropertyEditorAdapterByName("servletVersion").setValue(prefServletVersion); //$NON-NLS-1$
}
}
}
@@ -153,14 +154,14 @@
}
private void initListeners() {
- support.getPropertyEditorAdapterByName("servletVersion").addValueChangeListener(new InputChangeListener());
+ support.getPropertyEditorAdapterByName("servletVersion").addValueChangeListener(new InputChangeListener()); //$NON-NLS-1$
appRegister.addPropertyChangeListener(new InputChangeListener());
}
class InputChangeListener implements java.beans.PropertyChangeListener {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if(lock) return;
- context.setServletVersion(support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true));
+ context.setServletVersion(support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true)); //$NON-NLS-1$
setPageComplete(validatePage());
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
class NewCSSFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileCSS";
+ return "CreateActions.CreateFiles.Web.CreateFileCSS"; //$NON-NLS-1$
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
class NewJSFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileJS";
+ return "CreateActions.CreateFiles.Web.CreateFileJS"; //$NON-NLS-1$
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
}
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileTLD20";
+ return "CreateActions.CreateFiles.Web.CreateFileTLD20"; //$NON-NLS-1$
}
class NewWebFileContext extends NewFileContextEx {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -13,7 +13,7 @@
public class NewTLD21FileWizard extends NewTLD20FileWizard {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileTLD21";
+ return "CreateActions.CreateFiles.Web.CreateFileTLD21"; //$NON-NLS-1$
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -22,7 +22,7 @@
class NewWebFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileTLD";
+ return "CreateActions.CreateFiles.Web.CreateFileTLD"; //$NON-NLS-1$
}
protected SpecialWizardSupport createSupport() {
return new CreateTLDFileSupport();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
class NewWebFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateWebApp";
+ return "CreateActions.CreateFiles.Web.CreateWebApp"; //$NON-NLS-1$
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -34,8 +34,8 @@
public void setSupport(SpecialWizardSupport support, int i) {
super.setSupport(support, i);
importSupport = (ImportTLDToPaletteSupport)support;
- parentGroupComponent.setItems((String[])support.getProperties().get("groups"));
- parentGroupComponent.setInitialItem(support.getProperties().getProperty("parent group"));
+ parentGroupComponent.setItems((String[])support.getProperties().get("groups")); //$NON-NLS-1$
+ parentGroupComponent.setInitialItem(support.getProperties().getProperty("parent group")); //$NON-NLS-1$
}
public Control createControl(Composite parent) {
@@ -75,12 +75,12 @@
attributes.store();
parentGroupComponent.store(support.getProperties());
validate();
- if(event != null && event.getSource() == attributes.getPropertyEditorAdapterByName("tld")) {
+ if(event != null && event.getSource() == attributes.getPropertyEditorAdapterByName("tld")) { //$NON-NLS-1$
// String path = (String)event.getNewValue();
- boolean locked = ((DefaultValueAdapter)attributes.getPropertyEditorAdapterByName("tld")).isStoreLocked();
+ boolean locked = ((DefaultValueAdapter)attributes.getPropertyEditorAdapterByName("tld")).isStoreLocked(); //$NON-NLS-1$
if(!locked) {
importSupport.onPathModified();
- String[] as = {"name", URIConstants.DEFAULT_PREFIX, URIConstants.LIBRARY_URI};
+ String[] as = {"name", URIConstants.DEFAULT_PREFIX, URIConstants.LIBRARY_URI}; //$NON-NLS-1$
for (int i = 0; i < as.length; i++)
attributes.getPropertyEditorAdapterByName(as[i]).setValue(support.getAttributeValue(0, as[i]));
validate();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -31,8 +31,8 @@
}
private void syncNameAndProject(PropertyChangeEvent arg0) {
- IModelPropertyEditorAdapter n = attributes.getPropertyEditorAdapterByName("name");
- IModelPropertyEditorAdapter p = attributes.getPropertyEditorAdapterByName("project");
+ IModelPropertyEditorAdapter n = attributes.getPropertyEditorAdapterByName("name"); //$NON-NLS-1$
+ IModelPropertyEditorAdapter p = attributes.getPropertyEditorAdapterByName("project"); //$NON-NLS-1$
if(n == null || p == null) return;
if(arg0.getSource() == p) {
if(nameEqualsProjectName) n.setValue(p.getStringValue(true));
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
PropertiesEditor propertiesEditor = new PropertiesEditor();
public Control createControl(Composite parent) {
- XModelObject properties = (XModelObject)support.getProperties().get("properties");
+ XModelObject properties = (XModelObject)support.getProperties().get("properties"); //$NON-NLS-1$
propertiesEditor.setObject(properties);
return propertiesEditor.createControl(parent);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -30,7 +30,7 @@
AddProjectTemplateResourcesStep step;
public Control createControl(Composite parent) {
- step = (AddProjectTemplateResourcesStep)support.getProperties().get("ResourcesStep");
+ step = (AddProjectTemplateResourcesStep)support.getProperties().get("ResourcesStep"); //$NON-NLS-1$
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -25,7 +25,7 @@
public class AddProjectTemplateVelocityView extends SpecialWizardStep {
public Control createControl(Composite parent) {
- IModelPropertyEditorAdapter adapter = attributes.getPropertyEditorAdapterByName("velocity templates");
+ IModelPropertyEditorAdapter adapter = attributes.getPropertyEditorAdapterByName("velocity templates"); //$NON-NLS-1$
if(adapter instanceof StructuredListAdapter) {
StructuredListAdapter s = (StructuredListAdapter)adapter;
NewResourceProvider provider = new NewResourceProvider();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -45,7 +45,7 @@
public CheckboxTreeViewer getTreeViewer() {
CheckboxTreeViewer viewer = null;
try {
- Field f = cls.getDeclaredField("treeViewer");
+ Field f = cls.getDeclaredField("treeViewer"); //$NON-NLS-1$
f.setAccessible(true);
viewer = (CheckboxTreeViewer)f.get(this);
} catch (SecurityException e) {
@@ -72,7 +72,7 @@
private void setCurrentTreeSelection(Object element) {
Field f;
try {
- f = cls.getDeclaredField("currentTreeSelection");
+ f = cls.getDeclaredField("currentTreeSelection"); //$NON-NLS-1$
f.setAccessible(true);
f.set(this, element);
} catch (SecurityException e) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -41,7 +41,7 @@
Control control;
public Control createControl(Composite parent) {
- projectTemplate = (ProjectTemplate)support.getProperties().get("projectTemplate");
+ projectTemplate = (ProjectTemplate)support.getProperties().get("projectTemplate"); //$NON-NLS-1$
templateName.init(new NameChangeListener(), projectTemplate, support.getEntityData()[id]);
templatePreprocessing.setProjectTemplate(projectTemplate);
templateProperties.setObject(projectTemplate.getProperties());
@@ -106,7 +106,7 @@
this.listener = listener;
projectTemplate = t;
this.data = data;
- data.setValue("name", t.getName());
+ data.setValue("name", t.getName()); //$NON-NLS-1$
}
public Control createControl(Composite parent) {
@@ -119,7 +119,7 @@
public void commit() {
support.store();
- projectTemplate.setName(data.getValue("name"));
+ projectTemplate.setName(data.getValue("name")); //$NON-NLS-1$
}
}
@@ -199,7 +199,7 @@
void addSelected(Set set, File f, File root) {
String n = f.getAbsolutePath().replace('\\', '/');
- String r = root.getAbsolutePath().replace('\\', '/') + "/";
+ String r = root.getAbsolutePath().replace('\\', '/') + "/"; //$NON-NLS-1$
if(n.startsWith(r)) {
n = n.substring(r.length());
set.add(n);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -95,7 +95,7 @@
webXmlLocationAdapter.setValue("" + context.getInitialLocation()); //$NON-NLS-1$
} else {
linkAdapter = support.getPropertyEditorAdapterByName(ImportWebDirProjectContext.ATTR_LINK);
- linkAdapter.setValue("true");
+ linkAdapter.setValue("true"); //$NON-NLS-1$
}
}
@@ -179,7 +179,7 @@
if(linkAdapter != null) {
support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(), (Composite)getControl());
if(!mayNeedLink() && linkAdapter != null) {
- linkAdapter.setValue("false");
+ linkAdapter.setValue("false"); //$NON-NLS-1$
}
}
}
@@ -195,7 +195,7 @@
support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(), (Composite)getControl());
}
if(!mayNeedLink() && linkAdapter != null) {
- linkAdapter.setValue("false");
+ linkAdapter.setValue("false"); //$NON-NLS-1$
}
}
}
@@ -204,7 +204,7 @@
new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
String v = linkAdapter.getStringValue(false);
- context.setLinkingToProjectOutsideWorkspace(!"false".equals(v) && mayNeedLink());
+ context.setLinkingToProjectOutsideWorkspace(!"false".equals(v) && mayNeedLink()); //$NON-NLS-1$
}
}
);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -49,9 +49,9 @@
protected void installMainPage() {
mainPage = new ImportWebWarWizardPage(context);
- String mainPageTitle = WizardKeys.getString("" + getClass().getName() + ".mainPageTitle");
+ String mainPageTitle = WizardKeys.getString("" + getClass().getName() + ".mainPageTitle"); //$NON-NLS-1$ //$NON-NLS-2$
mainPage.setTitle(mainPageTitle);
- String mainPageDescr = WizardKeys.getString("" + ImportWebWarWizard.class.getName() + ".mainPagePrompt");
+ String mainPageDescr = WizardKeys.getString("" + ImportWebWarWizard.class.getName() + ".mainPagePrompt"); //$NON-NLS-1$ //$NON-NLS-2$
mainPage.setDescription(mainPageDescr);
addPage(mainPage);
}
@@ -65,9 +65,9 @@
boolean result = true;
mainPage.commit();
- context.setServletVersion("2.4");
+ context.setServletVersion("2.4"); //$NON-NLS-1$
if(!context.isServletVersionConsistentToWebXML()) {
- context.setServletVersion("2.3");
+ context.setServletVersion("2.3"); //$NON-NLS-1$
}
IRunnableWithProgress op = new WorkspaceModifyDelegatingOperation(createOperation());
@@ -90,7 +90,7 @@
}
protected String getFinalPerspective() {
- return "org.jboss.tools.jst.web.ui.WebDevelopmentPerspective";
+ return "org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"; //$NON-NLS-1$
}
private class ConfigurationElementInternal implements IConfigurationElement {
@@ -98,35 +98,35 @@
return null;
}
public String getAttribute(String name) {
- return "finalPerspective".equals(name) ? getFinalPerspective() : null;
+ return "finalPerspective".equals(name) ? getFinalPerspective() : null; //$NON-NLS-1$
}
public Object createExecutableExtension(String propertyName) throws CoreException {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getAttributeAsIs(String name) {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String[] getAttributeNames() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public IConfigurationElement[] getChildren() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public IConfigurationElement[] getChildren(String name) {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public IExtension getDeclaringExtension() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getName() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getValue() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getValueAsIs() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public Class loadExtensionClass(String propertyName) throws CoreException {
return null;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -43,14 +43,14 @@
Path defaultPath = (Path)ModelUIPlugin.getWorkspace().getRoot().getLocation();
public ImportWebWarWizardPage(ImportWebWarContext context) {
- super("Wizard Page");
+ super("Wizard Page"); //$NON-NLS-1$
this.context = context;
XEntityData entityData = XEntityDataImpl.create(new String[][] {
- {"WebPrjAdoptWarStep0", ""},
- {"*.war location", "yes"},
- {"name", "yes"},
- {"use default path", "no"},
- {"location", "yes"},
+ {"WebPrjAdoptWarStep0", ""}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"*.war location", "yes"}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"name", "yes"}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"use default path", "no"}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"location", "yes"}, //$NON-NLS-1$ //$NON-NLS-2$
// WTP allows only classic structure
// {"import type", "no"}
});
@@ -60,10 +60,10 @@
}
support = new XAttributeSupport(ModelUtilities.getPreferenceModel().getRoot(), entityData);
support.setLayout(getLayoutForSupport());
- warLocationAdapter = support.getPropertyEditorAdapterByName("*.war location");
- nameLocationAdapter = support.getPropertyEditorAdapterByName("name");
- useDefaultPathAdapter = support.getPropertyEditorAdapterByName("use default path");
- projectLocationAdapter = support.getPropertyEditorAdapterByName("location");
+ warLocationAdapter = support.getPropertyEditorAdapterByName("*.war location"); //$NON-NLS-1$
+ nameLocationAdapter = support.getPropertyEditorAdapterByName("name"); //$NON-NLS-1$
+ useDefaultPathAdapter = support.getPropertyEditorAdapterByName("use default path"); //$NON-NLS-1$
+ projectLocationAdapter = support.getPropertyEditorAdapterByName("location"); //$NON-NLS-1$
appRegister.setContext(context.getRegisterServerContext());
appRegister.setEnabling(false);
appRegister.init();
@@ -96,7 +96,7 @@
Control control = support.createControl(c);
supportControl = (Composite)control;
control.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- projectLocationEditor = (IPropertyEditor)support.getPropertyEditorByName("location");
+ projectLocationEditor = (IPropertyEditor)support.getPropertyEditorByName("location"); //$NON-NLS-1$
updateLocationEditor();
initListeners();
createRegisterControl(c);
@@ -107,7 +107,7 @@
}
private boolean isDefaultPath() {
- return "true".equals(useDefaultPathAdapter.getStringValue(true));
+ return "true".equals(useDefaultPathAdapter.getStringValue(true)); //$NON-NLS-1$
}
private void updateLocationEditor() {
@@ -158,7 +158,7 @@
if(p == null) {
return defaultPath.toOSString();
} else {
- return defaultPath.toOSString() + "/" + p.getName();
+ return defaultPath.toOSString() + "/" + p.getName(); //$NON-NLS-1$
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -31,7 +31,7 @@
import org.jboss.tools.jst.web.ui.operation.WebNatureOperation;
public abstract class NewWebProjectWizard extends Wizard implements INewWizard, IExecutableExtension {
- private static final String CANNOT_CREATE_LOCATION = "NewStrutsProjectWizard.CannotCreateLocation";
+ private static final String CANNOT_CREATE_LOCATION = "NewStrutsProjectWizard.CannotCreateLocation"; //$NON-NLS-1$
protected IWorkbench workbench;
protected IStructuredSelection selection;
@@ -71,14 +71,14 @@
}
} catch (InvocationTargetException e) {
WebUiPlugin.getPluginLog().logError(e);
- String message = WizardKeys.getString(CANNOT_CREATE_LOCATION + ".ErrorMessage") + ": " + context.getLocationPath();
- Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0, message, e);
+ String message = WizardKeys.getString(CANNOT_CREATE_LOCATION + ".ErrorMessage") + ": " + context.getLocationPath(); //$NON-NLS-1$ //$NON-NLS-2$
+ Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0, message, e); //$NON-NLS-1$
ProblemReportingHelper.reportProblem(status);
result = false;
} catch (InterruptedException e) {
WebUiPlugin.getPluginLog().logError(e);
- String message = WizardKeys.getString(CANNOT_CREATE_LOCATION+".ErrorMessage")+": "+context.getLocationPath();
- Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0, message, e);
+ String message = WizardKeys.getString(CANNOT_CREATE_LOCATION+".ErrorMessage")+": "+context.getLocationPath(); //$NON-NLS-1$ //$NON-NLS-2$
+ Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0, message, e); //$NON-NLS-1$
ProblemReportingHelper.reportProblem(status);
result = false;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -89,27 +89,27 @@
nameEditor = new StringEditor(settings);
nameAdapter = new NameAdapter();
nameEditor.setInput(nameAdapter);
- nameEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_NAME)+"*");
+ nameEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_NAME)+"*"); //$NON-NLS-1$ //$NON-NLS-2$
locationEditor = new DirectoryChoicerEditor(settings);
locationAdapter = new LocationAdapter();
locationEditor.setInput(locationAdapter);
- locationEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_LOCATION)+"*");
+ locationEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_LOCATION)+"*"); //$NON-NLS-1$ //$NON-NLS-2$
useDefaultPathEditor = new CheckBoxEditor(settings);
useDefaultPathAdapter = new UseDefaultPathAdapter();
useDefaultPathEditor.setInput(useDefaultPathAdapter);
- useDefaultPathEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_USE_DEFAULT_LOCATION)+"*");
+ useDefaultPathEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_USE_DEFAULT_LOCATION)+"*"); //$NON-NLS-1$ //$NON-NLS-2$
versionEditor = new DropDownEditor(settings);
versionAdapter = new StrutsVersionAdapter();
versionEditor.setInput(versionAdapter);
- versionEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_VERSION)+"*");
+ versionEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_VERSION)+"*"); //$NON-NLS-1$ //$NON-NLS-2$
templateEditor = new DropDownEditor(settings);
templateAdapter = new TemplateAdapter();
templateEditor.setInput(templateAdapter);
- templateEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_TEMPLATE)+"*");
+ templateEditor.setLabelText(getString(getKey() + "_"+NewWebProjectContext.ATTR_TEMPLATE)+"*"); //$NON-NLS-1$ //$NON-NLS-2$
defaultPath = ModelUIPlugin.getWorkspace().getRoot().getLocation();
@@ -117,7 +117,7 @@
}
protected String getKey() {
- return "newStrutsProjectPage1";
+ return "newStrutsProjectPage1"; //$NON-NLS-1$
}
Composite composite = null;
@@ -138,7 +138,7 @@
composite.setLayout(layout);
introduction = new Label(composite, SWT.NO_FOCUS);
- String text = "" + WizardKeys.getString(getKey() + "_introduction");
+ String text = "" + WizardKeys.getString(getKey() + "_introduction"); //$NON-NLS-1$ //$NON-NLS-2$
text = insertBreaks(introduction, text, 380);
introduction.setText(text);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -172,8 +172,8 @@
this.setControl(composite);
///Preference.USE_DEFAULT_PROJECT_ROOT.getValue()
// init default values
- nameAdapter.setValue("");
- useDefaultPathAdapter.setValue((getProjectRootOption() != null) ? "false" : "true");
+ nameAdapter.setValue(""); //$NON-NLS-1$
+ useDefaultPathAdapter.setValue((getProjectRootOption() != null) ? "false" : "true"); //$NON-NLS-1$ //$NON-NLS-2$
// locationAdapter.setValue(defaultPath.toOSString());
if (getProjectRootOption() == null)
locationAdapter.setValue(defaultPath.toOSString());
@@ -234,9 +234,9 @@
return false;
}
- if ("".equals(projectName)) {
+ if ("".equals(projectName)) { //$NON-NLS-1$
setErrorMessage(null);
- setMessage(getString(getKey() + "_specifyProjectName"));
+ setMessage(getString(getKey() + "_specifyProjectName")); //$NON-NLS-1$
return false;
}
@@ -247,19 +247,19 @@
}
String projectLocation = getProjectLocation();
- if ("".equals(projectLocation)) {
+ if ("".equals(projectLocation)) { //$NON-NLS-1$
setErrorMessage(null);
- setMessage(getString(getKey() + "_specifyLocation"));
+ setMessage(getString(getKey() + "_specifyLocation")); //$NON-NLS-1$
return false;
}
if (!(new Path(projectLocation)).isAbsolute()) {
- setErrorMessage(getString(getKey() + "_locationError"));
+ setErrorMessage(getString(getKey() + "_locationError")); //$NON-NLS-1$
return false;
}
if (getProjectHandle().exists() || projectExistsIgnoreCase()) {
- setErrorMessage(getString(getKey() + "_projectExistsMessage"));
+ setErrorMessage(getString(getKey() + "_projectExistsMessage")); //$NON-NLS-1$
return false;
}
@@ -269,7 +269,7 @@
return false;
}
- if ("".equals(getStringValue(versionAdapter))) {
+ if ("".equals(getStringValue(versionAdapter))) { //$NON-NLS-1$
setErrorMessage(versionsError);
return false;
}
@@ -303,10 +303,10 @@
}
private IProject overlaps(String projectLocation) {
- projectLocation = projectLocation.replace('\\','/').toLowerCase() + "/";
+ projectLocation = projectLocation.replace('\\','/').toLowerCase() + "/"; //$NON-NLS-1$
IProject[] ps = ModelPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < ps.length; i++) {
- String location = ps[i].getLocation().toString().replace('\\','/').toLowerCase() + "/";
+ String location = ps[i].getLocation().toString().replace('\\','/').toLowerCase() + "/"; //$NON-NLS-1$
if(location.startsWith(projectLocation)) return ps[i];
if(projectLocation.startsWith(location)) return ps[i];
}
@@ -322,7 +322,7 @@
}
class LocalValueProvider implements IValueProvider, IValueChangeListener, IAdaptable {
- protected Object value = "";
+ protected Object value = ""; //$NON-NLS-1$
protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
// listeners
@@ -343,7 +343,7 @@
public String getStringValue(boolean returnNullAsEmptyString) {
Object o = getValue();
- return (o != null) ? o.toString() : (returnNullAsEmptyString) ? "" : null;
+ return (o != null) ? o.toString() : (returnNullAsEmptyString) ? "" : null; //$NON-NLS-1$
}
public void setValue(Object value) {
@@ -365,7 +365,7 @@
if (adapter == IValueChangeListener.class) {
return this;
}
- Assert.isTrue(true, "LocalValueProvider instance itself cannot provide adapter for "+adapter.getName());
+ Assert.isTrue(true, "LocalValueProvider instance itself cannot provide adapter for "+adapter.getName()); //$NON-NLS-1$
return null;
}
}
@@ -373,8 +373,8 @@
class NameAdapter extends LocalValueProvider {
public void setValue(Object value) {
super.setValue(value);
- if ("true".equals("" + useDefaultPathAdapter.getValue())) {
- String name = (value == null) ? "" : value.toString().trim();
+ if ("true".equals("" + useDefaultPathAdapter.getValue())) { //$NON-NLS-1$ //$NON-NLS-2$
+ String name = (value == null) ? "" : value.toString().trim(); //$NON-NLS-1$
locationAdapter.setValue(defaultPath.append(name).toOSString());
}
setPageComplete(validatePage());
@@ -392,9 +392,9 @@
public void setValue(Object value) {
super.setValue(value);
if (getControl()!=null) {
- locationEditor.getFieldEditor(null).setEnabled("false".equals("" + getValue()),(Composite)getControl());
+ locationEditor.getFieldEditor(null).setEnabled("false".equals("" + getValue()),(Composite)getControl()); //$NON-NLS-1$ //$NON-NLS-2$
String name = nameEditor.getValue().toString();
- if(name == null) name = ""; else name = name.trim();
+ if(name == null) name = ""; else name = name.trim(); //$NON-NLS-1$
locationAdapter.setValue(defaultPath.append(name).toOSString());
}
setPageComplete(validatePage());
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -36,12 +36,12 @@
if(type != null) {
String mustImpl = null;
try { mustImpl = checkImplements(object, type); } catch (Exception e) {
- LogHelper.logError("org.jboss.tools.jst.web.verification", e);
+ LogHelper.logError("org.jboss.tools.jst.web.verification", e); //$NON-NLS-1$
}
if(mustImpl != null) return fireImplements(object, attr, attr, value, mustImpl);
String mustExtend = null;
try { mustExtend = checkExtends(object, type); } catch (Exception e) {
- LogHelper.logError("org.jboss.tools.jst.web.verification", e);
+ LogHelper.logError("org.jboss.tools.jst.web.verification", e); //$NON-NLS-1$
}
if(mustExtend != null) return fireExtends(object, attr, attr, value, mustExtend);
return null;
@@ -54,8 +54,8 @@
}
private String checkImplements(VObject object, IType type) throws Exception {
- if("java.lang.Class".equals(type.getFullyQualifiedName())) return null;
- String impl = rule.getProperty("implements");
+ if("java.lang.Class".equals(type.getFullyQualifiedName())) return null; //$NON-NLS-1$
+ String impl = rule.getProperty("implements"); //$NON-NLS-1$
if(impl == null || impl.length() == 0) return null;
String[] is = type.getSuperInterfaceNames();
for (int i = 0; i < is.length; i++) {
@@ -64,9 +64,9 @@
}
if(type.isInterface()) return impl;
String f = type.getSuperclassName();
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl; //$NON-NLS-1$
f = EclipseJavaUtil.resolveType(type, f);
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl; //$NON-NLS-1$
type = object.getModel().getValidType(f);
if(type == null) return impl;
return checkImplements(object, type);
@@ -74,14 +74,14 @@
private String checkExtends(VObject object, IType type) throws Exception {
if(type.isInterface()) return null;
- if("java.lang.Class".equals(type.getFullyQualifiedName())) return null;
- String ext = rule.getProperty("extends");
+ if("java.lang.Class".equals(type.getFullyQualifiedName())) return null; //$NON-NLS-1$
+ String ext = rule.getProperty("extends"); //$NON-NLS-1$
if(ext == null || ext.length() == 0) return null;
String f = type.getSuperclassName();
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext; //$NON-NLS-1$
if(f.equals(ext)) return null;
f = EclipseJavaUtil.resolveType(type, f);
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext; //$NON-NLS-1$
if(f.equals(ext)) return null;
type = object.getModel().getValidType(f);
if(type == null) return ext;
@@ -89,21 +89,21 @@
}
protected String getAttribute() {
- return rule.getProperty("attribute");
+ return rule.getProperty("attribute"); //$NON-NLS-1$
}
private boolean allowsPrimitive() {
- return "true".equals(rule.getProperty("allow-primitive"));
+ return "true".equals(rule.getProperty("allow-primitive")); //$NON-NLS-1$ //$NON-NLS-2$
}
private boolean isPrimitive(String value) {
- return ".int.boolean.char.byte.double.float.long.short.".indexOf("." + value + ".") >= 0;
+ return ".int.boolean.char.byte.double.float.long.short.".indexOf("." + value + ".") >= 0; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
private boolean isJavaLang(String value) {
if(value.indexOf('.') < 0) {
- return ".String.Integer.Boolean.Character.Byte.Double.Float.Long.Short.".indexOf("." + value + ".") >= 0;
- } else if(value.startsWith("java.lang.")) {
+ return ".String.Integer.Boolean.Character.Byte.Double.Float.Long.Short.".indexOf("." + value + ".") >= 0; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else if(value.startsWith("java.lang.")) { //$NON-NLS-1$
return isJavaLang(value.substring(10));
} else {
return false;
@@ -118,18 +118,18 @@
protected VResult[] fireImplements(VObject object, String id, String attr, String value, String interfaceName) {
Object[] os = new Object[] {attr, value, interfaceName};
- VResult result = rule.getResultFactory().getResult(id + ".implements", object, attr, object, attr, os);
+ VResult result = rule.getResultFactory().getResult(id + ".implements", object, attr, object, attr, os); //$NON-NLS-1$
return new VResult[] {result};
}
protected VResult[] fireExtends(VObject object, String id, String attr, String value, String superName) {
Object[] os = new Object[] {attr, value, superName};
- VResult result = rule.getResultFactory().getResult(id + ".extends", object, attr, object, attr, os);
+ VResult result = rule.getResultFactory().getResult(id + ".extends", object, attr, object, attr, os); //$NON-NLS-1$
return new VResult[] {result};
}
protected VResult[] fireInvalid(VObject object, String id, String attr, String value) {
Object[] os = new Object[] {attr, value};
- VResult result = rule.getResultFactory().getResult(id + ".valid", object, attr, object, attr, os);
+ VResult result = rule.getResultFactory().getResult(id + ".valid", object, attr, object, attr, os); //$NON-NLS-1$
return new VResult[] {result};
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -16,15 +16,15 @@
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
public class CheckFilterMappingName extends WebDefaultCheck {
- static String ATTR = "filter-name";
+ static String ATTR = "filter-name"; //$NON-NLS-1$
public VResult[] check(VObject object) {
XModelObject o = ((VObjectImpl)object).getModelObject();
String servletName = o.getAttributeValue(ATTR);
if(servletName == null) return null;
if(servletName.length() == 0) {
- return fire(object, "filter-mapping.empty", ATTR, null);
+ return fire(object, "filter-mapping.empty", ATTR, null); //$NON-NLS-1$
} else if(findFilter(o, servletName) == null) {
- return fire(object, "filter-mapping", ATTR, servletName);
+ return fire(object, "filter-mapping", ATTR, servletName); //$NON-NLS-1$
}
return null;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -29,7 +29,7 @@
String attribute = getAttribute();
String value = (String)object.getAttribute(attribute);
XModel model = getXModel(object);
- XModelObject webRoot = model == null ? null : model.getByPath("FileSystems/WEB-ROOT");
+ XModelObject webRoot = model == null ? null : model.getByPath("FileSystems/WEB-ROOT"); //$NON-NLS-1$
if(webRoot == null) return null;
List list = WebPromptingProvider.getInstance().getList(model, IWebPromptingProvider.JSF_CONVERT_URL_TO_PATH, value, null);
@@ -38,35 +38,35 @@
}
if(value == null || value.trim().length() == 0) {
- if("true".equals(rule.getProperty("acceptEmpty"))) return null;
- return fire(object, attribute + ".empty", attribute, null);
+ if("true".equals(rule.getProperty("acceptEmpty"))) return null; //$NON-NLS-1$ //$NON-NLS-2$
+ return fire(object, attribute + ".empty", attribute, null); //$NON-NLS-1$
}
- String value1 = !value.startsWith("/") ? "/" + value : value;
+ String value1 = !value.startsWith("/") ? "/" + value : value; //$NON-NLS-1$ //$NON-NLS-2$
XModelObject tld = XModelImpl.getByRelativePath(model, value1);
if(tld == null) {
- return fire(object, attribute + ".exists", attribute, value);
+ return fire(object, attribute + ".exists", attribute, value); //$NON-NLS-1$
}
- String value2 = value.startsWith("/") ? value.substring(1) : value;
+ String value2 = value.startsWith("/") ? value.substring(1) : value; //$NON-NLS-1$
XModelObject tld2 = webRoot.getChildByPath(value2);
if(tld2 == null) {
- return fire(object, attribute + ".exists", attribute, value);
+ return fire(object, attribute + ".exists", attribute, value); //$NON-NLS-1$
}
if(!checkExtensions(value)) {
- return fire(object, attribute + ".extension", attribute, value);
+ return fire(object, attribute + ".extension", attribute, value); //$NON-NLS-1$
}
return null;
}
protected String getAttribute() {
- return rule.getProperty("attribute");
+ return rule.getProperty("attribute"); //$NON-NLS-1$
}
boolean checkExtensions(String value) {
value = value.toLowerCase();
- String extensions = rule.getProperty("extensions");
+ String extensions = rule.getProperty("extensions"); //$NON-NLS-1$
if(extensions == null || extensions.trim().length() == 0) return true;
- StringTokenizer st = new StringTokenizer(extensions, " ");
+ StringTokenizer st = new StringTokenizer(extensions, " "); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String ext = st.nextToken();
if(value.endsWith(ext)) return true;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -16,25 +16,25 @@
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
public class CheckRoleReferenceName extends WebDefaultCheck {
- static String ATTR = "role-name";
+ static String ATTR = "role-name"; //$NON-NLS-1$
public VResult[] check(VObject object) {
XModelObject o = ((VObjectImpl)object).getModelObject();
- String attr = rule.getProperty("attribute");
+ String attr = rule.getProperty("attribute"); //$NON-NLS-1$
if(attr == null || attr.length() == 0) attr = ATTR;
String roleName = o.getAttributeValue(attr);
if(roleName == null) return null;
if(roleName.length() == 0) {
- return fire(object, "role.empty", attr, null);
+ return fire(object, "role.empty", attr, null); //$NON-NLS-1$
} else if(!isRoleNameOk(o, roleName)) {
- return fire(object, "role", attr, roleName);
+ return fire(object, "role", attr, roleName); //$NON-NLS-1$
}
return null;
}
boolean isRoleNameOk(XModelObject mapping, String roleName) {
- if(roleName.equalsIgnoreCase("NONE")) return true;
- if("*".equals(roleName)) return true;
+ if(roleName.equalsIgnoreCase("NONE")) return true; //$NON-NLS-1$
+ if("*".equals(roleName)) return true; //$NON-NLS-1$
if(findRole(mapping, roleName) != null) return true;
return false;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java 2009-07-10 07:06:52 UTC (rev 16524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java 2009-07-10 07:56:03 UTC (rev 16525)
@@ -16,16 +16,16 @@
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
public class CheckServletMappingName extends WebDefaultCheck {
- static String ATTR = "servlet-name";
+ static String ATTR = "servlet-name"; //$NON-NLS-1$
public VResult[] check(VObject object) {
XModelObject o = ((VObjectImpl)object).getModelObject();
String servletName = o.getAttributeValue(ATTR);
if(servletName == null) return null;
if(servletName.length() == 0) {
- if("true".equals(rule.getProperty("acceptEmpty"))) return null;
- return fire(object, "servlet-mapping.empty", ATTR, null);
+ if("true".equals(rule.getProperty("acceptEmpty"))) return null; //$NON-NLS-1$ //$NON-NLS-2$
+ return fire(object, "servlet-mapping.empty", ATTR, null); //$NON-NLS-1$
} else if(findServlet(o, servletName) == null) {
- return fire(object, "servlet-mapping", ATTR, servletName);
+ return fire(object, "servlet-mapping", ATTR, servletName); //$NON-NLS-1$
}
return null;
}
16 years, 9 months
JBoss Tools SVN: r16524 - in trunk/vpe/plugins: org.jboss.tools.vpe/.settings and 16 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-07-10 03:06:52 -0400 (Fri, 10 Jul 2009)
New Revision: 16524
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/.settings/
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.vpe.html/.settings/
trunk/vpe/plugins/org.jboss.tools.vpe.html/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/.settings/
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/.settings/
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.vpe/.settings/
trunk/vpe/plugins/org.jboss.tools.vpe/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/.settings/
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.xulrunner/.settings/
trunk/vpe/plugins/org.jboss.tools.xulrunner/.settings/org.eclipse.jdt.core.prefs
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.core.resources.prefs
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilderException.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings (added localized message to checked exception VpeExpressionBuilderException; enabled NLS warnings for vpe module)
Added: trunk/vpe/plugins/org.jboss.tools.vpe/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilder.java 2009-07-10 06:59:49 UTC (rev 16523)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilder.java 2009-07-10 07:06:52 UTC (rev 16524)
@@ -10,16 +10,19 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.template.expression;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
public class VpeExpressionBuilder {
public static final char ATTR_PREFIX = '@';
- public static final String ATTR_PREFIX_S = "" + '@';
- public static final String SIGNATURE_ANY_ATTR = ATTR_PREFIX + "*";
- public static final String SIGNATURE_JSF_VALUE = "jsfvalue()";
+ public static final String ATTR_PREFIX_S = "" + '@'; //$NON-NLS-1$
+ public static final String SIGNATURE_ANY_ATTR = ATTR_PREFIX + "*"; //$NON-NLS-1$
+ public static final String SIGNATURE_JSF_VALUE = "jsfvalue()"; //$NON-NLS-1$
private static final char COMPL_EXPR_LEFT_BRACKET = '{';
private static final char COMPL_EXPR_RIGHT_BRACKET = '}';
@@ -30,7 +33,7 @@
private static final char OPER_EQUAL = '=';
private static final char OPER_PLUS = '+';
private static final char OPER_OR = '|';
- private static final String OPER_AND = "and";
+ private static final String OPER_AND = "and"; //$NON-NLS-1$
private static final char FUNC_BRACKET_LEFT = OPER_BRACKET_LEFT;
private static final char FUNC_BRACKET_RIGHT = OPER_BRACKET_RIGHT;
private static final char PARAM_SEPARATOR = ',';
@@ -167,7 +170,7 @@
text = text.substring(1);
int pos = text.indexOf(OPER_STRING);
if (pos == -1) {
- error("Closing apostrophe is not found", startPos);
+ error("Closing apostrophe is not found", VpeUIMessages.VpeExpressionBuilder_ClosingApostropheNotFound, startPos); //$NON-NLS-1$
}
VpeOperand operand = new VpeStringOperand(getToken(pos));
text = text.substring(1);
@@ -190,7 +193,7 @@
private VpeOperand buildFunction(String name, int namePos) throws VpeExpressionBuilderException {
VpeFunction function = VpeFunctionFactory.getFunction(name);
if (function == null) {
- error("Function \'" + name + "\' is not found", namePos); //$NON-NLS-1$ //$NON-NLS-2$
+ error(MessageFormat.format("Function \''{0}\'' is not found", name), MessageFormat.format(VpeUIMessages.VpeExpressionBuilder_FunctionNotFound, name), namePos); //$NON-NLS-1$
}
int bracketPos = currentPosition();
List<VpeOperand> params = new ArrayList<VpeOperand>();
@@ -311,14 +314,12 @@
return attrSignature(attrName, caseSensitive);
}
- private void error(String message, int pos) throws VpeExpressionBuilderException {
- throw new VpeExpressionBuilderException(originalText, message, pos);
+ private void error(String errorText, String localizedErrorText, int pos) throws VpeExpressionBuilderException {
+ throw new VpeExpressionBuilderException(originalText, errorText, pos, localizedErrorText);
}
-
-
private void undefinedCharacter(int pos) throws VpeExpressionBuilderException {
- error("Undefined character \'" + originalText.charAt(pos) + '\'', pos);
+ error(MessageFormat.format("Undefined character \''{0}\''", originalText.charAt(pos)), MessageFormat.format(VpeUIMessages.VpeExpressionBuilder_UndefinedCharacter, originalText.charAt(pos)), pos); //$NON-NLS-1$
}
private void undefinedCharacter() throws VpeExpressionBuilderException {
@@ -326,11 +327,11 @@
}
private void undefinedName(String name, int pos) throws VpeExpressionBuilderException {
- error("Undefined name \"" + name + '\"', pos);
+ error(MessageFormat.format("Undefined name \"{0}\"", name), MessageFormat.format(VpeUIMessages.VpeExpressionBuilder_UndefinedName, name), pos); //$NON-NLS-1$
}
private void bracketNotFound(int pos) throws VpeExpressionBuilderException {
- error("Closing bracket is not found", pos);
+ error("Closing bracket is not found", VpeUIMessages.VpeExpressionBuilder_ClosingBracketNotFound, pos); //$NON-NLS-1$
}
public static String getOutputAttrName(String value) {
@@ -352,7 +353,7 @@
return null;
}
}
- if (value.startsWith("jsfvalue(")) {
+ if (value.startsWith("jsfvalue(")) { //$NON-NLS-1$
if (value.charAt(value.length() - 1) == OPER_BRACKET_RIGHT) {
value = value.substring(9, value.length() - 1);
if (value.length() <= 1) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilderException.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilderException.java 2009-07-10 06:59:49 UTC (rev 16523)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeExpressionBuilderException.java 2009-07-10 07:06:52 UTC (rev 16524)
@@ -10,9 +10,30 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.template.expression;
+import java.text.MessageFormat;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
public class VpeExpressionBuilderException extends Exception {
+ private final String expression;
+ private final String localizedErrorText;
+ private final int pos;
+
+ public VpeExpressionBuilderException(String expression, String errorText, int pos, String localizedErrorText) {
+ super(MessageFormat.format("Expression: \"{0}\" pos={1} {2}", expression, pos, errorText)); //$NON-NLS-1$
+ this.expression = expression;
+ this.localizedErrorText = localizedErrorText;
+ this.pos = pos;
+ }
+
+ @Deprecated // use constructor which supports localization
public VpeExpressionBuilderException(String expression, String message, int pos) {
- super("Expression: \"" + expression + "\" pos=" + pos + " " + message);
+ this(expression, message, pos, message);
}
+
+ @Override
+ public String getLocalizedMessage() {
+ return MessageFormat.format(VpeUIMessages.VpeExpressionBuilderException_Message, expression,
+ pos, localizedErrorText);
+ }
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.docbook/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.docbook/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.docbook/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added: trunk/vpe/plugins/org.jboss.tools.vpe.html/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added: trunk/vpe/plugins/org.jboss.tools.vpe.jsp/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.jsp/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.jsp/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/.settings/org.eclipse.jdt.core.prefs 2009-07-10 06:59:49 UTC (rev 16523)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -4,4 +4,5 @@
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.source=1.5
Copied: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings (from rev 16387, trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings)
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.core.resources.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.core.resources.prefs 2009-07-05 16:37:44 UTC (rev 16387)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.core.resources.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -1,3 +0,0 @@
-#Tue Mar 07 15:03:35 MSK 2006
-eclipse.preferences.version=1
-encoding//src/org/jboss/tools/palette/messages.properties=8859_1
Added: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added: trunk/vpe/plugins/org.jboss.tools.xulrunner/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.xulrunner/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.xulrunner/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added: trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/.settings/org.eclipse.jdt.core.prefs 2009-07-10 07:06:52 UTC (rev 16524)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
16 years, 9 months
JBoss Tools SVN: r16523 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-07-10 02:59:49 -0400 (Fri, 10 Jul 2009)
New Revision: 16523
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings (passing Throwable's localized message to Status/IStatus)
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java 2009-07-10 06:52:36 UTC (rev 16522)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java 2009-07-10 06:59:49 UTC (rev 16523)
@@ -24,14 +24,14 @@
* @param throwable
*/
public static void reportProblem(String plugin, Throwable throwable) {
- String message = (throwable == null) ? null : throwable.getMessage();
+ String message = (throwable == null) ? null : throwable.getLocalizedMessage();
reportProblem(plugin, message, throwable);
}
/**
* Method for processing a throwable caught in Red Hat code.
* @param plugin
- * @param message
+ * @param message (translatable)
* @param throwable
*/
public static void reportProblem(String plugin, String message, Throwable throwable) {
16 years, 9 months
JBoss Tools SVN: r16522 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor/bundle and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-07-10 02:52:36 -0400 (Fri, 10 Jul 2009)
New Revision: 16522
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
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/context/VpePageContext.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/AbstractActionManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/BaseActionManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/xpl/ActionHelper.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/InvisibleTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCommentCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeGridCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePseudoContentCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateData.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateFileList.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTextPseudoContentCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/dnd/VpeDnd.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionParentName.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagString.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagText.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeTextExpression.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/TemplateResizeData.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BlockFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BoldFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BulletsFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/CenterFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ColorFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ItalicFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/JustifyFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/NumberingFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/UnderlineFormatController.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/jira/browse/JBIDE-3557 Externalize English strings
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -113,11 +113,11 @@
private int visualMode = 0;
private EditorPart multiPageEditor;
private static final QualifiedName SPLITTER_POSITION_KEY1 = new QualifiedName(
- "", "splitter_position1");
+ "", "splitter_position1"); //$NON-NLS-1$ //$NON-NLS-2$
private static final QualifiedName SPLITTER_POSITION_KEY2 = new QualifiedName(
- "", "splitter_position2");
+ "", "splitter_position2"); //$NON-NLS-1$ //$NON-NLS-2$
private static final QualifiedName SPLITTER_POSITION_KEY3 = new QualifiedName(
- "", "splitter_position3");
+ "", "splitter_position3"); //$NON-NLS-1$ //$NON-NLS-2$
private int controlCount = 0;
@@ -1043,10 +1043,10 @@
private class ActivationListener extends ShellAdapter implements
IPartListener {
- private static final String VPE_EDITOR_CONTEXT = "org.jboss.tools.vpe.editorContext";
- private static final String VPE_VISUAL_MAXMIN = "org.jboss.tools.vpe.visual.maxmin";
- private static final String VPE_SOURCE_MAXMIN = "org.jboss.tools.vpe.source.maxmin";
- private static final String VPE_JUMPING = "org.jboss.tools.vpe.jumping";
+ private static final String VPE_EDITOR_CONTEXT = "org.jboss.tools.vpe.editorContext"; //$NON-NLS-1$
+ private static final String VPE_VISUAL_MAXMIN = "org.jboss.tools.vpe.visual.maxmin"; //$NON-NLS-1$
+ private static final String VPE_SOURCE_MAXMIN = "org.jboss.tools.vpe.source.maxmin"; //$NON-NLS-1$
+ private static final String VPE_JUMPING = "org.jboss.tools.vpe.jumping"; //$NON-NLS-1$
private IWorkbenchPart fActivePart;
private boolean fIsHandlingActivation = false;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -103,7 +103,7 @@
visualSelectedNode = visualNode;
}
if (VpeDebug.PRINT_VISUAL_SELECTION_EVENT) {
- System.out.println(" visualNode: " + visualSelectedNode.getNodeName() + "(" + visualSelectedNode + ") sourceNode: " + (sourceNode == null ? null : sourceNode.getNodeName()) + " node: " + node);
+ System.out.println(" visualNode: " + visualSelectedNode.getNodeName() + "(" + visualSelectedNode + ") sourceNode: " + (sourceNode == null ? null : sourceNode.getNodeName()) + " node: " + node); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
if (sourceNode != null) {
switch (visualSelectedNode.getNodeType()) {
@@ -664,7 +664,7 @@
}
if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println("setVisualSelection"); //$NON-NLS-1$
- System.out.println(" visualAnchorNode: " + visualAnchorNode.getNodeName() + "(" + visualAnchorNode + ") visualAnchorContainer: " + visualAnchorContainer.getNodeName() + "(" + visualAnchorContainer + ") visualAnchorOffset: " + visualAnchorOffset + " anchorStartFlag: " + anchorStartFlag); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ System.out.println(" visualAnchorNode: " + visualAnchorNode.getNodeName() + "(" + visualAnchorNode + ") visualAnchorContainer: " + visualAnchorContainer.getNodeName() + "(" + visualAnchorContainer + ") visualAnchorOffset: " + visualAnchorOffset + " anchorStartFlag: " + anchorStartFlag); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
}
nsIDOMNode visualFocusContainer = null;
@@ -705,12 +705,12 @@
if (!focusStartFlag) visualFocusOffset++;
}
if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
- System.out.println(" visualFocusNode: " +
+ System.out.println(" visualFocusNode: " + //$NON-NLS-1$
(visualFocusNode != null ?
- visualFocusNode.getNodeName() + "(" + visualFocusNode + ")" : null) +
- " visualFocusContainer: " +
+ visualFocusNode.getNodeName() + "(" + visualFocusNode + ")" : null) + //$NON-NLS-1$ //$NON-NLS-2$
+ " visualFocusContainer: " + //$NON-NLS-1$
(visualFocusContainer != null ?
- visualFocusContainer.getNodeName() + "(" + visualFocusContainer + ") visualFocusOffset: " + visualFocusOffset + " focusStartFlag: " + focusStartFlag : null));
+ visualFocusContainer.getNodeName() + "(" + visualFocusContainer + ") visualFocusOffset: " + visualFocusOffset + " focusStartFlag: " + focusStartFlag : null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Ed tmp
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -99,7 +99,7 @@
sourceNode = domMapping.getNearSourceNode(visualNode);
if (sourceNode != null) {
if (sourceNode.getNodeType() == Node.COMMENT_NODE) {
- sourceNode.setNodeValue("");
+ sourceNode.setNodeValue(""); //$NON-NLS-1$
}
}
}
@@ -391,7 +391,7 @@
IDOMAttr xmlAttr = (IDOMAttr)sourceAttr;
int start = xmlAttr.getValueRegionStartOffset() + offset;
String value = xmlAttr.getValueRegionText();
- if (value.startsWith("\"") || value.startsWith("\'")) {
+ if (value.startsWith("\"") || value.startsWith("\'")) { //$NON-NLS-1$ //$NON-NLS-2$
start++;
}
int end = xmlAttr.getEndOffset();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -1179,7 +1179,7 @@
nsIDOMAttr toggleLookupAttr = visualElement
.getAttributeNode(VPE_USER_TOGGLE_LOOKUP_PARENT);
if (toggleLookupAttr != null) {
- toggleLookup = "true".equals(toggleLookupAttr.getNodeValue());
+ toggleLookup = "true".equals(toggleLookupAttr.getNodeValue()); //$NON-NLS-1$
}
nsIDOMElement selectedElem = getLastSelectedElement();
@@ -1221,7 +1221,7 @@
toggleLookupAttr = selectedElem
.getAttributeNode(VPE_USER_TOGGLE_LOOKUP_PARENT);
if (toggleLookupAttr != null) {
- toggleLookup = "true".equals(toggleLookupAttr.getNodeValue());
+ toggleLookup = "true".equals(toggleLookupAttr.getNodeValue()); //$NON-NLS-1$
}
// end of fix
@@ -1346,7 +1346,7 @@
String ext_val) {
nsIDOMElement linkNode = null;
if ((ATTR_REL_STYLESHEET_VALUE.equalsIgnoreCase(rel_val))
- && href_val.startsWith("file:")) {
+ && href_val.startsWith("file:")) { //$NON-NLS-1$
/*
* Because of the Mozilla caches the linked css files we replace tag
* <link rel="styleseet" href="file://..."> with tag <style
@@ -1757,22 +1757,22 @@
&& parent.getNodeType() == nsIDOMNode.ELEMENT_NODE) {
nsIDOMElement element = (nsIDOMElement) parent
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMAttr style = element.getAttributeNode("style");
+ nsIDOMAttr style = element.getAttributeNode("style"); //$NON-NLS-1$
if (style != null) {
String styleValue = style.getNodeValue();
- String[] items = styleValue.split(";");
+ String[] items = styleValue.split(";"); //$NON-NLS-1$
for (int i = 0; i < items.length; i++) {
- String[] item = items[i].split(":");
- if ("-moz-user-modify".equals(item[0].trim())
- && "read-only".equals(item[1].trim())) {
+ String[] item = items[i].split(":"); //$NON-NLS-1$
+ if ("-moz-user-modify".equals(item[0].trim()) //$NON-NLS-1$
+ && "read-only".equals(item[1].trim())) { //$NON-NLS-1$
return false;
}
}
}
- nsIDOMAttr classAttr = element.getAttributeNode("class");
+ nsIDOMAttr classAttr = element.getAttributeNode("class"); //$NON-NLS-1$
if (classAttr != null) {
String classValue = classAttr.getNodeValue().trim();
- if ("__any__tag__caption".equals(classValue)) {
+ if ("__any__tag__caption".equals(classValue)) { //$NON-NLS-1$
return false;
}
}
@@ -1845,9 +1845,9 @@
String titleValue = getTooltip(sourceElement);
if (titleValue != null) {
- titleValue = titleValue.replaceAll("&", "&");
- titleValue = titleValue.replaceAll("<", "<");
- titleValue = titleValue.replaceAll(">", ">");
+ titleValue = titleValue.replaceAll("&", "&"); //$NON-NLS-1$ //$NON-NLS-2$
+ titleValue = titleValue.replaceAll("<", "<"); //$NON-NLS-1$ //$NON-NLS-2$
+ titleValue = titleValue.replaceAll(">", ">"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (titleValue != null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -97,7 +97,7 @@
handled = nonctrlKeyPressHandler(keyEvent);
}
if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
- System.out.println(" handled: " + handled);
+ System.out.println(" handled: " + handled); //$NON-NLS-1$
}
if (handled) {
keyEvent.stopPropagation();
@@ -263,7 +263,7 @@
Node focusNode = selection.getFocusNode();
if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
- System.out.println(">>> 1. VpeVisualKeyHandler.deleteRight(): focusNode = " + focusNode + " | focusOffset = " + selection.getFocusOffset());
+ System.out.println(">>> 1. VpeVisualKeyHandler.deleteRight(): focusNode = " + focusNode + " | focusOffset = " + selection.getFocusOffset()); //$NON-NLS-1$ //$NON-NLS-2$
}
if (focusNode != null) {
if (focusNode.getNodeType() == Node.TEXT_NODE &&
@@ -390,7 +390,7 @@
String escString = TextUtil.isEcsToRight(sourceText, offset);
if(escString != null){
Point range = sourceEditor.getTextViewer().getSelectedRange();
- sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x, escString.length(), "");
+ sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x, escString.length(), ""); //$NON-NLS-1$
atLeastOneCharIsDeleted = true;
continue;
}
@@ -418,7 +418,7 @@
endPos++;
}
Point range = sourceEditor.getTextViewer().getSelectedRange();
- sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x, endPos, "");
+ sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x, endPos, ""); //$NON-NLS-1$
selection = sourceSelectionBuilder.getSelection();
atLeastOneCharIsDeleted = true;
break;
@@ -532,7 +532,7 @@
Node focusNode = selection.getFocusNode();
if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
- System.out.println(">>> 1. VpeVisualKeyHandler.deleteLeft(): focusNode = " + focusNode + " | focusOffset = " + selection.getFocusOffset());
+ System.out.println(">>> 1. VpeVisualKeyHandler.deleteLeft(): focusNode = " + focusNode + " | focusOffset = " + selection.getFocusOffset()); //$NON-NLS-1$ //$NON-NLS-2$
}
if (focusNode != null) {
if (focusNode.getNodeType() == Node.TEXT_NODE && selection.getFocusOffset() >= 0) {
@@ -720,7 +720,7 @@
if(escString != null){
Point range = sourceEditor.getTextViewer().getSelectedRange();
- sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x-escString.length(), escString.length(), "");
+ sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x-escString.length(), escString.length(), ""); //$NON-NLS-1$
atLeastOneCharIsDeleted = true;
return selection;
@@ -739,7 +739,7 @@
endPos--;
if(endPos!=0){
Point range = sourceEditor.getTextViewer().getSelectedRange();
- sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x-endPos, endPos, "");
+ sourceEditor.getTextViewer().getTextWidget().replaceTextRange(range.x-endPos, endPos, ""); //$NON-NLS-1$
selection = sourceSelectionBuilder.getSelection();
atLeastOneCharIsDeleted = true;
}
@@ -880,7 +880,7 @@
nsIDOMNode visualNode = domMapping.getVisualNode(node);
if (visualNode.getNodeType() == Node.ELEMENT_NODE) {
- nsIDOMNode styleAttr = visualNode.getAttributes().getNamedItem("style");
+ nsIDOMNode styleAttr = visualNode.getAttributes().getNamedItem("style"); //$NON-NLS-1$
if (styleAttr != null) {
String style = styleAttr.getNodeValue();
if (style != null) {
@@ -999,7 +999,7 @@
nsIDOMNode visualNode = mapping.getVisualNode(sourceNode);
if (visualNode != null) {
if (visualNode.getNodeType() == Node.ELEMENT_NODE) {
- nsIDOMNode styleAttr = visualNode.getAttributes().getNamedItem("style");
+ nsIDOMNode styleAttr = visualNode.getAttributes().getNamedItem("style"); //$NON-NLS-1$
if (styleAttr != null) {
String style = styleAttr.getNodeValue();
if (style != null) {
@@ -1164,8 +1164,8 @@
}
}
Text newNode = ((Text)focusNode).splitText(focusOffset);
- Node br = focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createElement("br"), newNode);
- Text newNode1 = (Text)focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createTextNode("\r\n" + getLinePrefix(n1Start + focusOffset) + newNode.getData()), newNode);
+ Node br = focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createElement("br"), newNode); //$NON-NLS-1$
+ Text newNode1 = (Text)focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createTextNode("\r\n" + getLinePrefix(n1Start + focusOffset) + newNode.getData()), newNode); //$NON-NLS-1$
focusNode.getParentNode().removeChild(newNode);
newNode = newNode1;
setCursor(pageContext, newNode);
@@ -1209,7 +1209,7 @@
return linePrefix.substring(0, linePrefixLength);
} catch (BadLocationException e) {
VpePlugin.getPluginLog().logError(e);
- return "";
+ return ""; //$NON-NLS-1$
}
}
@@ -1566,7 +1566,7 @@
private boolean moveEnd(boolean extend) {
- VpePlugin.getDefault().logInfo("MoveEnd");
+ VpePlugin.getDefault().logInfo("MoveEnd"); //$NON-NLS-1$
// TODO Max Areshkau figure out
// frameSelection.intraLineMove(true, extend);
return true;
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 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -64,7 +64,7 @@
private BundleEntry[] bundles = new BundleEntry[0];
private Map<String,UsedKey> usedKeys = new HashMap<String,UsedKey>();
- boolean isShowBundleUsageAsEL = "yes".equals(VpePreference.SHOW_RESOURCE_BUNDLES.getValue());
+ boolean isShowBundleUsageAsEL = "yes".equals(VpePreference.SHOW_RESOURCE_BUNDLES.getValue()); //$NON-NLS-1$
XModelTreeListener modelListener = new ML();
public void init(StructuredTextEditor editor){
@@ -89,7 +89,7 @@
while(it.hasNext()) {
String uri = it.next().toString();
String prefix = map.get(uri).toString();
- int hash = (prefix + ":" + uri).hashCode();
+ int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
removeBundle(hash);
addBundle(hash, prefix, uri, true);
}
@@ -153,7 +153,7 @@
XModel model = EclipseResourceUtil.getModelNature(project).getModel();
String prefix2 = prefix;
if(propertyName != null && prefix != null) {
- prefix2 = prefix + "." + propertyName;
+ prefix2 = prefix + "." + propertyName; //$NON-NLS-1$
}
WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_BEAN_OPEN, prefix2, null);
}
@@ -180,7 +180,7 @@
public IFile getBundleFile(String uri){
IEditorInput input = editor.getEditorInput();
IProject project = ((FileEditorInput)input).getFile().getProject();
- String name = uri.replace('.','/')+".properties";
+ String name = uri.replace('.','/')+".properties"; //$NON-NLS-1$
if(project == null || !project.isOpen()) return null;
try {
@@ -189,7 +189,7 @@
IClasspathEntry[] es = javaProject.getResolvedClasspath(true);
for (int i = 0; i < es.length; i++) {
if(es[i].getEntryKind() != IClasspathEntry.CPE_SOURCE) continue;
- IFile file = (IFile)project.getWorkspace().getRoot().getFolder(es[i].getPath()).findMember("/"+name);
+ IFile file = (IFile)project.getWorkspace().getRoot().getFolder(es[i].getPath()).findMember("/"+name); //$NON-NLS-1$
if(file != null && file.exists()) return file;
}
} catch (CoreException e) {
@@ -395,10 +395,10 @@
if(expr instanceof ELPropertyInvocation) {
return new String[]{left.getText(), name};
} else if(expr instanceof ELArgumentInvocation) {
- if(name.startsWith("\"") || name.startsWith("'")) {
+ if(name.startsWith("\"") || name.startsWith("'")) { //$NON-NLS-1$ //$NON-NLS-2$
name = name.substring(1);
}
- if(name.endsWith("\"") || name.endsWith("'")) {
+ if(name.endsWith("\"") || name.endsWith("'")) { //$NON-NLS-1$ //$NON-NLS-2$
name = name.substring(0, name.length() - 1);
}
if(name.length() == 0) return null;
@@ -411,7 +411,7 @@
String bundleValue = null;
BundleEntry entry = getBundle(prefix);
if (entry != null) {
- String name = prefix + "." + propertyName;
+ String name = prefix + "." + propertyName; //$NON-NLS-1$
try {
bundleValue = (String) entry.bundle.getObject(propertyName);
if (!usedKeys.containsKey(name))
@@ -503,7 +503,7 @@
class ML implements XModelTreeListener {
public void nodeChanged(XModelTreeEvent event) {
- boolean b = "yes".equals(VpePreference.SHOW_RESOURCE_BUNDLES.getValue());
+ boolean b = "yes".equals(VpePreference.SHOW_RESOURCE_BUNDLES.getValue()); //$NON-NLS-1$
if(isShowBundleUsageAsEL != b) {
isShowBundleUsageAsEL = b;
refresh();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -75,7 +75,7 @@
}
public boolean isAbsolutePosition(){
- if("yes".equals(VpePreference.USE_ABSOLUTE_POSITION.getValue()))return true;
+ if("yes".equals(VpePreference.USE_ABSOLUTE_POSITION.getValue()))return true; //$NON-NLS-1$
else return false;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -311,7 +311,7 @@
//for debug
public void printMapping() {
- System.out.println("Source DOM Mapping ------------------------------------");
+ System.out.println("Source DOM Mapping ------------------------------------"); //$NON-NLS-1$
Set entrySet = sourceMap.entrySet();
Iterator iter = entrySet.iterator();
while (iter.hasNext()) {
@@ -319,9 +319,9 @@
VpeNodeMapping nodeMapping = (VpeNodeMapping)entry.getValue();
Node sourceNode = nodeMapping.getSourceNode();
nsIDOMNode visualNode = nodeMapping.getVisualNode();
- System.out.println("sourceNode: " + sourceNode.getNodeName() + " (" + sourceNode.hashCode() + ") visualNode: " + (visualNode != null ? visualNode.getNodeName() + " (" + visualNode.hashCode() + ")" : null));
+ System.out.println("sourceNode: " + sourceNode.getNodeName() + " (" + sourceNode.hashCode() + ") visualNode: " + (visualNode != null ? visualNode.getNodeName() + " (" + visualNode.hashCode() + ")" : null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
- System.out.println("Visual DOM Mapping ------------------------------------");
+ System.out.println("Visual DOM Mapping ------------------------------------"); //$NON-NLS-1$
entrySet = visualMap.entrySet();
iter = entrySet.iterator();
while (iter.hasNext()) {
@@ -329,7 +329,7 @@
VpeNodeMapping nodeMapping = (VpeNodeMapping)entry.getValue();
Node sourceNode = nodeMapping.getSourceNode();
nsIDOMNode visualNode = nodeMapping.getVisualNode();
- System.out.println("sourceNode: " + (sourceNode != null ? sourceNode.getNodeName() + " (" + sourceNode.hashCode() + ")" : null) + " visualNode: " + visualNode.getNodeName() + " (" + visualNode.hashCode() + ")");
+ System.out.println("sourceNode: " + (sourceNode != null ? sourceNode.getNodeName() + " (" + sourceNode.hashCode() + ")" : null) + " visualNode: " + visualNode.getNodeName() + " (" + visualNode.hashCode() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/AbstractActionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/AbstractActionManager.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/AbstractActionManager.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -458,7 +458,7 @@
List list = builder.getResult();
if (list.size() > 0
- && ((Node) list.get(0)).getNodeName().equals("HTML")) {
+ && ((Node) list.get(0)).getNodeName().equals("HTML")) { //$NON-NLS-1$
Node node = (Node) list.get(0);
Node child = node.getFirstChild();
while (child != null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/BaseActionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/BaseActionManager.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/BaseActionManager.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -32,6 +32,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.ModelQueryImpl;
import org.eclipse.wst.xml.ui.internal.actions.MenuBuilder;
import org.eclipse.wst.xml.ui.internal.util.XMLCommonResources;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
@@ -49,14 +50,12 @@
protected static ITextNodeSplitter textNodeSplitter;
- public static final String INSERT_AROUND_MENU = "Insert Around";
- public static final String INSERT_BEFORE_MENU = "Insert Before";
- public static final String INSERT_AFTER_MENU = "Insert After";
- public static final String REPLACE_TAG_MENU = "Replace With";
- public static final String INSERT_TAG_MENU = "Insert Tag";
-
+ public static final String INSERT_AROUND_MENU = VpeUIMessages.BaseActionManager_InsertAround;
+ public static final String INSERT_BEFORE_MENU = VpeUIMessages.BaseActionManager_InsertBefore;
+ public static final String INSERT_AFTER_MENU = VpeUIMessages.BaseActionManager_InsertAfter;
+ public static final String REPLACE_TAG_MENU = VpeUIMessages.BaseActionManager_ReplaceWith;
+ public static final String INSERT_TAG_MENU = VpeUIMessages.BaseActionManager_InsertTag;
-
static public void setTextNodeSplitter(ITextNodeSplitter splitter) {
textNodeSplitter = splitter;
}
@@ -336,9 +335,9 @@
Element parentElement, CMElementDeclaration parentEd, int index) {
if (isUnconstrainedActionAllowed()) {
if (parentEd == null
- || parentEd.getProperty("isInferred") == Boolean.TRUE
+ || parentEd.getProperty("isInferred") == Boolean.TRUE //$NON-NLS-1$
|| ( modelQuery.getEditMode() != ModelQuery.EDIT_MODE_CONSTRAINED_STRICT
- && isElementAllowed(parentEd) )) { //$NON-NLS-1$
+ && isElementAllowed(parentEd) )) {
contributeAction(menu, createAddElementAction(parentElement,
null, index, 2));
}
@@ -380,8 +379,8 @@
Element parentElement, CMElementDeclaration parentEd) {
if (isUnconstrainedActionAllowed()) {
if (parentEd == null
- || parentEd.getProperty("isInferred") == Boolean.TRUE
- || modelQuery.getEditMode() != ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) { //$NON-NLS-1$
+ || parentEd.getProperty("isInferred") == Boolean.TRUE //$NON-NLS-1$
+ || modelQuery.getEditMode() != ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) {
contributeAction(menu, createAddAttributeAction(parentElement,
null));
}
@@ -542,14 +541,14 @@
static HashSet noContainerTags = new HashSet();
static {
- noContainerTags.add("basefont");
- noContainerTags.add("bgsound");
- noContainerTags.add("br");
- noContainerTags.add("img");
- noContainerTags.add("input");
- noContainerTags.add("isindex");
- noContainerTags.add("script");
- noContainerTags.add("wbr");
+ noContainerTags.add("basefont"); //$NON-NLS-1$
+ noContainerTags.add("bgsound"); //$NON-NLS-1$
+ noContainerTags.add("br"); //$NON-NLS-1$
+ noContainerTags.add("img"); //$NON-NLS-1$
+ noContainerTags.add("input"); //$NON-NLS-1$
+ noContainerTags.add("isindex"); //$NON-NLS-1$
+ noContainerTags.add("script"); //$NON-NLS-1$
+ noContainerTags.add("wbr"); //$NON-NLS-1$
}
public static class ActionHelper extends ModelQueryActionHelper {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -69,11 +69,11 @@
*/
public class MenuCreationHelper {
- public static final String CUT_ACTION = "Cut";
+ public static final String CUT_ACTION = VpeUIMessages.MenuCreationHelper_Cut;
public static final String COPY_ACTION = JFaceResources.getString("copy"); //$NON-NLS-1$
- public static final String PASTE_ACTION = "Paste";
+ public static final String PASTE_ACTION = VpeUIMessages.MenuCreationHelper_Paste;
public static final String DELETE_ACTION = JFaceResources.getString("Delete"); //$NON-NLS-1$
- public static final String TEST_ACTION = "Test";
+ public static final String TEST_ACTION = VpeUIMessages.MenuCreationHelper_Test;
private VpeDomMapping domMapping = null;
private VpePageContext pageContext = null;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/EditAttributesAction.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -48,7 +48,7 @@
private void init() {
final String name = MessageFormat.format(
VpeUIMessages.ATTRIBUTES_MENU_ITEM,
- node != null ? node.getNodeName() : "");
+ node != null ? node.getNodeName() : ""); //$NON-NLS-1$
setText(name);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/xpl/ActionHelper.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/xpl/ActionHelper.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/xpl/ActionHelper.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -36,7 +36,7 @@
import org.w3c.dom.NodeList;
public class ActionHelper {
- public static final String copyright = "(c) Copyright IBM Corporation 2002.";
+ public static final String copyright = "(c) Copyright IBM Corporation 2002."; //$NON-NLS-1$
protected ModelQueryImpl modelQuery;
protected static class Action implements ModelQueryAction {
@@ -283,9 +283,9 @@
.getOrigin(childElement);
CMNodeList cmNodeList = childOrigin != null ? (CMNodeList) childOrigin
- .getProperty("SubstitutionGroup")
+ .getProperty("SubstitutionGroup") //$NON-NLS-1$
: (CMNodeList) childEd
- .getProperty("SubstitutionGroup");
+ .getProperty("SubstitutionGroup"); //$NON-NLS-1$
if (cmNodeList != null && cmNodeList.getLength() > 1) {
int replaceIndex = getIndex(parent, childElement);
@@ -294,7 +294,7 @@
CMNode substitution = cmNodeList.item(i);
if (!substitution.getNodeName().equals(childEdName)
&& !Boolean.TRUE.equals(substitution
- .getProperty("Abstract"))) {
+ .getProperty("Abstract"))) { //$NON-NLS-1$
Action action = new Action(Action.REPLACE,
parent, cmNodeList.item(i),
replaceIndex, replaceIndex);
@@ -429,7 +429,7 @@
String cmNodeName = matchModelNode.cmNode != null ? matchModelNode.cmNode
.getNodeName()
- : "null";
+ : "null"; //$NON-NLS-1$
indent += 2;
for (Iterator iterator = matchModelNode.children.iterator(); iterator
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomBuilder.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomBuilder.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -40,7 +40,7 @@
int len = nodes.getLength();
for (int i = 0; i < len; i++) {
Node node = nodes.item(i);
- if (node.getNodeType() == Node.ELEMENT_NODE && "BODY".equalsIgnoreCase(node.getNodeName())) {
+ if (node.getNodeType() == Node.ELEMENT_NODE && "BODY".equalsIgnoreCase(node.getNodeName())) { //$NON-NLS-1$
return (Element)node;
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -33,7 +33,7 @@
*/
public class ELVariablesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- public static final String ID = "org.jboss.tools.common.xstudio.elvariables";
+ public static final String ID = "org.jboss.tools.common.xstudio.elvariables"; //$NON-NLS-1$
/** The el. */
private GlobalElVariablesComposite el = new GlobalElVariablesComposite();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -25,7 +25,7 @@
public class VpeEditorPreferencesPage extends TabbedPreferencesPage implements IWorkbenchPreferencePage {
- public static final String ID = "org.jboss.tools.vpe.editor";
+ public static final String ID = "org.jboss.tools.vpe.editor"; //$NON-NLS-1$
public VpeEditorPreferencesPage() {
addPreferencePage(new GeneralPage());
addPreferencePage(new TemplatesPreferencePage());
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/InvisibleTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/InvisibleTemplate.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/InvisibleTemplate.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -38,7 +38,7 @@
nsIDOMElement div = visualDocument.createElement(HTML.TAG_SPAN);
div.setAttribute(HTML.TAG_STYLE,
- "border: solid 1px #0037FF;color:#0037FF;font-size:12px;");
+ "border: solid 1px #0037FF;color:#0037FF;font-size:12px;"); //$NON-NLS-1$
nsIDOMText text = visualDocument.createTextNode(sourceNode
.getNodeName());
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -229,16 +229,16 @@
*/
public void init(Element templateElement, boolean caseSensitive) {
this.caseSensitive = caseSensitive;
- children = Constants.YES_STRING.equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_CHILDREN)); //$NON-NLS-1$
- modify = Constants.YES_STRING.equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_MODIFY)); //$NON-NLS-1$
- invisible = Constants.YES_STRING.equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_INVISIBLE)); //$NON-NLS-1$
+ children = Constants.YES_STRING.equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_CHILDREN));
+ modify = Constants.YES_STRING.equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_MODIFY));
+ invisible = Constants.YES_STRING.equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_INVISIBLE));
String strHasImaginaryBorder = templateElement
.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_HAS_IMAGINARY_BORDER);
if (strHasImaginaryBorder != null
&& strHasImaginaryBorder.length() != 0) {
- hasImaginaryBorder = Constants.YES_STRING.equalsIgnoreCase(strHasImaginaryBorder); //$NON-NLS-1$
+ hasImaginaryBorder = Constants.YES_STRING.equalsIgnoreCase(strHasImaginaryBorder);
} else {
hasImaginaryBorder = false;
}
@@ -721,16 +721,16 @@
Node p1 = null, p2 = null;
Node parentParent = parent.getParentNode();
if (parentParent != null) {
- if (!parentParent.getNodeName().equalsIgnoreCase("p")) {
+ if (!parentParent.getNodeName().equalsIgnoreCase("p")) { //$NON-NLS-1$
if (parentParent.getNodeType() != Node.DOCUMENT_NODE) {
p1 = parentParent.getOwnerDocument()
- .createElement("p");
+ .createElement("p"); //$NON-NLS-1$
parentParent.insertBefore(p1, parent);
parent = parentParent.removeChild(parent);
p1.appendChild(parent);
} else {
p1 = ((Document) parentParent)
- .createElement("p");
+ .createElement("p"); //$NON-NLS-1$
parentParent.insertBefore(p1, parent);
parent = parentParent.removeChild(parent);
p1.appendChild(parent);
@@ -1260,7 +1260,7 @@
}
} catch (VpeExpressionException ex) {
- VpeExpressionException exception = new VpeExpressionException(sourceContainer+" ",ex);
+ VpeExpressionException exception = new VpeExpressionException(sourceContainer+" ",ex); //$NON-NLS-1$
VpePlugin.reportProblem(exception);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -149,10 +149,10 @@
}
}
}
- Attr attr = element.getAttributeNode("title");
+ Attr attr = element.getAttributeNode("title"); //$NON-NLS-1$
if (attr == null) {
if (propertyCreators == null) propertyCreators = new ArrayList();
- propertyCreators.add(new VpeAttributeCreator("title", "{tagstring()}", dependencyMap, true));
+ propertyCreators.add(new VpeAttributeCreator("title", "{tagstring()}", dependencyMap, true)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@Override
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCommentCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCommentCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCommentCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -25,21 +25,21 @@
import org.w3c.dom.Node;
public class VpeCommentCreator extends VpeAbstractCreator implements VpeOutputComment {
- public static final String SIGNATURE_VPE_COMMENT = ":vpe:comment";
- private static final String COMMENT_STYLE = "font-style:italic; color:green";
- private static final String COMMENT_PREFIX = "";
- private static final String COMMENT_SUFFIX = "";
+ public static final String SIGNATURE_VPE_COMMENT = ":vpe:comment"; //$NON-NLS-1$
+ private static final String COMMENT_STYLE = "font-style:italic; color:green"; //$NON-NLS-1$
+ private static final String COMMENT_PREFIX = ""; //$NON-NLS-1$
+ private static final String COMMENT_SUFFIX = ""; //$NON-NLS-1$
VpeCommentCreator(Element element, VpeDependencyMap dependencyMap, boolean caseSensitive) {
dependencyMap.setCreator(this, SIGNATURE_VPE_COMMENT);
}
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
- if(!"yes".equals(VpePreference.SHOW_COMMENTS.getValue())) {
+ if(!"yes".equals(VpePreference.SHOW_COMMENTS.getValue())) { //$NON-NLS-1$
return null;
}
nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- div.setAttribute("style", COMMENT_STYLE);
+ div.setAttribute("style", COMMENT_STYLE); //$NON-NLS-1$
String value = COMMENT_PREFIX + sourceNode.getNodeValue() + COMMENT_SUFFIX;
nsIDOMText text = visualDocument.createTextNode(value);
div.appendChild(text);
@@ -48,7 +48,7 @@
}
public void setOutputCommentValue(VpePageContext pageContext, Comment sourceComment, Map visualNodeMap) {
- String commentValue = "";
+ String commentValue = ""; //$NON-NLS-1$
nsIDOMElement div = (nsIDOMElement)visualNodeMap.get(this);
if (div != null) {
nsIDOMNodeList children = div.getChildNodes();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -30,7 +30,7 @@
public class VpeCopyCreator extends VpeAbstractCreator {
- private static String STYLE_ATTR_NAME = "style";
+ private static String STYLE_ATTR_NAME = "style"; //$NON-NLS-1$
private boolean caseSensitive;
private HashSet attrSet;
@@ -49,7 +49,7 @@
if (attrsAttr != null) {
attrSet = new HashSet();
String attrsValue = attrsAttr.getValue();
- String[] attrsArr = attrsValue.split(",");
+ String[] attrsArr = attrsValue.split(","); //$NON-NLS-1$
for (int i = 0; i < attrsArr.length; i++) {
String attr = attrsArr[i].trim();
if (attr.length() > 0) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCreatorUtil.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -37,14 +37,14 @@
public static boolean isFacet(Node node) {
if (node != null && node.getNodeType() == Node.ELEMENT_NODE) {
- return "facet".equals(node.getLocalName());
+ return "facet".equals(node.getLocalName()); //$NON-NLS-1$
}
return false;
}
public static String getFacetName(Node node) {
if (node != null && node.getNodeType() == Node.ELEMENT_NODE) {
- return ((Element)node).getAttribute("name");
+ return ((Element)node).getAttribute("name"); //$NON-NLS-1$
}
return null;
}
@@ -52,15 +52,15 @@
public static int getFacetType(Node node) {
String value = getFacetName(node);
if (value != null) {
- if ("header".equals(value)) {
+ if ("header".equals(value)) { //$NON-NLS-1$
return FACET_TYPE_HEADER;
- } else if ("footer".equals(value)) {
+ } else if ("footer".equals(value)) { //$NON-NLS-1$
return FACET_TYPE_FOOTER;
- } else if ("body".equals(value)) {
+ } else if ("body".equals(value)) { //$NON-NLS-1$
return FACET_TYPE_BODY;
- } else if ("navigation".equals(value)) {
+ } else if ("navigation".equals(value)) { //$NON-NLS-1$
return FACET_TYPE_NAVIGATION;
- } else if ("caption".equals(value)) {
+ } else if ("caption".equals(value)) { //$NON-NLS-1$
return FACET_TYPE_CAPTION;
}
}
@@ -69,7 +69,7 @@
public static boolean isInclude(Node node) {
if (node != null && node.getNodeType() == Node.ELEMENT_NODE) {
- return node.getNodeName().indexOf("jsp:include") >=0 || node.getNodeName().indexOf("jsp:directive.include")>=0;
+ return node.getNodeName().indexOf("jsp:include") >=0 || node.getNodeName().indexOf("jsp:directive.include")>=0; //$NON-NLS-1$ //$NON-NLS-2$
}
return false;
}
@@ -91,9 +91,9 @@
public static Document getIncludeDocument(Node includeNode, VpePageContext pageContext) {
if (isInclude(includeNode)) {
- String pageName = ((Element)includeNode).getAttribute("page");
+ String pageName = ((Element)includeNode).getAttribute("page"); //$NON-NLS-1$
if (pageName == null) {
- pageName = ((Element)includeNode).getAttribute("file");
+ pageName = ((Element)includeNode).getAttribute("file"); //$NON-NLS-1$
}
if (pageName != null) {
IDOMModel wtpModel = getWtpModelForRead(pageName, pageContext);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -62,7 +62,7 @@
}
creatorInfo.addChildrenInfo(info);
- String styleClass = "";
+ String styleClass = ""; //$NON-NLS-1$
String tableHeaderClass = getNodeAttrValue(sourceNode.getParentNode(), VpeTemplateManager.ATTR_DATATABLE_HEADER_CLASS);
String columnHeaderClass = getNodeAttrValue(sourceNode, VpeTemplateManager.ATTR_DATATABLE_HEADER_CLASS);
if (null != columnHeaderClass) {
@@ -80,7 +80,7 @@
}
creatorInfo.addChildrenInfo(info);
- styleClass = "";
+ styleClass = ""; //$NON-NLS-1$
String tableFooterClass = getNodeAttrValue(sourceNode.getParentNode(), VpeTemplateManager.ATTR_DATATABLE_FOOTER_CLASS);
String columnFooterClass = getNodeAttrValue(sourceNode, VpeTemplateManager.ATTR_DATATABLE_FOOTER_CLASS);
if (null != columnFooterClass) {
@@ -100,9 +100,9 @@
for (int i = 0; i < cnt; i++) {
Node node = list.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
- boolean isFacet = namesIsEquals("facet", node.getNodeName());
- Node attrName = node.getAttributes().getNamedItem("name");
- if (!isFacet || (attrName != null && !"header".equals(attrName.getNodeValue()) && !"footer".equals(attrName.getNodeValue()))) {
+ boolean isFacet = namesIsEquals("facet", node.getNodeName()); //$NON-NLS-1$
+ Node attrName = node.getAttributes().getNamedItem("name"); //$NON-NLS-1$
+ if (!isFacet || (attrName != null && !"header".equals(attrName.getNodeValue()) && !"footer".equals(attrName.getNodeValue()))) { //$NON-NLS-1$ //$NON-NLS-2$
info.addSourceChild(node);
useTextNodeAsBody = false;
}
@@ -133,7 +133,7 @@
int index = 0;
Node prevNode = sourceNode.getPreviousSibling();
while (prevNode != null) {
- if((sourceNode.getNodeName().indexOf("column") >= 0 || sourceNode.getNodeName().indexOf("treeColumn") >= 0) && (prevNode.getNodeName().indexOf("column") >= 0 || prevNode.getNodeName().indexOf("treeColumn") >= 0)){
+ if((sourceNode.getNodeName().indexOf("column") >= 0 || sourceNode.getNodeName().indexOf("treeColumn") >= 0) && (prevNode.getNodeName().indexOf("column") >= 0 || prevNode.getNodeName().indexOf("treeColumn") >= 0)){ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
index++;
}else if (prevNode.getNodeName().equals(sourceNode.getNodeName())) {
index++;
@@ -179,7 +179,7 @@
}
private static boolean namesIsEquals(String name1, String name2) {
- int ind = name2.indexOf(":");
+ int ind = name2.indexOf(":"); //$NON-NLS-1$
return ind < name2.length() && name1.equals(name2.substring(ind >= 0 ? ind + 1 : 0));
}
@@ -197,7 +197,7 @@
if ((null != classes) && (classes.length > 0)) {
int classesCount = classes.length;
int columnCount = index + 1;
- String className = "";
+ String className = ""; //$NON-NLS-1$
// Finds correct css style class index
// for the column
@@ -209,7 +209,7 @@
className = classes[classesIndex];
}
if (className.trim().length() > 0) {
- cell.setAttribute("class", className);
+ cell.setAttribute("class", className); //$NON-NLS-1$
}
}
@@ -225,7 +225,7 @@
*/
private String[] splitClasses(String value) {
if (value != null) {
- return value.split(",");
+ return value.split(","); //$NON-NLS-1$
}
return null;
}
@@ -239,7 +239,7 @@
private void setCellClass(nsIDOMElement cell, String className) {
if (cell != null) {
if (className != null && className.trim().length() > 0) {
- cell.setAttribute("class", className);
+ cell.setAttribute("class", className); //$NON-NLS-1$
}
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -55,14 +55,14 @@
}
if (node.getNodeType() == Node.ELEMENT_NODE) {
- boolean isColumn = node.getNodeName().indexOf(":column") > 0 || node.getNodeName().indexOf(":treeColumn") > 0;
- boolean isFacet = !isColumn && node.getNodeName().indexOf(":facet") > 0;
- Node attrName = node.getAttributes().getNamedItem("name");
- if (!isColumn && isFacet && attrName != null && "header".equals(attrName.getNodeValue())) {
+ boolean isColumn = node.getNodeName().indexOf(":column") > 0 || node.getNodeName().indexOf(":treeColumn") > 0; //$NON-NLS-1$ //$NON-NLS-2$
+ boolean isFacet = !isColumn && node.getNodeName().indexOf(":facet") > 0; //$NON-NLS-1$
+ Node attrName = node.getAttributes().getNamedItem("name"); //$NON-NLS-1$
+ if (!isColumn && isFacet && attrName != null && "header".equals(attrName.getNodeValue())) { //$NON-NLS-1$
tableHeader = node;
- } else if (!isColumn && isFacet && attrName != null && "footer".equals(attrName.getNodeValue())) {
+ } else if (!isColumn && isFacet && attrName != null && "footer".equals(attrName.getNodeValue())) { //$NON-NLS-1$
tableFooter = node;
- } else if (!isColumn && isFacet && attrName != null && "caption".equals(attrName.getNodeValue())) {
+ } else if (!isColumn && isFacet && attrName != null && "caption".equals(attrName.getNodeValue())) { //$NON-NLS-1$
tableCaption = node;
} else if (isColumn) {
if (columns == null) columns = new ArrayList<SourceColumnElements>();
@@ -188,11 +188,11 @@
for (int i = 0; i < cnt; i++) {
Node node = list.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
- boolean isFacet = node.getNodeName().indexOf(":facet") > 0;
- Node attrName = node.getAttributes().getNamedItem("name");
- if (isFacet && attrName != null && "header".equals(attrName.getNodeValue())) {
+ boolean isFacet = node.getNodeName().indexOf(":facet") > 0; //$NON-NLS-1$
+ Node attrName = node.getAttributes().getNamedItem("name"); //$NON-NLS-1$
+ if (isFacet && attrName != null && "header".equals(attrName.getNodeValue())) { //$NON-NLS-1$
header = node;
- } else if (isFacet && attrName != null && "footer".equals(attrName.getNodeValue())) {
+ } else if (isFacet && attrName != null && "footer".equals(attrName.getNodeValue())) { //$NON-NLS-1$
footer = node;
} else {
getBody().add(node);
@@ -461,12 +461,12 @@
VpeDataTableElements.getNamedChild(visualParent, HTML.TAG_TFOOT)
);
- visualDataTableElements.setCaption(VpeDataTableElements.getNamedChild(visualDataTableElements.getCaption(), "caption"));
- visualDataTableElements.setTableHeaderRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getTableHeader(), "tr"));
- visualDataTableElements.setColumnsHeaderRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getColumnsHeader(), "tr"));
- visualDataTableElements.setBodyRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getBody(), "tr"));
- visualDataTableElements.setColumnsFooterRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getColumnsFooter(), "tr"));
- visualDataTableElements.setTableFooterRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getTableFooter(), "tr"));
+ visualDataTableElements.setCaption(VpeDataTableElements.getNamedChild(visualDataTableElements.getCaption(), "caption")); //$NON-NLS-1$
+ visualDataTableElements.setTableHeaderRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getTableHeader(), "tr")); //$NON-NLS-1$
+ visualDataTableElements.setColumnsHeaderRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getColumnsHeader(), "tr")); //$NON-NLS-1$
+ visualDataTableElements.setBodyRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getBody(), "tr")); //$NON-NLS-1$
+ visualDataTableElements.setColumnsFooterRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getColumnsFooter(), "tr")); //$NON-NLS-1$
+ visualDataTableElements.setTableFooterRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getTableFooter(), "tr")); //$NON-NLS-1$
return visualDataTableElements;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -101,7 +101,7 @@
}
StringBuilder sb = new StringBuilder();
- String word = "((\\w+)([\\.\\[\\]]*))";
+ String word = "((\\w+)([\\.\\[\\]]*))"; //$NON-NLS-1$
Matcher m;
String variable;
String signs;
@@ -134,7 +134,7 @@
sb.append(origStr.substring(endIndex, origStr.length()));
}
- if (!"".equals(sb.toString())) {
+ if (!"".equals(sb.toString())) { //$NON-NLS-1$
return sb.toString();
}
return origStr;
@@ -144,18 +144,18 @@
Set<String> keys = paramsMap.keySet();
if (null != node) {
String nodeValue = node.getNodeValue();
- String curlyBracketResultPattern = "(" + Pattern.quote("#")
- + "\\{(.+?)\\})+?";
+ String curlyBracketResultPattern = "(" + Pattern.quote("#") //$NON-NLS-1$ //$NON-NLS-2$
+ + "\\{(.+?)\\})+?"; //$NON-NLS-1$
int matcherGroupWithVariable = 2;
- if ((null != nodeValue) && (!"".equals(nodeValue))) {
+ if ((null != nodeValue) && (!"".equals(nodeValue))) { //$NON-NLS-1$
for (String key : keys) {
Matcher curlyBracketMatcher = Pattern.compile(
curlyBracketResultPattern).matcher(nodeValue);
String replacement = paramsMap.get(key);
- if (replacement.startsWith("#{")
- && replacement.endsWith("}")) {
+ if (replacement.startsWith("#{") //$NON-NLS-1$
+ && replacement.endsWith("}")) { //$NON-NLS-1$
// remove first 2 signs '#{'
replacement = replacement.substring(2);
// remove last '}' sign
@@ -231,7 +231,7 @@
for (int i = 0; i < len; i++) {
Node sourceChild = sourceChildren.item(i);
if (sourceChild.getNodeType() == Node.ELEMENT_NODE
- && "param".equals(sourceChild.getLocalName())) {
+ && "param".equals(sourceChild.getLocalName())) { //$NON-NLS-1$
String name = ((Element) sourceChild)
.getAttribute(HTML.ATTR_NAME);
String value = ((Element) sourceChild)
@@ -275,7 +275,7 @@
for (int i = 0; i < len; i++) {
Node sourceChild = sourceChildren.item(i);
if (sourceChild.getNodeType() == Node.ELEMENT_NODE
- && "define".equals(sourceChild.getLocalName())) {
+ && "define".equals(sourceChild.getLocalName())) { //$NON-NLS-1$
if (template == null) {
VpeTemplateManager templateManager = pageContext
.getVisualBuilder().getTemplateManager();
@@ -333,12 +333,12 @@
Node sourceElement, nsIDOMDocument visualDocument) {
nsIDOMElement container = visualDocument.createElement(HTML.TAG_DIV);
- container.setAttribute("style", "border: 1px dashed #2A7F00");
+ container.setAttribute("style", "border: 1px dashed #2A7F00"); //$NON-NLS-1$ //$NON-NLS-2$
VpeVisualDomBuilder.markIncludeElement(container);
nsIDOMElement title = visualDocument.createElement(HTML.TAG_DIV);
nsIDOMElement tag = visualDocument.createElement(HTML.TAG_SPAN);
- tag.setAttribute("class", "__any__tag__caption");
+ tag.setAttribute("class", "__any__tag__caption"); //$NON-NLS-1$ //$NON-NLS-2$
tag.appendChild(visualDocument.createTextNode(sourceElement.getNodeName()));
title.appendChild(tag);
if (fileName != null) {
@@ -354,7 +354,7 @@
for (int i = 0; i < len; i++) {
Node sourceChild = sourceChildren.item(i);
if (sourceChild.getNodeType() == Node.ELEMENT_NODE
- && "define".equals(sourceChild.getLocalName())) {
+ && "define".equals(sourceChild.getLocalName())) { //$NON-NLS-1$
childrenInfo.addSourceChild(sourceChild);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -34,11 +34,11 @@
boolean isHeader = false;
boolean isFooter = false;
- Node nameAttr = sourceNode.getAttributes().getNamedItem("name");
+ Node nameAttr = sourceNode.getAttributes().getNamedItem("name"); //$NON-NLS-1$
if (nameAttr != null) {
String name = nameAttr.getNodeValue();
- isHeader = name.equals("header");
- isFooter = name.equals("footer");
+ isHeader = name.equals("header"); //$NON-NLS-1$
+ isFooter = name.equals("footer"); //$NON-NLS-1$
}
if (isHeader || isFooter) {
@@ -54,9 +54,9 @@
}
if (cell != null) {
if (isHeader) {
- setCellClass(cell, getTableAttrValue(sourceParent, "headerClass"));
+ setCellClass(cell, getTableAttrValue(sourceParent, "headerClass")); //$NON-NLS-1$
} else if (isFooter) {
- setCellClass(cell, getTableAttrValue(sourceParent, "footerClass"));
+ setCellClass(cell, getTableAttrValue(sourceParent, "footerClass")); //$NON-NLS-1$
}
creatorInfo = new VpeCreatorInfo(cell);
}
@@ -84,7 +84,7 @@
private void setCellClass(nsIDOMElement cell, String className) {
if (cell != null) {
if (className != null && className.trim().length() > 0) {
- cell.setAttribute("class", className);
+ cell.setAttribute("class", className); //$NON-NLS-1$
}
}
}
@@ -105,7 +105,7 @@
int length = childs != null ? childs.getLength() : 0;
for (int i = 0; i < length; i++) {
Node child = childs.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().indexOf(":column") > 0) {
+ if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().indexOf(":column") > 0) { //$NON-NLS-1$
count++;
}
}
@@ -115,7 +115,7 @@
private nsIDOMElement makeCell(int columnCount, String cellTag, nsIDOMDocument visualDocument) {
nsIDOMElement visualCell = visualDocument.createElement(cellTag);
if (columnCount > 1) {
- visualCell.setAttribute("colspan", "" + columnCount);
+ visualCell.setAttribute("colspan", "" + columnCount); //$NON-NLS-1$ //$NON-NLS-2$
}
return visualCell;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeGridCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeGridCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeGridCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -33,7 +33,7 @@
import org.w3c.dom.NodeList;
public class VpeGridCreator extends VpeAbstractCreator {
- static final String VAL_PAGE_DIRECTION = "pageDirection";
+ static final String VAL_PAGE_DIRECTION = "pageDirection"; //$NON-NLS-1$
private boolean caseSensitive;
private VpeExpression layoutExpr;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -61,11 +61,11 @@
public static final int PANEL_LAYOUT = 17;
public static final int TYPE_A = 18;
- static final String ATTR_STYLE = "style";
- public static final String ATTR_STYLE_MODIFY_NAME = "-moz-user-modify";
- public static final String ATTR_STYLE_MODIFY_READ_WRITE_VALUE = "read-write";
- public static final String ATTR_STYLE_MODIFY_READ_ONLY_VALUE = "read-only";
- static final String ATTR_CURSOR_POINTER = "cursor:pointer;";
+ static final String ATTR_STYLE = "style"; //$NON-NLS-1$
+ public static final String ATTR_STYLE_MODIFY_NAME = "-moz-user-modify"; //$NON-NLS-1$
+ public static final String ATTR_STYLE_MODIFY_READ_WRITE_VALUE = "read-write"; //$NON-NLS-1$
+ public static final String ATTR_STYLE_MODIFY_READ_ONLY_VALUE = "read-only"; //$NON-NLS-1$
+ static final String ATTR_CURSOR_POINTER = "cursor:pointer;"; //$NON-NLS-1$
private int type = TYPE_NONE;
private VpeCreator creator = null;
@@ -330,9 +330,9 @@
}
}
- private static final String VIEW_TAGNAME = "view";
- private static final String LOCALE_ATTRNAME = "locale";
- private static final String PREFIX_SEPARATOR = ":";
+ private static final String VIEW_TAGNAME = "view"; //$NON-NLS-1$
+ private static final String LOCALE_ATTRNAME = "locale"; //$NON-NLS-1$
+ private static final String PREFIX_SEPARATOR = ":"; //$NON-NLS-1$
private String getPageLocale(VpePageContext pageContext, IDOMElement sourceElement) {
@@ -341,7 +341,7 @@
TaglibData fTD = null;
for (int i = 0; i < taglibs.size(); i++) {
TaglibData td = (TaglibData)taglibs.get(i);
- if ("http://java.sun.com/jsf/core".equals(td.getUri())) fTD = td;
+ if ("http://java.sun.com/jsf/core".equals(td.getUri())) fTD = td; //$NON-NLS-1$
}
if (fTD == null || fTD.getPrefix() == null || fTD.getPrefix().length() == 0) return null;
@@ -435,22 +435,22 @@
}
static void makeModify(nsIDOMElement visualElement, boolean modify) {
- String s = ATTR_STYLE_MODIFY_NAME + ":" +
+ String s = ATTR_STYLE_MODIFY_NAME + ":" + //$NON-NLS-1$
(modify ? ATTR_STYLE_MODIFY_READ_WRITE_VALUE : ATTR_STYLE_MODIFY_READ_ONLY_VALUE);
String style = visualElement.getAttribute(ATTR_STYLE);
if (style != null && style.length() > 0) {
if (style.indexOf(ATTR_STYLE_MODIFY_NAME) >= 0) {
- String[] items = style.split(";");
- style = "";
+ String[] items = style.split(";"); //$NON-NLS-1$
+ style = ""; //$NON-NLS-1$
for (int i = 0; i < items.length; i++) {
- String[] item = items[i].split(":");
+ String[] item = items[i].split(":"); //$NON-NLS-1$
if (ATTR_STYLE_MODIFY_NAME.trim().equalsIgnoreCase(item[0].trim())) {
item[1] = modify ? ATTR_STYLE_MODIFY_READ_WRITE_VALUE : ATTR_STYLE_MODIFY_READ_ONLY_VALUE;
}
- style += item[0] + ":" + item[1] + ";";
+ style += item[0] + ":" + item[1] + ";"; //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
- if (!";".equals(style.substring(style.length() - 1))) style += ";";
+ if (!";".equals(style.substring(style.length() - 1))) style += ";"; //$NON-NLS-1$ //$NON-NLS-2$
style += s;
}
} else {
@@ -561,7 +561,7 @@
@Override
public Node getNodeForUpdate(VpePageContext pageContext, Node sourceNode, nsIDOMNode visualNode, Object data) {
// TODO Sergey Vasilyev redevelop JSF's facet template
- if (sourceNode.getNodeName().endsWith(":facet")) {
+ if (sourceNode.getNodeName().endsWith(":facet")) { //$NON-NLS-1$
return sourceNode.getParentNode();
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -140,7 +140,7 @@
protected VpeCreationData createStub(String fileName, nsIDOMDocument visualDocument) {
nsIDOMElement visualNewElement = visualDocument.createElement(HTML.TAG_DIV);
- visualNewElement.setAttribute("style", "background-color:#ECF3FF;cursor:pointer;padding:0 5px;margin:3px 0;font-style:italic;color:#0051DD;");
+ visualNewElement.setAttribute("style", "background-color:#ECF3FF;cursor:pointer;padding:0 5px;margin:3px 0;font-style:italic;color:#0051DD;"); //$NON-NLS-1$ //$NON-NLS-2$
VpeVisualDomBuilder.markIncludeElement(visualNewElement);
if (fileName != null) {
visualNewElement.appendChild(visualDocument.createTextNode(fileName));
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeLinkCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -54,7 +54,7 @@
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
String href_value = getExprValue(pageContext, hrefExpr, sourceNode);
- nsIDOMNode newNode = pageContext.getVisualBuilder().addLinkNodeToHead(href_value, "no", false);
+ nsIDOMNode newNode = pageContext.getVisualBuilder().addLinkNodeToHead(href_value, "no", false); //$NON-NLS-1$
visualNodeMap.put(this, newNode);
VpeCreatorInfo creatorInfo = new VpeCreatorInfo(null);
return creatorInfo;
@@ -74,9 +74,9 @@
nsIDOMNode oldNode = (nsIDOMNode)visualNodeMap.get(this);
nsIDOMNode newNode;
if(oldNode == null){
- newNode = pageContext.getVisualBuilder().addLinkNodeToHead(href_value, "no", false);
+ newNode = pageContext.getVisualBuilder().addLinkNodeToHead(href_value, "no", false); //$NON-NLS-1$
}else{
- newNode = pageContext.getVisualBuilder().replaceLinkNodeToHead(oldNode, href_value, "no");
+ newNode = pageContext.getVisualBuilder().replaceLinkNodeToHead(oldNode, href_value, "no"); //$NON-NLS-1$
if(visualNodeMap.containsKey(this)) visualNodeMap.remove(this);
}
visualNodeMap.put(this, newNode);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeListCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -91,7 +91,7 @@
}
}
- nsIDOMElement visualList = visualDocument.createElement("true".equals(strValue)?HTML.TAG_OL:HTML.TAG_UL);
+ nsIDOMElement visualList = visualDocument.createElement("true".equals(strValue)?HTML.TAG_OL:HTML.TAG_UL); //$NON-NLS-1$
VpeCreatorInfo creatorInfo = new VpeCreatorInfo(visualList);
for (int i = 0; i < propertyCreators.size(); i++) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -390,7 +390,7 @@
nsIDOMElement visualRow = visualDocument.createElement(HTML.TAG_TR);
visualHead.appendChild(visualRow);
nsIDOMElement visualCell = visualDocument.createElement(cellTag);
- visualCell.setAttribute(HTML.ATTR_COLSPAN, "" + tableSize);
+ visualCell.setAttribute(HTML.ATTR_COLSPAN, "" + tableSize); //$NON-NLS-1$
if (headerClassExpr != null && header.getParentNode() != null) {
String headerClass = headerClassExpr.exec(pageContext,
header.getParentNode()).stringValue();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -28,12 +28,12 @@
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+@SuppressWarnings("nls")
public class VpePanelLayoutCreator extends VpeAbstractCreator {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePseudoContentCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePseudoContentCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePseudoContentCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -15,22 +15,21 @@
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
-import org.w3c.dom.Element;
import org.w3c.dom.Node;
public abstract class VpePseudoContentCreator {
- private static final String PSEUDO_CONTENT_ATTR = "vpe:pseudo-element";
+ private static final String PSEUDO_CONTENT_ATTR = "vpe:pseudo-element"; //$NON-NLS-1$
public abstract void setPseudoContent(VpePageContext pageContext, Node sourceContainer, nsIDOMNode visualContainer, nsIDOMDocument visualDocument) throws VpeExpressionException;
public static void setPseudoAttribute(nsIDOMElement visualPseudoElement) {
- visualPseudoElement.setAttribute(PSEUDO_CONTENT_ATTR, "yes");
- visualPseudoElement.setAttribute("style", "font-style:italic; color:green");
+ visualPseudoElement.setAttribute(PSEUDO_CONTENT_ATTR, "yes"); //$NON-NLS-1$
+ visualPseudoElement.setAttribute("style", "font-style:italic; color:green"); //$NON-NLS-1$ //$NON-NLS-2$
VpeHtmlTemplate.makeModify(visualPseudoElement, false);
}
public static boolean isPseudoElement(nsIDOMNode visualNode) {
- return visualNode != null && visualNode.getNodeType() == Node.ELEMENT_NODE && "yes".equalsIgnoreCase(((nsIDOMElement)visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID)).getAttribute(PSEUDO_CONTENT_ATTR));
+ return visualNode != null && visualNode.getNodeType() == Node.ELEMENT_NODE && "yes".equalsIgnoreCase(((nsIDOMElement)visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID)).getAttribute(PSEUDO_CONTENT_ATTR)); //$NON-NLS-1$
}
public static nsIDOMNode getContainerForPseudoContent(nsIDOMNode visualNode) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateData.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateData.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateData.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -71,8 +71,8 @@
}
public String getPrefix() {
- if (name != null && name.indexOf(":") > 0) {
- return name.substring(0, name.indexOf(":"));
+ if (name != null && name.indexOf(":") > 0) { //$NON-NLS-1$
+ return name.substring(0, name.indexOf(":")); //$NON-NLS-1$
}
return null;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateFileList.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateFileList.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateFileList.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -41,7 +41,7 @@
newAutoTemplateFile = new VpeTemplateFile(
VpeTemplateManager.getAutoTemplates(), null);
} catch (IOException e) {
- VpePlugin.getPluginLog().logError("Default template for unknown tags loading error ",e);
+ VpePlugin.getPluginLog().logError("Default template for unknown tags loading error ",e); //$NON-NLS-1$
}
changed = (autoTemplateFile == null) != (newAutoTemplateFile == null);
if (!changed && autoTemplateFile != null) {
@@ -95,7 +95,7 @@
VpeTemplateFile templateFile = new VpeTemplateFile(pathAttrValue, elements[j]);
templateList.add(templateFile);
} catch (IOException e) {
- VpePlugin.getPluginLog().logError("Error during loading template '" + pathAttrValue + "'", e);
+ VpePlugin.getPluginLog().logError("Error during loading template '" + pathAttrValue + "'", e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -998,7 +998,7 @@
String nameSpaceIdentifyer, Exception e) {
String message = e.getMessage();
if(message==null) {
- message = "Can't get VPE template class: " + templateClassName + ", from bundle:" + nameSpaceIdentifyer; //$NON-NLS-1$
+ message = "Can't get VPE template class: " + templateClassName + ", from bundle:" + nameSpaceIdentifyer; //$NON-NLS-1$ //$NON-NLS-2$
}
VpePlugin.getPluginLog().logError(message, e);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTextPseudoContentCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTextPseudoContentCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTextPseudoContentCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -10,12 +10,13 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.template;
-import org.w3c.dom.Document;
+import java.text.MessageFormat;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -51,9 +52,9 @@
if (name == null || attrName.length() <= 0) {
name = ((Element)sourceContainer).getNodeName();
}
- text = "Insert Content for " + name;
+ text = MessageFormat.format(VpeUIMessages.VpeTextPseudoContentCreator_InsertContentFor, name);
} else {
- text = "Insert Content";
+ text = VpeUIMessages.VpeTextPseudoContentCreator_InsertContent;
}
}
nsIDOMText newTextNode = visualDocument.createTextNode(text);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -57,7 +57,7 @@
if (expression != null) {
value = expression.exec(pageContext, sourceNode).stringValue();
} else {
- value = "";
+ value = ""; //$NON-NLS-1$
}
nsIDOMText valueNode = visualDocument.createTextNode(value);
visualNodeMap.put(this, valueNode);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/dnd/VpeDnd.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/dnd/VpeDnd.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/dnd/VpeDnd.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -24,15 +24,15 @@
public class VpeDnd {
- static final String TAG_DRAG = VpeTemplateManager.VPE_PREFIX + "drag";
- static final String TAG_DROP = VpeTemplateManager.VPE_PREFIX + "drop";
- static final String TAG_CONTAINER_CHILD = VpeTemplateManager.VPE_PREFIX + "container-child";
+ static final String TAG_DRAG = VpeTemplateManager.VPE_PREFIX + "drag"; //$NON-NLS-1$
+ static final String TAG_DROP = VpeTemplateManager.VPE_PREFIX + "drop"; //$NON-NLS-1$
+ static final String TAG_CONTAINER_CHILD = VpeTemplateManager.VPE_PREFIX + "container-child"; //$NON-NLS-1$
- static final String ATTRIBUTE_START_ENABLE = "start-enable";
- static final String ATTRIBUTE_CONTAINER = "container";
- static final String ATTRIBUTE_TAG_NAME = "tag-name";
+ static final String ATTRIBUTE_START_ENABLE = "start-enable"; //$NON-NLS-1$
+ static final String ATTRIBUTE_CONTAINER = "container"; //$NON-NLS-1$
+ static final String ATTRIBUTE_TAG_NAME = "tag-name"; //$NON-NLS-1$
- static final String STRING_YES = "yes";
+ static final String STRING_YES = "yes"; //$NON-NLS-1$
private boolean dragEnabled = false;
private boolean isContainer = false;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.template.expression;
-import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -29,7 +28,7 @@
public VpeValue exec(VpePageContext pageContext, Node sourceNode) {
String value = null;
value = ((Element)sourceNode).getAttribute(name);
- return new VpeValue((value == null ? "" : value));
+ return new VpeValue((value == null ? "" : value)); //$NON-NLS-1$
}
public String getAttributeName() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionParentName.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionParentName.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionParentName.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -28,6 +28,6 @@
String parentTemplateName = VpeTemplateManager.getInstance().getTemplateName(pageContext, parentNode);
- return new VpeValue(parentTemplateName != null ? parentTemplateName : "");
+ return new VpeValue(parentTemplateName != null ? parentTemplateName : ""); //$NON-NLS-1$
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagString.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagString.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagString.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -17,6 +17,7 @@
public class VpeFunctionTagString extends VpeFunction {
+ @SuppressWarnings("nls")
public VpeValue exec(VpePageContext pageContext, Node sourceNode) {
String tagString = " <" + sourceNode.getNodeName();
NamedNodeMap attrs = sourceNode.getAttributes();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagText.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagText.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTagText.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -12,7 +12,6 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMText;
-import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -20,6 +19,7 @@
public class VpeFunctionTagText extends VpeFunction {
+ @SuppressWarnings("nls")
public VpeValue exec(VpePageContext pageContext, Node sourceNode) {
String tagText = "";
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -170,12 +170,12 @@
* version-comparator like [<a href="http://maven.apache.org/ref/current/maven-artifact/apidocs/org/apache/mav...">http://maven.apache.org/ref/current/maven-artifact/apidocs/org/apache/mav...</a>]
*/
private double stringVersionToDouble(String sVersion) {
- String tokens[] = sVersion.split("\\.");
+ String tokens[] = sVersion.split("\\."); //$NON-NLS-1$
String parseableVersion;
switch (tokens.length) {
case 0:
- parseableVersion = "0"; //$NON-NLS-N$
+ parseableVersion = "0"; //$NON-NLS-1$
break;
case 1:
parseableVersion = tokens[0];
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeTextExpression.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeTextExpression.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeTextExpression.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -23,7 +23,7 @@
public VpeValue exec(VpePageContext pageContext, Node sourceNode) {
if (text == null) {
- return new VpeValue("");
+ return new VpeValue(""); //$NON-NLS-1$
} else {
return new VpeValue(text);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/TemplateResizeData.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/TemplateResizeData.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/TemplateResizeData.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -19,6 +19,7 @@
private TemplateResizeData next=null;
+ @SuppressWarnings("nls")
public TemplateResizeData(String attribute, String position, String xPath, String test, String enabledString){
sizeAttribute = attribute;
if("".equals(sizeAttribute)) sizeAttribute = null;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -33,16 +33,16 @@
*/
public class VpeResizer {
/** TAG_WIDTH */
- private static final String TAG_WIDTH = VpeTemplateManager.VPE_PREFIX + "width";
+ private static final String TAG_WIDTH = VpeTemplateManager.VPE_PREFIX + "width"; //$NON-NLS-1$
/** TAG_HEIGHT */
- private static final String TAG_HEIGHT = VpeTemplateManager.VPE_PREFIX + "height";
+ private static final String TAG_HEIGHT = VpeTemplateManager.VPE_PREFIX + "height"; //$NON-NLS-1$
- private static final String ATTRIBUTE_WIDTH = "width-attr";
- private static final String ATTRIBUTE_HEIGHT = "height-attr";
- private static final String ATTRIBUTE_TAG_XPATH = "tag-xpath";
- private static final String ATTRIBUTE_TEST = "test";
- private static final String ATTRIBUTE_DISABLE_ABSOLUTE_POSITION = "disable-absolute-position";
+ private static final String ATTRIBUTE_WIDTH = "width-attr"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_HEIGHT = "height-attr"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_TAG_XPATH = "tag-xpath"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_TEST = "test"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_DISABLE_ABSOLUTE_POSITION = "disable-absolute-position"; //$NON-NLS-1$
private TemplateResizeData horizontalData;
private TemplateResizeData verticalData;
@@ -176,14 +176,14 @@
Element ancestor = (Element)SourceDomUtil.getAncestorNode(sourceElement, resizeData.getTagXpath());
if(ancestor != null){
if(sizeAttribute.indexOf(VpeStyleUtil.DOT_STRING) < 0){
- ancestor.setAttribute(sizeAttribute, ""+size);
+ ancestor.setAttribute(sizeAttribute, ""+size); //$NON-NLS-1$
}else{
VpeStyleUtil.setParameterInStyle(ancestor, sizeAttribute, size+VpeStyleUtil.PX_STRING);
}
}
}else{
if(sizeAttribute.indexOf(VpeStyleUtil.DOT_STRING) < 0){
- sourceElement.setAttribute(sizeAttribute, ""+size);
+ sourceElement.setAttribute(sizeAttribute, ""+size); //$NON-NLS-1$
}else{
VpeStyleUtil.setParameterInStyle(sourceElement, sizeAttribute, size+VpeStyleUtil.PX_STRING);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -148,7 +148,7 @@
Element element = (Element)node;
String name = data.getName();
if(name==null) {
- String message = "Wrong vpe template for tag " + node.getNodeName() + ". Attribute 'name' or 'type' of <vpe:formatAttribute> must be set.";
+ String message = "Wrong vpe template for tag " + node.getNodeName() + ". Attribute 'name' or 'type' of <vpe:formatAttribute> must be set."; //$NON-NLS-1$ //$NON-NLS-2$
VpePlugin.getDefault().getLog().log(new Status(Status.ERROR, VpePlugin.PLUGIN_ID, Status.OK, message, new Exception(message)));
}
element.setAttribute(name, ""); //$NON-NLS-1$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BlockFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BlockFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BlockFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -25,26 +25,26 @@
*/
public class BlockFormatController extends ComboFormatController {
- public static String TYPE = "BlockFormat";
+ public static String TYPE = "BlockFormat"; //$NON-NLS-1$
public static HashMap TAGS = new HashMap();
static {
- TAGS.put("address", "Address");
- TAGS.put("h1", "Heading 1");
- TAGS.put("h2", "Heading 2");
- TAGS.put("h3", "Heading 3");
- TAGS.put("h4", "Heading 4");
- TAGS.put("h5", "Heading 5");
- TAGS.put("h6", "Heading 6");
+ TAGS.put("address", "Address"); //$NON-NLS-1$ //$NON-NLS-2$
+ TAGS.put("h1", "Heading 1"); //$NON-NLS-1$ //$NON-NLS-2$
+ TAGS.put("h2", "Heading 2"); //$NON-NLS-1$ //$NON-NLS-2$
+ TAGS.put("h3", "Heading 3"); //$NON-NLS-1$ //$NON-NLS-2$
+ TAGS.put("h4", "Heading 4"); //$NON-NLS-1$ //$NON-NLS-2$
+ TAGS.put("h5", "Heading 5"); //$NON-NLS-1$ //$NON-NLS-2$
+ TAGS.put("h6", "Heading 6"); //$NON-NLS-1$ //$NON-NLS-2$
}
public static HashMap TEXTS = new HashMap();
static {
- TEXTS.put("Address", "address");
- TEXTS.put("Heading 1", "h1");
- TEXTS.put("Heading 2", "h2");
- TEXTS.put("Heading 3", "h3");
- TEXTS.put("Heading 4", "h4");
- TEXTS.put("Heading 5", "h5");
- TEXTS.put("Heading 6", "h6");
+ TEXTS.put("Address", "address"); //$NON-NLS-1$ //$NON-NLS-2$
+ TEXTS.put("Heading 1", "h1"); //$NON-NLS-1$ //$NON-NLS-2$
+ TEXTS.put("Heading 2", "h2"); //$NON-NLS-1$ //$NON-NLS-2$
+ TEXTS.put("Heading 3", "h3"); //$NON-NLS-1$ //$NON-NLS-2$
+ TEXTS.put("Heading 4", "h4"); //$NON-NLS-1$ //$NON-NLS-2$
+ TEXTS.put("Heading 5", "h5"); //$NON-NLS-1$ //$NON-NLS-2$
+ TEXTS.put("Heading 6", "h6"); //$NON-NLS-1$ //$NON-NLS-2$
}
private String tagName;
@@ -77,7 +77,7 @@
selectionText = comboBlockFormat.getText();
tagName = (String) TEXTS.get(selectionText);
if (tagName == null) {
- tagName = "normal";
+ tagName = "normal"; //$NON-NLS-1$
}
super.handleEvent(event);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BoldFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BoldFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BoldFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -20,11 +20,11 @@
*/
public class BoldFormatController extends ToolItemFormatController {
- public static String TYPE = "BoldFormat";
+ public static String TYPE = "BoldFormat"; //$NON-NLS-1$
- private static String STYLE_PROPERTY_NAME = "FONT-WEIGHT";
- private static String STYLE_PROPERTY_BOLD_VALUE = "bold";
- private static String STYLE_PROPERTY_NORMAL_VALUE = "normal";
+ private static String STYLE_PROPERTY_NAME = "FONT-WEIGHT"; //$NON-NLS-1$
+ private static String STYLE_PROPERTY_BOLD_VALUE = "bold"; //$NON-NLS-1$
+ private static String STYLE_PROPERTY_NORMAL_VALUE = "normal"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BulletsFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BulletsFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/BulletsFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -20,7 +20,7 @@
*/
public class BulletsFormatController extends ToolItemFormatController {
- public static String TYPE = "BulletsFormat";
+ public static String TYPE = "BulletsFormat"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/CenterFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/CenterFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/CenterFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -20,7 +20,7 @@
*/
public class CenterFormatController extends ToolItemFormatController {
- public static String TYPE = "CenterFormat";
+ public static String TYPE = "CenterFormat"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ColorFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ColorFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ColorFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -52,17 +52,17 @@
StringBuffer buf = new StringBuffer();
String c = Integer.toHexString(newColor.red);
if(c.length()<2) {
- buf.append("0");
+ buf.append("0"); //$NON-NLS-1$
}
buf.append(c);
c = Integer.toHexString(newColor.green);
if(c.length()<2) {
- buf.append("0");
+ buf.append("0"); //$NON-NLS-1$
}
buf.append(c);
c = Integer.toHexString(newColor.blue);
if(c.length()<2) {
- buf.append("0");
+ buf.append("0"); //$NON-NLS-1$
}
buf.append(c);
color = buf.toString();
@@ -73,7 +73,7 @@
protected String createStylePropertyValue() {
if(color!=null && color.trim().length()>0) {
- return "#" + color;
+ return "#" + color; //$NON-NLS-1$
}
return null;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ItalicFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ItalicFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/ItalicFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -20,11 +20,11 @@
*/
public class ItalicFormatController extends ToolItemFormatController {
- public static String TYPE = "ItalicFormat";
+ public static String TYPE = "ItalicFormat"; //$NON-NLS-1$
- private static String STYLE_PROPERTY_NAME = "FONT-STYLE";
- private static String STYLE_PROPERTY_ITALIC_VALUE = "italic";
- private static String STYLE_PROPERTY_NORMAL_VALUE = "normal";
+ private static String STYLE_PROPERTY_NAME = "FONT-STYLE"; //$NON-NLS-1$
+ private static String STYLE_PROPERTY_ITALIC_VALUE = "italic"; //$NON-NLS-1$
+ private static String STYLE_PROPERTY_NORMAL_VALUE = "normal"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/JustifyFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/JustifyFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/JustifyFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -20,7 +20,7 @@
*/
public class JustifyFormatController extends ToolItemFormatController {
- public static String TYPE = "JustifyFormat";
+ public static String TYPE = "JustifyFormat"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/NumberingFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/NumberingFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/NumberingFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -20,7 +20,7 @@
*/
public class NumberingFormatController extends ToolItemFormatController {
- public static String TYPE = "NumberingFormat";
+ public static String TYPE = "NumberingFormat"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/UnderlineFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/UnderlineFormatController.java 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/UnderlineFormatController.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -23,11 +23,11 @@
*/
public class UnderlineFormatController extends ToolItemFormatController {
- public static String TYPE = "UnderlineFormat";
+ public static String TYPE = "UnderlineFormat"; //$NON-NLS-1$
- private static String STYLE_PROPERTY_NAME = "TEXT-DECORATION";
- private static String STYLE_PROPERTY_UNDERLINE_VALUE = "underline";
- private static String STYLE_PROPERTY_NORMAL_VALUE = "none";
+ private static String STYLE_PROPERTY_NAME = "TEXT-DECORATION"; //$NON-NLS-1$
+ private static String STYLE_PROPERTY_UNDERLINE_VALUE = "underline"; //$NON-NLS-1$
+ private static String STYLE_PROPERTY_NORMAL_VALUE = "none"; //$NON-NLS-1$
/**
* @param manager
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 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2009-07-10 06:52:36 UTC (rev 16522)
@@ -62,6 +62,14 @@
public static String CONFIRM_SELECTION_BAR_DIALOG_TOGGLE_MESSAGE;
public static String VPE_UPDATE_JOB_TITLE;
public static String VPE_VISUAL_REFRESH_JOB;
+ public static String VpeExpressionBuilder_ClosingApostropheNotFound;
+ public static String VpeExpressionBuilder_ClosingBracketNotFound;
+ public static String VpeExpressionBuilder_FunctionNotFound;
+ public static String VpeExpressionBuilder_UndefinedCharacter;
+ public static String VpeExpressionBuilder_UndefinedName;
+ public static String VpeExpressionBuilderException_Message;
+ public static String VpeTextPseudoContentCreator_InsertContent;
+ public static String VpeTextPseudoContentCreator_InsertContentFor;
public static String NON_VISUAL_TAGS;
public static String SHOW_NON_VISUAL_TAGS;
public static String HIDE_NON_VISUAL_TAGS;
@@ -71,6 +79,9 @@
public static String HIDE;
public static String TAG_FOR_DISPLAY_IS_NOT_VALID;
public static String TAG_FOR_DISPLAY;
+ public static String MenuCreationHelper_Cut;
+ public static String MenuCreationHelper_Paste;
+ public static String MenuCreationHelper_Test;
public static String TemplatesPreferencePage_Edit;
public static String TemplatesPreferencePage_Remove;
public static String TemplatesTableProvider_Children;
@@ -84,6 +95,11 @@
public static String MAX_VISUAL_PANE;
public static String RESTORE_PREVIOUS_LOCATION;
public static String BACKGROUND_COLOR_TIP;
+ public static String BaseActionManager_InsertAfter;
+ public static String BaseActionManager_InsertAround;
+ public static String BaseActionManager_InsertBefore;
+ public static String BaseActionManager_InsertTag;
+ public static String BaseActionManager_ReplaceWith;
public static String SETUP_TEMPLATE_FOR_MENU;
public static String INSERT_AROUND;
public static String INSERT_BEFORE;
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 2009-07-09 22:40:27 UTC (rev 16521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2009-07-10 06:52:36 UTC (rev 16522)
@@ -41,6 +41,14 @@
CONFIRM_SELECTION_BAR_DIALOG_TOGGLE_MESSAGE=Always hide selection bar without prompt
VPE_UPDATE_JOB_TITLE=Visual Editor View Update
VPE_VISUAL_REFRESH_JOB=Visual Editor Refresh
+VpeExpressionBuilder_ClosingApostropheNotFound=Closing apostrophe is not found
+VpeExpressionBuilder_ClosingBracketNotFound=Closing bracket is not found
+VpeExpressionBuilder_FunctionNotFound=Function ''{0}'' is not found
+VpeExpressionBuilder_UndefinedCharacter=Undefined character ''{0}''
+VpeExpressionBuilder_UndefinedName=Undefined name "{0}"
+VpeExpressionBuilderException_Message=Expression: "{0}" pos={1} {2}
+VpeTextPseudoContentCreator_InsertContent=Insert Content
+VpeTextPseudoContentCreator_InsertContentFor=Insert Content for {0}
SHOW_NON_VISUAL_TAGS=Show non-visual tags
HIDE_NON_VISUAL_TAGS=Hide non-visual tags
SHOW_TOOLBAR=Show {0}
@@ -50,6 +58,9 @@
HIDE=Hide
TAG_FOR_DISPLAY_IS_NOT_VALID=Tag for display is not valid ({0}).
TAG_FOR_DISPLAY=Tag for Display
+ MenuCreationHelper_Cut=Cut
+ MenuCreationHelper_Paste=Paste
+ MenuCreationHelper_Test=Test
TemplatesPreferencePage_Edit=Edit
TemplatesPreferencePage_Remove=Remove
TemplatesTableProvider_Children=Children
@@ -63,6 +74,11 @@
MAX_VISUAL_PANE=Maximize Visual Pane
RESTORE_PREVIOUS_LOCATION=Restore Previous Location
BACKGROUND_COLOR_TIP=Choose background color
+BaseActionManager_InsertAfter=Insert After
+BaseActionManager_InsertAround=Insert Around
+BaseActionManager_InsertBefore=Insert Before
+BaseActionManager_InsertTag=Insert Tag
+BaseActionManager_ReplaceWith=Replace With
SETUP_TEMPLATE_FOR_MENU=Setup Template for <{0}>...
INSERT_AROUND=Around
INSERT_BEFORE=Before
16 years, 9 months