Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ public void parseTaggedText(String taggedText, boolean expandURLs) {

private String processAmpersandEscapes(String pTaggedText) {
try {
String taggedText = pTaggedText.replaceAll(""", """); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replaceAll("'", "'"); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replaceAll("<", "<"); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replaceAll(">", ">"); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replaceAll("&", "&"); //$NON-NLS-1$//$NON-NLS-2$
String taggedText = pTaggedText.replace(""", """); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replace("'", "'"); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replace("<", "<"); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replace(">", ">"); //$NON-NLS-1$//$NON-NLS-2$
taggedText = taggedText.replace("&", "&"); //$NON-NLS-1$//$NON-NLS-2$
return taggedText.replaceAll("&([^#])", "&$1"); //$NON-NLS-1$//$NON-NLS-2$
} catch (Exception e) {
return pTaggedText;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ public void run() {
try {
String pattern= ((String)clipboard.getContents(TextTransfer.getInstance()));
if (pattern != null) {
final Template template= new Template(createTemplateName(), TemplatesMessages.TemplatesPage_paste_description, getContextTypeId(), pattern.replaceAll("\\$", "\\$\\$"), true); //$NON-NLS-1$//$NON-NLS-2$
final Template template= new Template(createTemplateName(), TemplatesMessages.TemplatesPage_paste_description, getContextTypeId(), pattern.replace("$", "$$"), true); //$NON-NLS-1$//$NON-NLS-2$
getShell().getDisplay().asyncExec(() -> addTemplate(template));
return;
}
Expand Down Expand Up @@ -1556,7 +1556,7 @@ public void drop(DropTargetEvent event) {
contextId= ((TemplatePersistenceData) object).getTemplate().getContextTypeId();
}
if (textTransfer.isSupportedType(event.currentDataType)) {
String text= ((String) event.data).replaceAll("\\$", "\\$\\$"); //$NON-NLS-1$ //$NON-NLS-2$
String text= ((String) event.data).replace("$", "$$"); //$NON-NLS-1$ //$NON-NLS-2$
final Template template= new Template(createTemplateName(),
TemplatesMessages.TemplatesPage_paste_description, contextId, text,
true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public TestCase createTestCase(String str) {
pos2= pos1;
}

final String stripped= str.replaceAll("%", "").replaceAll("#", "");
final String stripped= str.replace("%", "").replace("#", "");

if (enclosingTest) {
return new TestCase(stripped, pos1, pos2, match1, match2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ProcessSpy implements IProcessExecutor {
@Override
public String execute(String process, String... args) throws IOException {
records.add(new Record(process, args));
return result == null ? null : result.replaceAll("\r\n", "\n");
return result == null ? null : result.replace("\r\n", "\n");
}

static class Record {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private void assertSchemesInOrder(PlistFileWriter writer, String... schemes) {
private void assertXml(String xml, PlistFileWriter writer) {
StringWriter stringWriters[] = new StringWriter[1];
writer.writeTo(() -> (stringWriters[0] = new StringWriter()));
assertEquals(xml, stringWriters[0].toString().replaceAll("\r\n", "\n"));
assertEquals(xml, stringWriters[0].toString().replace("\r\n", "\n"));
}

private PlistFileWriter getWriter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void initialReconcile() {
String doc = document.get();
if(doc.contains(SEARCH_TERM)) {
Display.getDefault().asyncExec(() -> {
document.set(document.get().replaceAll(SEARCH_TERM, REPLACEMENT));
document.set(document.get().replace(SEARCH_TERM, REPLACEMENT));
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void initialReconcile() {
String doc = document.get();
if(doc.contains(SEARCH_TERM)) {
Display.getDefault().asyncExec(() -> {
document.set(document.get().replaceAll(SEARCH_TERM, REPLACEMENT));
document.set(document.get().replace(SEARCH_TERM, REPLACEMENT));
});
}
}
Expand Down
Loading