Author: sflanigan
Date: 2009-05-27 02:43:21 -0400 (Wed, 27 May 2009)
New Revision: 15547
Added:
trunk/common/plugins/org.jboss.tools.common.gef/.settings/
trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties
trunk/common/plugins/org.jboss.tools.common.kb/.settings/
trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Added:
trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs 2009-05-27
06:43:21 UTC (rev 15547)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -80,11 +80,11 @@
protected static final int PALETTE_MIN_SIZE = 23;
- private static final QualifiedName PALETTE_SIZE_KEY = new QualifiedName("",
- "palette_size");
+ private static final QualifiedName PALETTE_SIZE_KEY = new QualifiedName("",
//$NON-NLS-1$
+ "palette_size"); //$NON-NLS-1$
- private static final QualifiedName ZOOM_SIZE_KEY = new QualifiedName("",
- "zoom_size");
+ private static final QualifiedName ZOOM_SIZE_KEY = new QualifiedName("",
//$NON-NLS-1$
+ "zoom_size"); //$NON-NLS-1$
protected int lastPaletteLayout = -1;
@@ -460,7 +460,7 @@
return;
}
try {
- String s = "" + fixedSise;
+ String s = "" + fixedSise; //$NON-NLS-1$
file.setPersistentProperty(PALETTE_SIZE_KEY, s);
} catch (CoreException e) {
CommonPlugin.getPluginLog().logError(e);
@@ -492,7 +492,7 @@
return;
}
try {
- String s = "" + zoom;
+ String s = "" + zoom; //$NON-NLS-1$
file.setPersistentProperty(ZOOM_SIZE_KEY, s);
} catch (CoreException e) {
CommonPlugin.getPluginLog().logError(e);
Added:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -0,0 +1,19 @@
+package org.jboss.tools.common.gef;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.tools.common.gef.messages"; //$NON-NLS-1$
+ public static String DefaultPaletteCustomizer_ErrorMessage;
+ public static String DiagramCopyAction_AcceleratorText;
+ public static String DiagramCutAction_AcceleratorText;
+ public static String DiagramPasteAction_AcceleratorText;
+ public static String PrintRetargetAction_Name;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -79,7 +79,7 @@
}
public void contributeGEFToToolBar(IToolBarManager tbm) {
- tbm.add(getAction("Print_Diagram"));
+ tbm.add(getAction(PrintRetargetAction.ACTION_ID));
tbm.add(new Separator());
tbm.add(getAction(GEFActionConstants.ALIGN_LEFT));
tbm.add(getAction(GEFActionConstants.ALIGN_CENTER));
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -15,6 +15,7 @@
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.gef.internal.GEFMessages;
+import org.jboss.tools.common.gef.Messages;
/**
@@ -43,7 +44,7 @@
setDisabledImageDescriptor(
WorkbenchImages.getImageDescriptor(
ISharedImages.IMG_TOOL_COPY_DISABLED));
- setAccelerator(convertAccelerator("CTRL+C"));
+ setAccelerator(convertAccelerator(Messages.DiagramCopyAction_AcceleratorText));
setEnabled(false);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -14,6 +14,7 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.WorkbenchImages;
+import org.jboss.tools.common.gef.Messages;
public abstract class DiagramCutAction extends DiagramSelectionAction {
@@ -38,7 +39,7 @@
setDisabledImageDescriptor(
WorkbenchImages.getImageDescriptor(
ISharedImages.IMG_TOOL_CUT_DISABLED));
- setAccelerator(convertAccelerator("CTRL+X"));
+ setAccelerator(convertAccelerator(Messages.DiagramCutAction_AcceleratorText));
setEnabled(false);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -15,6 +15,7 @@
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.gef.internal.GEFMessages;
+import org.jboss.tools.common.gef.Messages;
/**
* An action to delete selected objects.
@@ -43,7 +44,7 @@
setDisabledImageDescriptor(
WorkbenchImages.getImageDescriptor(
ISharedImages.IMG_TOOL_PASTE_DISABLED));
- setAccelerator(convertAccelerator("CTRL+V"));
+ setAccelerator(convertAccelerator(Messages.DiagramPasteAction_AcceleratorText));
setEnabled(false);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -13,15 +13,18 @@
import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.common.gef.Messages;
public class PrintRetargetAction extends RetargetAction{
+ static final String ACTION_ID = "Print_Diagram"; //$NON-NLS-1$
+
public PrintRetargetAction() {
- super("Print_Diagram","Print Diagram");
- setToolTipText("Print Diagram");
- setImageDescriptor(ImageDescriptor.createFromFile(getClass(),
"icons/print.gif"));
+ super(ACTION_ID,Messages.PrintRetargetAction_Name);
+ setToolTipText(Messages.PrintRetargetAction_Name);
+ setImageDescriptor(ImageDescriptor.createFromFile(getClass(),
"icons/print.gif")); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -17,6 +17,7 @@
import org.eclipse.gef.ui.palette.customize.DefaultEntryPage;
import org.eclipse.gef.ui.palette.customize.DrawerEntryPage;
import org.eclipse.gef.ui.palette.customize.EntryPage;
+import org.jboss.tools.common.gef.Messages;
/**
*
@@ -25,7 +26,7 @@
*/
public class DefaultPaletteCustomizer extends PaletteCustomizer {
- protected static final String ERROR_MESSAGE = "Error";
+ protected static final String ERROR_MESSAGE =
Messages.DefaultPaletteCustomizer_ErrorMessage;
/**
* @see org.eclipse.gef.ui.palette.PaletteCustomizer#getPropertiesPage(PaletteEntry)
Added:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties 2009-05-27
06:43:21 UTC (rev 15547)
@@ -0,0 +1,5 @@
+DefaultPaletteCustomizer_ErrorMessage=Error
+DiagramCopyAction_AcceleratorText=CTRL+C
+DiagramCutAction_AcceleratorText=CTRL+X
+DiagramPasteAction_AcceleratorText=CTRL+V
+PrintRetargetAction_Name=Print Diagram
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -41,8 +41,8 @@
public class DiagramContentOutlinePage extends ContentOutlinePage implements IAdaptable
{
//Warning: these icons may be moved from xpl!
- private static String OUTLINE_ICON_PATH = "outline.gif";
- private static String OVERVIEW_ICON_PATH = "overview.gif";
+ private static String OUTLINE_ICON_PATH = "outline.gif"; //$NON-NLS-1$
+ private static String OVERVIEW_ICON_PATH = "overview.gif"; //$NON-NLS-1$
private org.eclipse.ui.views.contentoutline.ContentOutlinePage poutline;
private GraphicalViewer graphicalViewer;
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -25,7 +25,7 @@
private static final int SASH_WIDTH = 5;
private static final int FIXED_DRAG_MINIMUM = 62;
private static final int OTHER_DRAG_MINIMUM = 0;
- private static final String MAINTAIN_SIZE = "maintain size";
+ private static final String MAINTAIN_SIZE = "maintain size"; //$NON-NLS-1$
private int fixedSize = 150;
private int fixedDragMinimum;
Added:
trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs 2009-05-27
06:43:21 UTC (rev 15547)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -19,19 +19,19 @@
*/
public interface KbDinamicResource extends KbResource {
- String BUNDLE_PROPERTY_TYPE = "bundleProperty";
- String BEAN_PROPERTY_TYPE = "beanProperty";
- String BEAN_METHOD_BY_SYGNATURE_TYPE = "beanMethodBySignature";
- String JSP_PATH_TYPE = "jspPath";
- String BUNDLE_NAME_TYPE = "bundleName";
- String VIEW_ACTIONS_TYPE = "viewActions";
- String IMAGE_FILE_TYPE = "file";
- String ENUMERATION_TYPE = "enumeration";
- String JSF_VARIABLES_TYPE = "jsfVariables";
- String FACELETS_JSFC_TYPE = "faceletsJsfCTags";
- String MANAGED_BEAN_NAME_TYPE = "managedBeanName";
- String JSF_ID = "jsfID";
- String TAGLIB_TYPE = "taglib";
+ String BUNDLE_PROPERTY_TYPE = "bundleProperty"; //$NON-NLS-1$
+ String BEAN_PROPERTY_TYPE = "beanProperty"; //$NON-NLS-1$
+ String BEAN_METHOD_BY_SYGNATURE_TYPE = "beanMethodBySignature"; //$NON-NLS-1$
+ String JSP_PATH_TYPE = "jspPath"; //$NON-NLS-1$
+ String BUNDLE_NAME_TYPE = "bundleName"; //$NON-NLS-1$
+ String VIEW_ACTIONS_TYPE = "viewActions"; //$NON-NLS-1$
+ String IMAGE_FILE_TYPE = "file"; //$NON-NLS-1$
+ String ENUMERATION_TYPE = "enumeration"; //$NON-NLS-1$
+ String JSF_VARIABLES_TYPE = "jsfVariables"; //$NON-NLS-1$
+ String FACELETS_JSFC_TYPE = "faceletsJsfCTags"; //$NON-NLS-1$
+ String MANAGED_BEAN_NAME_TYPE = "managedBeanName"; //$NON-NLS-1$
+ String JSF_ID = "jsfID"; //$NON-NLS-1$
+ String TAGLIB_TYPE = "taglib"; //$NON-NLS-1$
/**
* Sets a parameter for resource.
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -31,7 +31,7 @@
try {
return new DocumentBuilderCreator().createDocumentBuilder(validating);
} catch (InterruptedException t) {
- KbPlugin.getPluginLog().logError("Cannot create document builder.", t);
+ KbPlugin.getPluginLog().logError("Cannot create document builder.", t);
//$NON-NLS-1$
return null;
}
}
@@ -58,8 +58,8 @@
if(!validate) {
documentBuilder.setEntityResolver(new EntityResolver() {
public InputSource resolveEntity(java.lang.String publicId, java.lang.String
systemId) throws SAXException, java.io.IOException {
- if((systemId != null) &&
systemId.toLowerCase().endsWith(".dtd")) { // this deactivates DTD
- return new InputSource(new ByteArrayInputStream("<?xml
version='1.0' encoding='UTF-8'?>".getBytes()));
+ if((systemId != null) &&
systemId.toLowerCase().endsWith(".dtd")) { // this deactivates DTD
//$NON-NLS-1$
+ return new InputSource(new ByteArrayInputStream("<?xml
version='1.0' encoding='UTF-8'?>".getBytes())); //$NON-NLS-1$
} else {
return null;
}
@@ -67,7 +67,7 @@
});
}
} catch (ParserConfigurationException t) {
- KbPlugin.getPluginLog().logError("Document builder creation failed.", t);
+ KbPlugin.getPluginLog().logError("Document builder creation failed.", t);
//$NON-NLS-1$
}
}
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -127,7 +127,7 @@
String strQuery = cleanQuery(query);
if(strQuery == null) {
- String errorMessage = "ERROR: Bad query: \"" + query.getQuery() +
"\". Query must starts with \"" + KbQuery.TAG_SEPARATOR +
"\"";
+ String errorMessage = "ERROR: Bad query: \"" + query.getQuery() +
"\". Query must starts with \"" + KbQuery.TAG_SEPARATOR +
"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// KbPlugin.log(errorMessage);
throw new IllegalArgumentException(errorMessage);
}
@@ -138,7 +138,7 @@
int lastTagSeparator = strQuery.lastIndexOf(KbQuery.TAG_SEPARATOR);
String firstTag = null;
- String tagMask = "";
+ String tagMask = ""; //$NON-NLS-1$
if(lastTagSeparator > firstTagSeparator) {
firstTag = strQuery.substring(firstTagSeparator + KbQuery.TAG_SEPARATOR.length(),
lastTagSeparator);
if(lastTagSeparator + KbQuery.TAG_SEPARATOR.length() < strQuery.length()) {
@@ -237,18 +237,18 @@
private KbProposal getEndTagProposal(KbQuery kbQuery) {
String query = kbQuery.getQuery();
- String mask = "";
+ String mask = ""; //$NON-NLS-1$
int lastSeparator = query.lastIndexOf(KbQuery.TAG_SEPARATOR);
if((lastSeparator!=-1)&&(lastSeparator +
KbQuery.TAG_SEPARATOR.length()<query.length())) {
mask = query.substring(lastSeparator + KbQuery.TAG_SEPARATOR.length());
}
String lastTag = kbQuery.getLastTag();
- if((lastTag !=
null)&&(((mask.indexOf(KbQuery.DONT_FILTER_END_TAG_CHAR)!=-1)&&(KbQuery.DONT_FILTER_END_TAG_CHAR
+ lastTag).startsWith(mask))||(mask.equals("")))) {
+ if((lastTag !=
null)&&(((mask.indexOf(KbQuery.DONT_FILTER_END_TAG_CHAR)!=-1)&&(KbQuery.DONT_FILTER_END_TAG_CHAR
+ lastTag).startsWith(mask))||(mask.equals("")))) { //$NON-NLS-1$
if(checkNonRefusedEndTag(lastTag)) {
KbProposal proposal = new KbProposal();
- proposal.setLabel("/" + lastTag);
- proposal.setReplacementString("/" + lastTag);
+ proposal.setLabel("/" + lastTag); //$NON-NLS-1$
+ proposal.setReplacementString("/" + lastTag); //$NON-NLS-1$
return proposal;
}
}
@@ -338,7 +338,7 @@
String tagName = tagMask.substring(0, startAttributeName);
startAttributeName+=KbQuery.ATTRIBUTE_SEPARATOR.length();
if(startAttributeName == tagMask.length()) {
- return getAttributes(tagName, "");
+ return getAttributes(tagName, ""); //$NON-NLS-1$
}
int startAttributeValue = tagMask.indexOf(KbQuery.ENUMERATION_SEPARATOR);
@@ -349,15 +349,15 @@
String attributeName = tagMask.substring(startAttributeName, startAttributeValue);
startAttributeValue+=KbQuery.ENUMERATION_SEPARATOR.length();
if(startAttributeValue == tagMask.length()) {
- return getEnumeration(tagName, attributeName, "");
+ return getEnumeration(tagName, attributeName, ""); //$NON-NLS-1$
}
return getEnumeration(tagName, attributeName,
KbQuery.decode(tagMask.substring(startAttributeValue)));
}
private synchronized boolean activateHtmlSchema() {
- String ERR_CANNNOT_LOAD_SCHEME = "Can't load HTML schema
''{0}''"; //$NON-NLS-N$
- String ERR_EXCEPTION_DURING_PARSING = "Exception happend during parsing
''{0}''"; //$NON-NLS-N$
+ String ERR_CANNNOT_LOAD_SCHEME = "Can't load HTML schema
''{0}''"; //$NON-NLS-1$
+ String ERR_EXCEPTION_DURING_PARSING = "Exception happend during parsing
''{0}''"; //$NON-NLS-1$
if(htmlSchemaIsActivating()) {
return false;
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -29,7 +29,7 @@
*/
public class KbPlugin extends BaseUIPlugin {
- public static final String PLUGIN_ID = "org.jboss.tools.common.kb";
+ public static final String PLUGIN_ID = "org.jboss.tools.common.kb";
//$NON-NLS-1$
private File location;
// The shared instance
@@ -38,7 +38,7 @@
// A Map to save a descriptor for each image
private HashMap fImageDescRegistry = null;
- public static final String CA_ENUMERATION_IMAGE_PATH =
"images/ca/icons_Enumeration.gif";
+ public static final String CA_ENUMERATION_IMAGE_PATH =
"images/ca/icons_Enumeration.gif"; //$NON-NLS-1$
public KbPlugin() {
}
@@ -61,7 +61,7 @@
if(!isLocationSet) {
try {
isLocationSet = true;
- location = new
File(FileLocator.resolve(KbPlugin.getDefault().getBundle().getEntry("/")).getPath());
+ location = new
File(FileLocator.resolve(KbPlugin.getDefault().getBundle().getEntry("/")).getPath());
//$NON-NLS-1$
} catch (IOException e) {
getPluginLog().logError(e);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -192,7 +192,7 @@
* @return
*/
public boolean isCloseTag() {
- return label != null && label.startsWith("/");
+ return label != null && label.startsWith("/"); //$NON-NLS-1$
}
/**
@@ -200,11 +200,11 @@
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
- buffer.append("label: ");
+ buffer.append("label: "); //$NON-NLS-1$
buffer.append(label);
- buffer.append("\ncontextInfo: ");
+ buffer.append("\ncontextInfo: "); //$NON-NLS-1$
buffer.append(contextInfo);
- buffer.append("\nreplacementString: ");
+ buffer.append("\nreplacementString: "); //$NON-NLS-1$
buffer.append(replacementString);
return buffer.toString();
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -21,17 +21,17 @@
*/
public class KbQuery {
- public static final String XML_DECLARATION_QUERY = "?";
- public static final String TAG_SEPARATOR = "/";
- public static final String ATTRIBUTE_SEPARATOR = "@";
- public static final String PREFIX_SEPARATOR = ":";
- public static final String ENUMERATION_SEPARATOR = "=";
- public static final String DONT_FILTER_END_TAG_CHAR = "^";
- public static final String JSP_DIRECTIVE_QUERY = "@";
+ public static final String XML_DECLARATION_QUERY = "?"; //$NON-NLS-1$
+ public static final String TAG_SEPARATOR = "/"; //$NON-NLS-1$
+ public static final String ATTRIBUTE_SEPARATOR = "@"; //$NON-NLS-1$
+ public static final String PREFIX_SEPARATOR = ":"; //$NON-NLS-1$
+ public static final String ENUMERATION_SEPARATOR = "="; //$NON-NLS-1$
+ public static final String DONT_FILTER_END_TAG_CHAR = "^"; //$NON-NLS-1$
+ public static final String JSP_DIRECTIVE_QUERY = "@"; //$NON-NLS-1$
private static final char START_CODE_CHAR = '%';
private static final char END_CODE_CHAR = ';';
- private String query = "";
+ private String query = ""; //$NON-NLS-1$
private Collection resources = new ArrayList();
private Collection dinamicResources = new ArrayList();
@@ -75,11 +75,11 @@
*/
public String toString() {
StringBuffer result = new StringBuffer();
- result.append("Query string = [");
+ result.append("Query string = ["); //$NON-NLS-1$
result.append(query);
- result.append("]; Resources size = [");
+ result.append("]; Resources size = ["); //$NON-NLS-1$
result.append(resources.size());
- result.append("];");
+ result.append("];"); //$NON-NLS-1$
return result.toString();
}
@@ -144,8 +144,8 @@
return str;
}
StringBuffer result = new StringBuffer(str.length());
- StringTokenizer st = new StringTokenizer(str, "" + START_CODE_CHAR, false);
- if((!str.startsWith("" + START_CODE_CHAR))&&(st.hasMoreElements()))
{
+ StringTokenizer st = new StringTokenizer(str, "" + START_CODE_CHAR, false);
//$NON-NLS-1$
+ if((!str.startsWith("" + START_CODE_CHAR))&&(st.hasMoreElements())) {
//$NON-NLS-1$
result.append(st.nextElement());
}
while(st.hasMoreElements()) {
@@ -160,7 +160,7 @@
result.append(s.substring(endCode));
}
} catch(NumberFormatException e) {
- String message = "ERROR: can't decode string=" + s;
+ String message = "ERROR: can't decode string=" + s; //$NON-NLS-1$
KbPlugin.getPluginLog().logError(message, e);
}
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -105,7 +105,7 @@
String name = attributeType.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
attributes.append(' ');
attributes.append(name);
- attributes.append("=\"");
+ attributes.append("=\""); //$NON-NLS-1$
attributes.append('"');
}
return attributes.toString();
@@ -173,7 +173,7 @@
}
}
}
- return "";
+ return ""; //$NON-NLS-1$
}
/**
@@ -209,9 +209,9 @@
attributesD.remove(typeLow);
attributesI.add(typeLow);
} else if(attributesI.contains(typeLow)) {
- KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type +
" is declared more than once in element " + elementName + ".");
+ KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type +
" is declared more than once in element " + elementName + ".");
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else if(!attributesI.contains(typeLow)) {
- KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type +
" is never used by an attribute in element " + elementName + ".");
+ KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type +
" is never used by an attribute in element " + elementName + ".");
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
@@ -236,7 +236,7 @@
Iterator it = attributesD.iterator();
while(it.hasNext()) {
String a = it.next().toString();
- KbPlugin.getPluginLog().logWarning("Warning: attribute type is not defined for
attribute " + a + " in element " + elementName + ".");
+ KbPlugin.getPluginLog().logWarning("Warning: attribute type is not defined for
attribute " + a + " in element " + elementName + ".");
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -39,16 +39,16 @@
*/
public class KbTldConvertor implements KbSchemaConvertor {
- private final static String TAG_ELEMENT_NAME = "tag";
- private final static String NAME_ELEMENT_NAME = "name";
- private final static String DESCRIPTION_ELEMENT_NAME = "description";
- private final static String ATTRIBUTE_ELEMENT_NAME = "attribute";
- private final static String REQUIRED_ELEMENT_NAME = "required";
- private final static String BODYCONTENT_ELEMENT_NAME_1_1 = "bodycontent";
- private final static String BODYCONTENT_ELEMENT_NAME_1_2 = "body-content";
- private final static String EMPTY_BODYCONTENT_TYPE = "empty";
- private final static String SHORT_NAME_1_1 = "shortname";
- private final static String SHORT_NAME_1_2 = "short-name";
+ private final static String TAG_ELEMENT_NAME = "tag"; //$NON-NLS-1$
+ private final static String NAME_ELEMENT_NAME = "name"; //$NON-NLS-1$
+ private final static String DESCRIPTION_ELEMENT_NAME = "description";
//$NON-NLS-1$
+ private final static String ATTRIBUTE_ELEMENT_NAME = "attribute";
//$NON-NLS-1$
+ private final static String REQUIRED_ELEMENT_NAME = "required"; //$NON-NLS-1$
+ private final static String BODYCONTENT_ELEMENT_NAME_1_1 = "bodycontent";
//$NON-NLS-1$
+ private final static String BODYCONTENT_ELEMENT_NAME_1_2 = "body-content";
//$NON-NLS-1$
+ private final static String EMPTY_BODYCONTENT_TYPE = "empty"; //$NON-NLS-1$
+ private final static String SHORT_NAME_1_1 = "shortname"; //$NON-NLS-1$
+ private final static String SHORT_NAME_1_2 = "short-name"; //$NON-NLS-1$
private static final KbTldConvertor INSTANCE = new KbTldConvertor();
@@ -76,11 +76,11 @@
if(resource instanceof KbTldResource) {
tldResource = (KbTldResource)resource;
} else {
- throw new IllegalArgumentException("KbTldConvertor.convertToSchema(KbResource
resource): resource must be instance of KbTldResource");
+ throw new IllegalArgumentException("KbTldConvertor.convertToSchema(KbResource
resource): resource must be instance of KbTldResource"); //$NON-NLS-1$
}
Properties attributes = new Properties();
attributes.put(SchemaNodeFactory.LOCATION_ATTRIBUTE, tldResource.getTldLocation());
- attributes.put(SchemaNodeFactory.JSF_ATTRIBUTE, "" +
tldResource.isJsfResource());
+ attributes.put(SchemaNodeFactory.JSF_ATTRIBUTE, "" +
tldResource.isJsfResource()); //$NON-NLS-1$
if(tldResource.getUri()!=null) {
attributes.put(SchemaNodeFactory.URI_ATTRIBUTE, tldResource.getUri());
}
@@ -89,7 +89,7 @@
InputStream is = tldResource.getInputStream();
if(is==null) {
if(KbPlugin.isDebugEnabled()) {
- KbPlugin.getPluginLog().logWarning(" WARNING! Can't get InputSource from
resource (location: " + tldResource.getTldLocation() + ").");
+ KbPlugin.getPluginLog().logWarning(" WARNING! Can't get InputSource from
resource (location: " + tldResource.getTldLocation() + ")."); //$NON-NLS-1$
//$NON-NLS-2$
}
return null;
}
@@ -145,7 +145,7 @@
*/
public Document convertToSchema(InputStream inputStream, Properties attributes, boolean
jsfTld) {
- final String ERR_CANNOT_PARSE_TLD = "ERROR: Can't parse TLD file for
converting to the Schema."; //$NON-NLS-N$
+ final String ERR_CANNOT_PARSE_TLD = "ERROR: Can't parse TLD file for
converting to the Schema."; //$NON-NLS-1$
Document tldDocument = null;
Document schema = null;
@@ -235,7 +235,7 @@
Element attributeType =
SchemaNodeFactory.getInstance().createAttributeType(schemaElement, attributes);
SchemaNodeFactory.getInstance().createDescription(attributeType, description);
- if(jsfTld ||
tldAttribute.getElementsByTagName("deferred-value").getLength()>0) {
+ if(jsfTld ||
tldAttribute.getElementsByTagName("deferred-value").getLength()>0) {
//$NON-NLS-1$
// Add default proposals
Element[] proposals = createDefaultELProposals(schemaElement.getOwnerDocument());
for(int i=0; i<proposals.length; i++) {
@@ -259,19 +259,19 @@
String methodName = null;
Element proposal = null;
ArrayList<String> paramTypes = new ArrayList<String>();
- StringTokenizer st = new StringTokenizer(signature.trim(), " ()", false);
+ StringTokenizer st = new StringTokenizer(signature.trim(), " ()", false);
//$NON-NLS-1$
if(st.hasMoreTokens()) {
- returnType = st.nextToken(" ");
+ returnType = st.nextToken(" "); //$NON-NLS-1$
if(st.hasMoreTokens()) {
- methodName = st.nextToken("(");
+ methodName = st.nextToken("("); //$NON-NLS-1$
if(methodName!=null) {
methodName = methodName.trim();
}
}
if(st.hasMoreTokens()) {
- String params = st.nextToken("()");
+ String params = st.nextToken("()"); //$NON-NLS-1$
if(params!=null) {
- StringTokenizer stParams = new StringTokenizer(params, ",", false);
+ StringTokenizer stParams = new StringTokenizer(params, ",", false);
//$NON-NLS-1$
while(stParams.hasMoreTokens()) {
String param = stParams.nextToken().trim();
if(param.length()>0) {
@@ -283,17 +283,17 @@
}
if(returnType!=null && methodName!=null) {
- proposal = document.createElement("proposal");
- proposal.setAttribute("type", "beanMethodBySignature");
- Element param = document.createElement("param");
- param.setAttribute("name", "returnType");
- param.setAttribute("value", returnType);
+ proposal = document.createElement("proposal"); //$NON-NLS-1$
+ proposal.setAttribute("type", "beanMethodBySignature");
//$NON-NLS-1$ //$NON-NLS-2$
+ Element param = document.createElement("param"); //$NON-NLS-1$
+ param.setAttribute("name", "returnType"); //$NON-NLS-1$
//$NON-NLS-2$
+ param.setAttribute("value", returnType); //$NON-NLS-1$
proposal.appendChild(param);
for(int i=0; i<paramTypes.size(); i++) {
- param = document.createElement("param");
- param.setAttribute("name", "paramType");
- param.setAttribute("value", paramTypes.get(i).toString());
+ param = document.createElement("param"); //$NON-NLS-1$
+ param.setAttribute("name", "paramType"); //$NON-NLS-1$
//$NON-NLS-2$
+ param.setAttribute("value", paramTypes.get(i).toString()); //$NON-NLS-1$
proposal.appendChild(param);
}
}
@@ -302,23 +302,23 @@
}
private Element[] createDefaultELProposals(Document document) {
- Element jsfBeanProperty = document.createElement("proposal");
- jsfBeanProperty.setAttribute("type", "beanProperty");
+ Element jsfBeanProperty = document.createElement("proposal"); //$NON-NLS-1$
+ jsfBeanProperty.setAttribute("type", "beanProperty"); //$NON-NLS-1$
//$NON-NLS-2$
- Element jsfBundleProperty = document.createElement("proposal");
- jsfBundleProperty.setAttribute("type", "bundleProperty");
+ Element jsfBundleProperty = document.createElement("proposal");
//$NON-NLS-1$
+ jsfBundleProperty.setAttribute("type", "bundleProperty");
//$NON-NLS-1$ //$NON-NLS-2$
- Element jsfVariables = document.createElement("proposal");
- jsfVariables.setAttribute("type", "jsfVariables");
+ Element jsfVariables = document.createElement("proposal"); //$NON-NLS-1$
+ jsfVariables.setAttribute("type", "jsfVariables"); //$NON-NLS-1$
//$NON-NLS-2$
return new Element[]{jsfBeanProperty, jsfBundleProperty, jsfVariables};
}
private static String getDeferredMethodSignature(Element tldAttribute) {
- NodeList deferredMethods =
tldAttribute.getElementsByTagName("deferred-method");
+ NodeList deferredMethods =
tldAttribute.getElementsByTagName("deferred-method"); //$NON-NLS-1$
for(int i=0; i<deferredMethods.getLength(); i++) {
Element deferredMethod = (Element)deferredMethods.item(i);
- return getChildElementBody(deferredMethod, "method-signature");
+ return getChildElementBody(deferredMethod, "method-signature");
//$NON-NLS-1$
}
return null;
}
@@ -377,7 +377,7 @@
}
return sb.toString();
} else {
- return "";
+ return ""; //$NON-NLS-1$
}
}
@@ -414,8 +414,8 @@
* @return
*/
public OutputFormat createOutputFormat() {
- OutputFormat format = new OutputFormat("xml", "UTF-8", true);
- format.setLineSeparator("\r\n");
+ OutputFormat format = new OutputFormat("xml", "UTF-8", true);
//$NON-NLS-1$ //$NON-NLS-2$
+ format.setLineSeparator("\r\n"); //$NON-NLS-1$
format.setIndent(4);
return format;
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -107,13 +107,13 @@
}
private InputStream getInputStreamFromTldLocation() {
- final String ERR_TLD_FILE_DOSENT_EXIST = "ERROR: TLD file ''{0}''
doesn't exist!";
+ final String ERR_TLD_FILE_DOSENT_EXIST = "ERROR: TLD file ''{0}''
doesn't exist!"; //$NON-NLS-1$
InputStream is = null;
if (tldLocation == null) {
return null;
}
try {
- if (tldLocation.indexOf(":/") < 2) {
+ if (tldLocation.indexOf(":/") < 2) { //$NON-NLS-1$
File file = new File(tldLocation);
if (!file.exists()) {
return null;
@@ -121,7 +121,7 @@
is = new BufferedInputStream(new FileInputStream(file));
} else {
URL url = new URL(tldLocation);
- if("jar".equals(url.getProtocol()) ||
"file".equals(url.getProtocol())) {
+ if("jar".equals(url.getProtocol()) ||
"file".equals(url.getProtocol())) { //$NON-NLS-1$ //$NON-NLS-2$
is = url.openStream(); // Bug 8385 -fixed
}
}
@@ -308,17 +308,17 @@
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
- buffer.append("[TLDlocation=\"");
+ buffer.append("[TLDlocation=\""); //$NON-NLS-1$
buffer.append(tldLocation);
- buffer.append("\" SchemaLocation=\"");
+ buffer.append("\" SchemaLocation=\""); //$NON-NLS-1$
buffer.append(schemaLocation);
- buffer.append("\"");
- buffer.append(" Prefixes=\"");
+ buffer.append("\""); //$NON-NLS-1$
+ buffer.append(" Prefixes=\""); //$NON-NLS-1$
buffer.append(prefixes);
- buffer.append("\"");
- buffer.append(" uri=\"");
+ buffer.append("\""); //$NON-NLS-1$
+ buffer.append(" uri=\""); //$NON-NLS-1$
buffer.append(uri);
- buffer.append("\"]");
+ buffer.append("\"]"); //$NON-NLS-1$
return buffer.toString();
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -149,7 +149,7 @@
String key = needResources.hashCode() + cleanQuary;
- boolean faceletsHtml = cleanQuary.indexOf("0fHP:")>-1;
+ boolean faceletsHtml = cleanQuary.indexOf("0fHP:")>-1; //$NON-NLS-1$
Object o =
faceletsHtml?getFaceletsHtmlTagInfoCache().get(key):getTagInfoCache().get(key);
if(o!=null) {
return (TagDescriptor)o;
@@ -254,7 +254,7 @@
}
if(strQuery.length() == KbQuery.TAG_SEPARATOR.length()) {
- return getTags(needResources, "");
+ return getTags(needResources, ""); //$NON-NLS-1$
}
int startTagName = strQuery.indexOf(KbQuery.PREFIX_SEPARATOR);
@@ -268,7 +268,7 @@
if(startAttributeName < 0){
String tagName = strQuery.substring(startTagName);
boolean tagMask = true;
- if(tagName.endsWith("/")) {
+ if(tagName.endsWith("/")) { //$NON-NLS-1$
tagMask = false;
tagName = tagName.substring(0, tagName.length()-1);
}
@@ -282,7 +282,7 @@
String tagName = strQuery.substring(startTagName, startAttributeName);
startAttributeName+=KbQuery.ATTRIBUTE_SEPARATOR.length();
if(startAttributeName == strQuery.length()) {
- return getAttributes(needResources, prefixName, tagName, "");
+ return getAttributes(needResources, prefixName, tagName, ""); //$NON-NLS-1$
}
int startAttributeValue = strQuery.indexOf(KbQuery.ENUMERATION_SEPARATOR);
@@ -296,7 +296,7 @@
// Collection needDinamicResources =
convertQueryDinamicResourceToRegistretedDinamicResource(query.getDinamicResources());
Collection needDinamicResources = query.getDinamicResources();
if(startAttributeValue == strQuery.length()) {
- return getAttributeValue(needResources, needDinamicResources, prefixName, tagName,
attributeName, "");
+ return getAttributeValue(needResources, needDinamicResources, prefixName, tagName,
attributeName, ""); //$NON-NLS-1$
}
return getAttributeValue(needResources, needDinamicResources, prefixName, tagName,
attributeName, KbQuery.decode(strQuery.substring(startAttributeValue)));
@@ -366,7 +366,7 @@
// return registerDinamicResource((KbDinamicResource)resource);
return (KbDinamicResource)resource;
} else {
- throw new IllegalArgumentException("KbTldStore.registerResource(KbResource
resource): resource must be instance of KbTldResource or KbDinamicResource");
+ throw new IllegalArgumentException("KbTldStore.registerResource(KbResource
resource): resource must be instance of KbTldResource or KbDinamicResource");
//$NON-NLS-1$
}
}
@@ -445,7 +445,7 @@
// TODO Stop loading and registration resource
}
} else {
- throw new IllegalArgumentException("KbTldStore.unregisterResource(KbResource
resource): resource must be instance of KbTldResource or KbDinamicResource");
+ throw new IllegalArgumentException("KbTldStore.unregisterResource(KbResource
resource): resource must be instance of KbTldResource or KbDinamicResource");
//$NON-NLS-1$
}
}
@@ -566,7 +566,7 @@
File schemaLocation = regResource.getSchemaLocation();
if((schemaLocation == null)||(!schemaLocation.exists())) {
if(KbPlugin.isDebugEnabled()) {
- KbPlugin.getPluginLog().logWarning("WARNING: Schema (location: " +
schemaLocation + ") for resource (" + regResource +") does not
exist!");
+ KbPlugin.getPluginLog().logWarning("WARNING: Schema (location: " +
schemaLocation + ") for resource (" + regResource +") does not
exist!"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return;
}
@@ -616,23 +616,23 @@
private void loadRegistratedResources() {
// Get the schemas from extention point.
IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint =
registry.getExtensionPoint("org.jboss.tools.common.kb.tldResource");
+ IExtensionPoint extensionPoint =
registry.getExtensionPoint("org.jboss.tools.common.kb.tldResource");
//$NON-NLS-1$
IExtension[] extensions = extensionPoint.getExtensions();
for (int i=0; i<extensions.length; i++) {
IExtension extension = extensions[i];
IConfigurationElement[] elements = extension.getConfigurationElements();
for(int j=0; j<elements.length; j++) {
- String uri = elements[j].getAttribute("uri");
- String location = elements[j].getAttribute("schema-location");
- String version = elements[j].getAttribute("version");
- String jsf = elements[j].getAttribute("jsf");
+ String uri = elements[j].getAttribute("uri"); //$NON-NLS-1$
+ String location = elements[j].getAttribute("schema-location");
//$NON-NLS-1$
+ String version = elements[j].getAttribute("version"); //$NON-NLS-1$
+ String jsf = elements[j].getAttribute("jsf"); //$NON-NLS-1$
if(uri==null || uri.length()==0 || location==null || location.length()==0) {
continue;
}
Bundle sourcePlugin = Platform.getBundle(elements[j].getNamespaceIdentifier());
File shemaLocation = null;
try {
- shemaLocation = new
File(FileLocator.resolve(sourcePlugin.getEntry("/")).getPath(), location);
+ shemaLocation = new
File(FileLocator.resolve(sourcePlugin.getEntry("/")).getPath(), location);
//$NON-NLS-1$
} catch (IOException e) {
KbPlugin.getPluginLog().logError(e);
continue;
@@ -644,10 +644,10 @@
resource.setVersion(version);
}
resource.setCustomTld(false);
- resource.setJsfResource("true".equals(jsf));
+ resource.setJsfResource("true".equals(jsf)); //$NON-NLS-1$
registratedResources.put(resource, resource);
} else {
- String message = "Can't load KB schema: " + shemaLocation;
+ String message = "Can't load KB schema: " + shemaLocation;
//$NON-NLS-1$
KbPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, KbPlugin.PLUGIN_ID,
IStatus.WARNING, message, null));
}
}
@@ -677,10 +677,10 @@
continue;
}
} catch (IOException e) {
- KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID,
IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")",
e));
+ KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID,
IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")",
e)); //$NON-NLS-1$ //$NON-NLS-2$
continue;
} catch (SAXException e) {
- KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID,
IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")",
e));
+ KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID,
IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")",
e)); //$NON-NLS-1$ //$NON-NLS-2$
continue;
}
// String tldLocation = schemas[i].getAbsolutePath();
@@ -704,7 +704,7 @@
resource.setTldContent(tldContent);
resource.setSchemaLocation(schemas[i]);
resource.setCustomTld(true);
- resource.setJsfResource("true".equals(jsf));
+ resource.setJsfResource("true".equals(jsf)); //$NON-NLS-1$
registratedResources.put(resource, resource);
}
}
@@ -713,7 +713,7 @@
* @return
*/
public KbResource getJspResource() {
- return getRegistratedResource(new
KbTldResource("http://java.sun.com/JSP/Page", "", "jsp",
null));
+ return getRegistratedResource(new
KbTldResource("http://java.sun.com/JSP/Page", "", "jsp",
null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
private ArrayList<KbProposal> getTags(Collection resources, String prefixMask) {
@@ -818,14 +818,14 @@
boolean ignoreCase = false;
String attr =
element.getOwnerDocument().getDocumentElement().getAttribute(SchemaNodeFactory.IGNORE_CASE_ATTRIBUTE);
- ignoreCase = attr!=null && attr.equals("true");
+ ignoreCase = attr!=null && attr.equals("true"); //$NON-NLS-1$
ArrayList attributeTypes = KbSchemaUtil.getAttributeTypes(element);
for(int i=0; i<attributeTypes.size(); i++) {
Element attributeType = (Element)attributeTypes.get(i);
String attributeTypeName =
attributeType.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
- boolean endsWithWildCard = attributeTypeName.endsWith("" +
SchemaNodeFactory.WILD_CARD_CHAR);
+ boolean endsWithWildCard = attributeTypeName.endsWith("" +
SchemaNodeFactory.WILD_CARD_CHAR); //$NON-NLS-1$
if(endsWithWildCard) {
attributeTypeName = attributeTypeName.substring(0, attributeTypeName.length() - 1);
}
@@ -868,7 +868,7 @@
String label = element.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
if(label == null || label.indexOf(SchemaNodeFactory.WILD_CARD_CHAR) >= 0)
continue;
- String endTag =
SchemaNodeFactory.REFUSED_BODY_CONTENT_TYPE.equals(element.getAttribute(SchemaNodeFactory.BODY_CONTENT_ATTRIBUTE))?"
/":"";
+ String endTag =
SchemaNodeFactory.REFUSED_BODY_CONTENT_TYPE.equals(element.getAttribute(SchemaNodeFactory.BODY_CONTENT_ATTRIBUTE))?"
/":""; //$NON-NLS-1$ //$NON-NLS-2$
StringBuffer lb = new StringBuffer();
lb.append(prefix);
lb.append(KbQuery.PREFIX_SEPARATOR);
@@ -936,8 +936,8 @@
}
private HashMap<String,TldElement> getTldElementsByPrefix(Collection resources,
String prefix, boolean mask) {
- String cacheKey = resources.hashCode() + "/" + prefix + "/" +
mask;
- boolean faceletsHtml = prefix.equals("0fHP");
+ String cacheKey = resources.hashCode() + "/" + prefix + "/" + mask;
//$NON-NLS-1$ //$NON-NLS-2$
+ boolean faceletsHtml = prefix.equals("0fHP"); //$NON-NLS-1$
HashMap<String,TldElement> o =
faceletsHtml?getFaceletsHtmlTldElementsByPrefix().get(cacheKey):getTldElementsByPrefix().get(cacheKey);
if(o != null) return o;
@@ -993,7 +993,7 @@
}
private ArrayList<TldElement> getTldElementsByName(Collection resources, String
prefixName, String name, boolean mask) {
- String cacheKey = resources.hashCode() + "/" + prefixName + "/" +
name + "/" + mask;
+ String cacheKey = resources.hashCode() + "/" + prefixName + "/" +
name + "/" + mask; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ArrayList<TldElement> o = getTldElementsByName().get(cacheKey);
if(o != null) {
return o;
@@ -1003,7 +1003,7 @@
HashMap tldElementTypes = getTldElementsByPrefix(resources, prefixName, false);
if(!mask) {
- TldElement tldElementType =
"0fHP".equals(prefixName)?(TldElement)tldElementTypes.get(name.toUpperCase()):(TldElement)tldElementTypes.get(name);
+ TldElement tldElementType =
"0fHP".equals(prefixName)?(TldElement)tldElementTypes.get(name.toUpperCase()):(TldElement)tldElementTypes.get(name);
//$NON-NLS-1$
if(tldElementType!=null) {
tldElementType.setElementType(TldElementType.TAG);
tldElements.add(tldElementType);
@@ -1017,7 +1017,7 @@
Element element = tldElementType.getElement();
if(i==0) {
String attr =
element.getOwnerDocument().getDocumentElement().getAttribute(SchemaNodeFactory.IGNORE_CASE_ATTRIBUTE);
- ignoreCase = attr!=null && attr.equals("true");
+ ignoreCase = attr!=null && attr.equals("true"); //$NON-NLS-1$
}
String schemaTagName = element.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
boolean match = false;
@@ -1057,7 +1057,7 @@
public void run() {
loadingResources.put(resource, resource);
- String uniqFileName = "schema";
+ String uniqFileName = "schema"; //$NON-NLS-1$
Document document = KbTldConvertor.getInstance().convertToSchema(resource);
// KbPlugin.log("document: " +
KbTldConvertor.getInstance().serialize(document.getDocumentElement()));
@@ -1071,10 +1071,10 @@
File schemaFolder = new File(schemaLocation);
schemaFolder.mkdirs();
- File schemaFile = new File(schemaLocation + "/" + uniqFileName +
".xml");
+ File schemaFile = new File(schemaLocation + "/" + uniqFileName +
".xml"); //$NON-NLS-1$ //$NON-NLS-2$
int i=1;
while(schemaFile.exists()) {
- schemaFile = new File(schemaLocation + "/" + uniqFileName + i++ +
".xml");
+ schemaFile = new File(schemaLocation + "/" + uniqFileName + i++ +
".xml"); //$NON-NLS-1$ //$NON-NLS-2$
}
try {
@@ -1112,8 +1112,8 @@
}
public OutputFormat createOutputFormat() {
- OutputFormat format = new OutputFormat("xml", "UTF-8", true);
- format.setLineSeparator("\r\n");
+ OutputFormat format = new OutputFormat("xml", "UTF-8", true);
//$NON-NLS-1$ //$NON-NLS-2$
+ format.setLineSeparator("\r\n"); //$NON-NLS-1$
format.setIndent(2);
return format;
}
@@ -1183,15 +1183,15 @@
public String toString() {
StringBuffer result = new StringBuffer();
- result.append("Element: [");
+ result.append("Element: ["); //$NON-NLS-1$
result.append(element);
- result.append("]; Type: [");
+ result.append("]; Type: ["); //$NON-NLS-1$
result.append(elementType);
- result.append("]; Resource: [");
+ result.append("]; Resource: ["); //$NON-NLS-1$
result.append(resource);
- result.append("]; Prefix: [");
+ result.append("]; Prefix: ["); //$NON-NLS-1$
result.append(prefix);
- result.append("]");
+ result.append("]"); //$NON-NLS-1$
return result.toString();
}
@@ -1209,9 +1209,9 @@
return type;
}
- public static final TldElementType PREFIX = new TldElementType("Prefix");
- public static final TldElementType TAG = new TldElementType("Tag");
- public static final TldElementType ATTRIBUTE = new
TldElementType("Attribute");
- public static final TldElementType ATTRIBUTE_VALUE = new TldElementType("Attribute
value");
+ public static final TldElementType PREFIX = new TldElementType("Prefix");
//$NON-NLS-1$
+ public static final TldElementType TAG = new TldElementType("Tag");
//$NON-NLS-1$
+ public static final TldElementType ATTRIBUTE = new
TldElementType("Attribute"); //$NON-NLS-1$
+ public static final TldElementType ATTRIBUTE_VALUE = new TldElementType("Attribute
value"); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -24,48 +24,48 @@
*/
public class SchemaNodeFactory {
- public static final String SCHEMA_NODE = "schema";
- public static final String ELEMENT_TYPE_NODE = "element-type";
- public static final String ATTRIBUTE_TYPE_NODE = "attribute-type";
- public static final String TLD_CONTENT_NODE = "tld-content";
- public static final String ELEMENT_NODE = "element";
- public static final String ATTRIBUTE_NODE = "attribute";
- public static final String PARAM_NODE = "param";
- public static final String GROUP_NODE = "group";
- public static final String DESCRIPTION_NODE = "description";
- public static final String PREFIX_ATTRIBUTE = "prefix";
- public static final String NAME_ATTRIBUTE = "name";
- public static final String IGNORE_CASE_ATTRIBUTE = "ignore-case";
- public static final String TYPE_ATTRIBUTE = "type";
- public static final String PROPOSAL_NODE = "proposal";
- public static final String CONTENT_ATTRIBUTE = "content";
- public static final String DEFAULT_ATTRIBUTE = "default";
- public static final String REQUIRED_ATTRIBUTE = "required";
- public static final String PREFERABLE_ATTRIBUTE = "preferable";
- public static final String URI_ATTRIBUTE = "uri";
- public static final String URL_ATTRIBUTE = "url";
- public static final String VERSION_ATTRIBUTE = "version";
- public static final String JSF_ATTRIBUTE = "jsf";
- public static final String LOCATION_ATTRIBUTE = "location";
- public static final String ROOT_ELEMENT_ATTRIBUTE = "root-element";
- public static final String VALUES_ATTRIBUTE = "values";
- public static final String VALUE_ATTRIBUTE = "value";
- public static final String ENUMERATION_TYPE = "enumeration";
+ public static final String SCHEMA_NODE = "schema"; //$NON-NLS-1$
+ public static final String ELEMENT_TYPE_NODE = "element-type"; //$NON-NLS-1$
+ public static final String ATTRIBUTE_TYPE_NODE = "attribute-type";
//$NON-NLS-1$
+ public static final String TLD_CONTENT_NODE = "tld-content"; //$NON-NLS-1$
+ public static final String ELEMENT_NODE = "element"; //$NON-NLS-1$
+ public static final String ATTRIBUTE_NODE = "attribute"; //$NON-NLS-1$
+ public static final String PARAM_NODE = "param"; //$NON-NLS-1$
+ public static final String GROUP_NODE = "group"; //$NON-NLS-1$
+ public static final String DESCRIPTION_NODE = "description"; //$NON-NLS-1$
+ public static final String PREFIX_ATTRIBUTE = "prefix"; //$NON-NLS-1$
+ public static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
+ public static final String IGNORE_CASE_ATTRIBUTE = "ignore-case";
//$NON-NLS-1$
+ public static final String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
+ public static final String PROPOSAL_NODE = "proposal"; //$NON-NLS-1$
+ public static final String CONTENT_ATTRIBUTE = "content"; //$NON-NLS-1$
+ public static final String DEFAULT_ATTRIBUTE = "default"; //$NON-NLS-1$
+ public static final String REQUIRED_ATTRIBUTE = "required"; //$NON-NLS-1$
+ public static final String PREFERABLE_ATTRIBUTE = "preferable"; //$NON-NLS-1$
+ public static final String URI_ATTRIBUTE = "uri"; //$NON-NLS-1$
+ public static final String URL_ATTRIBUTE = "url"; //$NON-NLS-1$
+ public static final String VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
+ public static final String JSF_ATTRIBUTE = "jsf"; //$NON-NLS-1$
+ public static final String LOCATION_ATTRIBUTE = "location"; //$NON-NLS-1$
+ public static final String ROOT_ELEMENT_ATTRIBUTE = "root-element";
//$NON-NLS-1$
+ public static final String VALUES_ATTRIBUTE = "values"; //$NON-NLS-1$
+ public static final String VALUE_ATTRIBUTE = "value"; //$NON-NLS-1$
+ public static final String ENUMERATION_TYPE = "enumeration"; //$NON-NLS-1$
public static final String BUNDLE_NAME_TYPE = KbDinamicResource.BUNDLE_NAME_TYPE;
- public static final String ENUMERATION_SEPARATOR = ",";
- public static final String ATTRIBUTE_TYPE_SEPARATOR = ",";
- public static final String CONTENT_TYPE_MIXED = "mixed";
- public static final String TRUE_REQUIRED_ATTRIBUTE = "true";
- public static final String FALSE_REQUIRED_ATTRIBUTE = "false";
- public static final String START_TAG_ATTRIBUTE = "start-tag";
- public static final String END_TAG_ATTRIBUTE = "end-tag";
- public static final String OPTIONAL_TAG_TYPE = "optional";
- public static final String REQUIRED_TAG_TYPE = "required";
- public static final String REFUSED_TAG_TYPE = "refused";
- public static final String BODY_CONTENT_ATTRIBUTE = "body-content";
- public static final String ALLOWED_BODY_CONTENT_TYPE = "allowed";
- public static final String REFUSED_BODY_CONTENT_TYPE = "refused";
- public static final String OPTIONAL_BODY_CONTENT_TYPE = "optional";
+ public static final String ENUMERATION_SEPARATOR = ","; //$NON-NLS-1$
+ public static final String ATTRIBUTE_TYPE_SEPARATOR = ","; //$NON-NLS-1$
+ public static final String CONTENT_TYPE_MIXED = "mixed"; //$NON-NLS-1$
+ public static final String TRUE_REQUIRED_ATTRIBUTE = "true"; //$NON-NLS-1$
+ public static final String FALSE_REQUIRED_ATTRIBUTE = "false"; //$NON-NLS-1$
+ public static final String START_TAG_ATTRIBUTE = "start-tag"; //$NON-NLS-1$
+ public static final String END_TAG_ATTRIBUTE = "end-tag"; //$NON-NLS-1$
+ public static final String OPTIONAL_TAG_TYPE = "optional"; //$NON-NLS-1$
+ public static final String REQUIRED_TAG_TYPE = "required"; //$NON-NLS-1$
+ public static final String REFUSED_TAG_TYPE = "refused"; //$NON-NLS-1$
+ public static final String BODY_CONTENT_ATTRIBUTE = "body-content";
//$NON-NLS-1$
+ public static final String ALLOWED_BODY_CONTENT_TYPE = "allowed";
//$NON-NLS-1$
+ public static final String REFUSED_BODY_CONTENT_TYPE = "refused";
//$NON-NLS-1$
+ public static final String OPTIONAL_BODY_CONTENT_TYPE = "optional";
//$NON-NLS-1$
public static final char WILD_CARD_CHAR = '*';
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -58,13 +58,13 @@
*/
public String toString() {
StringBuffer sb = new StringBuffer();
- sb.append("[tagName=")
+ sb.append("[tagName=") //$NON-NLS-1$
.append(tagName)
- .append("; hasBody=")
+ .append("; hasBody=") //$NON-NLS-1$
.append(hasBody)
- .append("; hasClosingTag=")
+ .append("; hasClosingTag=") //$NON-NLS-1$
.append(hasClosingTag)
- .append(";]");
+ .append(";]"); //$NON-NLS-1$
return sb.toString();
}
@@ -156,7 +156,7 @@
public KbProposal generateProposal() {
KbProposal proposal = new KbProposal();
- String endTag = hasBody()?"":" /";
+ String endTag = hasBody()?"":" /"; //$NON-NLS-1$ //$NON-NLS-2$
StringBuffer lb = new StringBuffer();
if(prefix!=null && prefix.length()>0) {
lb.append(prefix);
@@ -171,7 +171,7 @@
for(int i=0; i<attributeList.size(); i++) {
AttributeDescriptor attribute = (AttributeDescriptor)attributeList.get(i);
if(attribute.isRequired()) {
- attributes.append("
").append(attribute.getName()).append("=\"\"");
+ attributes.append("
").append(attribute.getName()).append("=\"\""); //$NON-NLS-1$
//$NON-NLS-2$
}
}
lb.append(attributes);
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -15,15 +15,15 @@
*/
public interface KbConfiguration {
- public static final String SCHEMA_FOLDER_NAME = "schemas";
- public static final String SCHEMA_DTD_FOLDER_NAME = "dtd";
- public static final String SCHEMA_TLD_FOLDER_NAME = "tld";
- public static final String SCHEMA_HTML_FOLDER_NAME = "html";
- public static final String SCHEMA_JSP_FOLDER_NAME = "jsp";
- public static final String SCHEMA_HTML_FILE_NAME = "htmlschema.xml";
- public static final String SCHEMA_JSP_FILE_NAME = "jspschema.xml";
- public static final String SCHEMA_JSP_DIRECTIVE_FILE_NAME =
"jspdirectiveschema.xml";
- public static final String HTML_MAP_FILE_NAME = "htmlmap.object";
+ public static final String SCHEMA_FOLDER_NAME = "schemas"; //$NON-NLS-1$
+ public static final String SCHEMA_DTD_FOLDER_NAME = "dtd"; //$NON-NLS-1$
+ public static final String SCHEMA_TLD_FOLDER_NAME = "tld"; //$NON-NLS-1$
+ public static final String SCHEMA_HTML_FOLDER_NAME = "html"; //$NON-NLS-1$
+ public static final String SCHEMA_JSP_FOLDER_NAME = "jsp"; //$NON-NLS-1$
+ public static final String SCHEMA_HTML_FILE_NAME = "htmlschema.xml";
//$NON-NLS-1$
+ public static final String SCHEMA_JSP_FILE_NAME = "jspschema.xml";
//$NON-NLS-1$
+ public static final String SCHEMA_JSP_DIRECTIVE_FILE_NAME =
"jspdirectiveschema.xml"; //$NON-NLS-1$
+ public static final String HTML_MAP_FILE_NAME = "htmlmap.object";
//$NON-NLS-1$
/**
*
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -15,10 +15,10 @@
*/
public class KbConfigurationFactory {
- public static final String CONFIGURATION_SYSTEM_PROPERTY_NAME =
"org.jboss.tools.common.kb.configuration";
+ public static final String CONFIGURATION_SYSTEM_PROPERTY_NAME =
"org.jboss.tools.common.kb.configuration"; //$NON-NLS-1$
- public static final String TEST_CONFIGURATION = "test";
- public static final String PLUGIN_CONFIGURATION = "plugin";
+ public static final String TEST_CONFIGURATION = "test"; //$NON-NLS-1$
+ public static final String PLUGIN_CONFIGURATION = "plugin"; //$NON-NLS-1$
private static final KbConfigurationFactory INSTANCE = new KbConfigurationFactory();
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -24,7 +24,7 @@
public static final String CUSTOM_SCHEMA_LOCATION =
copyKbSchemasFromPluginToWorkSpace();
public static final String CUSTOM_SCHEMA_DTD_LOCATION = CUSTOM_SCHEMA_LOCATION +
File.separator + SCHEMA_DTD_FOLDER_NAME;
- public static final String CUSTOM_SCHEMA_TLD_LOCATION = CUSTOM_SCHEMA_LOCATION +
File.separator + "custom" + File.separator + SCHEMA_TLD_FOLDER_NAME;
+ public static final String CUSTOM_SCHEMA_TLD_LOCATION = CUSTOM_SCHEMA_LOCATION +
File.separator + "custom" + File.separator + SCHEMA_TLD_FOLDER_NAME;
//$NON-NLS-1$
public static final String SCHEMA_HTML_FILE_LOCATION =
KbPlugin.getDefault().getLocation() + File.separator + SCHEMA_FOLDER_NAME + File.separator
+ SCHEMA_HTML_FOLDER_NAME + File.separator + SCHEMA_HTML_FILE_NAME;
public static final String SCHEMA_JSP_FILE_LOCATION =
KbPlugin.getDefault().getLocation() + File.separator + SCHEMA_FOLDER_NAME + File.separator
+ SCHEMA_JSP_FOLDER_NAME + File.separator + SCHEMA_JSP_FILE_NAME;
public static final String CUSTOM_SCHEMA_JSP_DIRECTIVE_FILE_LOCATION =
CUSTOM_SCHEMA_LOCATION + File.separator + SCHEMA_JSP_FOLDER_NAME + File.separator +
SCHEMA_JSP_DIRECTIVE_FILE_NAME;
@@ -36,7 +36,7 @@
}
private static String copyKbSchemasFromPluginToWorkSpace() {
- IPath path =
Platform.getLocation().append(".metadata/.plugins/").append(KbPlugin.PLUGIN_ID).append(SCHEMA_FOLDER_NAME);
+ IPath path =
Platform.getLocation().append(".metadata/.plugins/").append(KbPlugin.PLUGIN_ID).append(SCHEMA_FOLDER_NAME);
//$NON-NLS-1$
File workSpaceCustomSchemaLocation = path.toFile();
return workSpaceCustomSchemaLocation.toString();
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -104,7 +104,7 @@
*/
public JspWtpKbConnector() {
jspResource = KbTldStore.getInstance().getJspResource();
- ((KbTldResource)jspResource).addPrefix("jsp");
+ ((KbTldResource)jspResource).addPrefix("jsp"); //$NON-NLS-1$
registerResources = new ArrayList<KbResource>();
registerJspResource();
registretedDinamicResources = new ArrayList<KbDinamicResource>();
@@ -135,8 +135,8 @@
* @see org.jboss.tools.common.kb.wtp.WtpKbConnector#getProposal(java.lang.String)
*/
public KbProposal getProposal(String query) throws KbException {
- if(!query.endsWith("/")) {
- query = query + "/";
+ if(!query.endsWith("/")) { //$NON-NLS-1$
+ query = query + "/"; //$NON-NLS-1$
}
// tracing would be fine here
// KbPlugin.log(query);
@@ -216,7 +216,7 @@
*/
public Collection<KbProposal> getProposals(String query) throws KbException {
boolean emptyQuery = false;
- if(query.equals("/")) {
+ if(query.equals("/")) { //$NON-NLS-1$
emptyQuery = true;
}
if(emptyQuery) {
@@ -301,7 +301,7 @@
registretedDinamicResources.add((KbDinamicResource)resource);
KbTldStore.getInstance().registerResource(resource);
} else {
- throw new
IllegalArgumentException("JspWtpKbConnector.registerResource(KbResource resource):
resource must be instance of KbTldResource or KbDinamicResource");
+ throw new
IllegalArgumentException("JspWtpKbConnector.registerResource(KbResource resource):
resource must be instance of KbTldResource or KbDinamicResource"); //$NON-NLS-1$
}
if(clearCash) {
clearCache(modified, false);
@@ -326,7 +326,7 @@
}
KbTldStore store = KbTldStore.getInstance();
- KbTldResource resource = new KbTldResource(uri, "", "",
version);
+ KbTldResource resource = new KbTldResource(uri, "", "",
version); //$NON-NLS-1$ //$NON-NLS-2$
List<String> result = store.getAllTagNamesFromResource(resource);
getTagNamesCache().put(key, result);
return result;
@@ -356,7 +356,7 @@
KbTldStore.getInstance().unregisterResource(resource);
registretedDinamicResources.remove(resource);
} else {
- throw new IllegalArgumentException("JspKbConnector.unregisterResource(KbResource
resource): resource must be instance of KbTldResource or KbDinamicResource");
+ throw new IllegalArgumentException("JspKbConnector.unregisterResource(KbResource
resource): resource must be instance of KbTldResource or KbDinamicResource");
//$NON-NLS-1$
}
}
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java 2009-05-27
06:37:36 UTC (rev 15546)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java 2009-05-27
06:43:21 UTC (rev 15547)
@@ -22,7 +22,7 @@
* @author Igels
*/
public interface WtpKbConnector extends KbConnector {
- public static String ADD_HTML_PREFIX = "4YTR:";
+ public static String ADD_HTML_PREFIX = "4YTR:"; //$NON-NLS-1$
/**
*